Repository navigation
fix: return an empty feed page past the end instead of a 500 - #1263
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Author
There was a problem hiding this comment.
✅ Devin Review: No Issues Found
Devin Review analyzed this PR and found no bugs or issues to report.
Custom reviewers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #1259. Asking for a feed page past the end returned a 500 over REST (
/articles/feed?offset=18with 18 articles) and an SQL error over GraphQL (feed(first:10, after:<last cursor>)).Cause:
ArticleQueryService.fillExtraInforan the favorites-count, favorited and following lookups even when the page was empty. Their MyBatis<foreach>then renderedwhere id in (), which SQLite rejects (near "group": syntax error).fillExtraInfonow returns early for an empty list, so:{"articles": [], "articlesCount": <total>}, 200edges: [],hasNextPage: false,endCursor: nullNothing else changes; non-empty pages run the same queries as before.
Testing
ArticleQueryServiceTestcases (offset past the end, cursor past the end) fail without the fix and pass with it.spotlessCheck buildgreen on Java 11.articlesCount: 18and HTTP 200. GraphQL pages 10 → 8 → empty page withhasNextPage: false. The same past-end requests on Upgrade to Java 21 / Spring Boot 3.5 (revives #1185) #1258 alone fail.Devin-Org: engineering
Implemented in session Wire Angular RealWorld app to Boot 3 backend
Review with Devin · Open in Devin Desktop