fix: list FindAll dropped query args (prod /lists/ 500)#5
Merged
Conversation
go-sqlbuilder 1.41 parameterizes LIMIT as a placeholder (1.7 inlined it), so FindAll's 'sql, _ := sb.Build(); Query(sql)' sent a literal '?' to MySQL -> Error 1064, 500ing every /lists/ endpoint. Capture and pass args like Get does. Verified against MySQL 8 locally: trending/newest/all return data (or 404 when empty) instead of 500. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Incident
All
/lists/endpoints (incl.?filter_by=trending) returned 500 in prod after the deps bump (#4). Prod was rolled back to revisionback-00068-n26to restore service.Cause
go-sqlbuilder1.41 parameterizesLIMITas a?placeholder; 1.7 inlined it as a literal.FindAlldidsql, _ := sb.Build()and ranQuery(sql)without args, so MySQL got a literal?→Error 1064. (Getalready passes args correctly.)Fix
Capture and pass the args:
sql, args := sb.Build(); Query(sql, args...).Verification
Ran the fixed backend against MySQL 8 locally: trending/newest/all return data (or 404 when empty), no 500. Merging redeploys and supersedes the rollback.
🤖 Generated with Claude Code