ref(preprod): Add organization_slug to size analysis log#112194
ref(preprod): Add organization_slug to size analysis log#112194NicoHinderling merged 2 commits intomasterfrom
Conversation
Include organization_slug in the size metrics log entry for easier debugging and log correlation. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
…rganization Avoids a potential extra DB query since organization is already fetched.
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit db9b16f. Configure here.
| metrics_committed_successfully = True | ||
| size_metrics_updated = metrics_in_transaction | ||
|
|
||
| organization = preprod_artifact.project.organization |
There was a problem hiding this comment.
Moving DB query outside inner try changes error handling
Medium Severity
organization = preprod_artifact.project.organization was moved from inside the narrow inner try/except (for EAP operations) to before it. If this DB lookup fails, it's now caught by the outer except at the end of the function, causing all subsequent operations to be skipped — including maybe_emit_issues_from_absolute_size_results, the extras/duration update, and the size analysis comparison trigger. Previously the inner except would catch the failure and allow those operations to proceed. Since select_related on the preprod_artifact query doesn't include project__organization, this line triggers additional DB queries that could fail.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit db9b16f. Configure here.
db9b16f to
d6d4a12
Compare
Add `organization_slug` to the size analysis metrics log entry in preprod tasks for easier debugging and log correlation when investigating size analysis issues. --------- Co-authored-by: Claude Opus 4.6 <noreply@example.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>


Add
organization_slugto the size analysis metrics log entry in preprod tasks for easier debugging and log correlation when investigating size analysis issues.