-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
ref(preprod): Remove feature checks from assemble task #107338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: chromy/2026-01-30-add-requested-to-update
Are you sure you want to change the base?
ref(preprod): Remove feature checks from assemble task #107338
Conversation
Remove should_run_size and should_run_distribution logic from the assemble_preprod_artifact task. The task now always requests all features, and the actual determination of which features can run is now handled by the artifact update endpoint. When size analysis cannot run due to quota limits or project filters the artifact update endpoint now updates the PreprodArtifactSizeMetrics record with NOT_RAN state and appropriate error code (NO_QUOTA or SKIPPED) and message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| "error_code": error_code, | ||
| "error_message": error_message, | ||
| }, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Size metrics record can be overwritten after completion
Medium Severity
The update_or_create call unconditionally overwrites the PreprodArtifactSizeMetrics record when can_run_size is False. If size analysis has already completed successfully (state is COMPLETED), and the update endpoint is called again when quota is exhausted or filters don't match, the COMPLETED record gets overwritten with NOT_RAN, causing data loss of the successful analysis results. The old code in assemble_preprod_artifact used get_or_create which wouldn't overwrite existing records. The logic needs to check the current state before updating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm if re-running then it should probably respect the quota instead of showing stale results, but re-running is a rare occurrence
| requested_features=[ | ||
| PreprodFeature.SIZE_ANALYSIS, | ||
| PreprodFeature.BUILD_DISTRIBUTION, | ||
| ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe mark this with a deprecated comment or something , just something to indicate these aren't actually used anymore?
| "error_code": error_code, | ||
| "error_message": error_message, | ||
| }, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm if re-running then it should probably respect the quota instead of showing stale results, but re-running is a rare occurrence


No description provided.