Repository navigation
Prevent service-account IDs from breaking statistics reports - #214
Merged
Merged
Conversation
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.
GET /v6/reports/statistics/design/first-time-submitters returned 500 in dev because a submission memberId ending in @Clients was cast to bigint. Guard the cast inside CASE in both Design and Development first-time-submitter queries, including empty/null and out-of-range identifiers. A WHERE-only filter would not guarantee cast safety under PostgreSQL predicate reordering.
Valid members, earliest submission selection, the three-month window, and maximum ratings retain their existing semantics. No database migration or data modification is required.
Validation: both actual SQL queries pass PostgreSQL 16 integration fixtures containing service accounts, oversized IDs, new/returning/unrated members, multiple submissions, and duplicate ratings. The test uses unique schemas and a rolled-back transaction. CI build/security checks pass.
Deployed as a two-file SQL overlay on each environment's previous running image. Verified image diffs contain only the guarded cast. ECS rollouts completed (dev task revision 354, prod revision 78); live first-time-submitter reports return HTTP 200 in both environments. Dev Design now returns three rows rather than 500; development returns 11 rows. Production Design/Development return 56/231 rows at verification time.
Companion: public statistics UI.