Skip to content

feat(preprod): Add distribution_error_code filter to list builds#109491

Merged
runningcode merged 4 commits intomasterfrom
runningcode/preprod-list-builds
Mar 3, 2026
Merged

feat(preprod): Add distribution_error_code filter to list builds#109491
runningcode merged 4 commits intomasterfrom
runningcode/preprod-list-builds

Conversation

@runningcode
Copy link
Copy Markdown
Contributor

Summary

  • Add distribution_error_code query parameter to the list builds endpoint, allowing the frontend to filter builds by their distribution error state (no_quota, skipped, processing_error)
  • Fix bug in reset_artifact_data where installable_app_error_code and installable_app_error_message were not cleared on rerun, leaving stale error state on artifacts that subsequently succeeded

Refs EME-842

Add a distribution_error_code query parameter to the list builds
endpoint so the frontend can filter builds by their distribution
error state (no_quota, skipped, processing_error).

Also fix a bug in reset_artifact_data where distribution-specific
error fields (installable_app_error_code, installable_app_error_message)
were not cleared on rerun, leaving stale error state on artifacts
that subsequently succeeded.

Refs EME-842
Co-Authored-By: Claude <noreply@anthropic.com>
@runningcode runningcode requested a review from a team as a code owner February 26, 2026 15:33
@linear
Copy link
Copy Markdown

linear bot commented Feb 26, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 26, 2026
preprod_artifact.error_code = None
preprod_artifact.error_message = None
preprod_artifact.save(update_fields=["state", "error_code", "error_message", "date_updated"])
preprod_artifact.installable_app_error_code = None
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This addresses this comment: #109062 (comment)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

preprod_artifact.error_code = None
preprod_artifact.error_message = None
preprod_artifact.save(update_fields=["state", "error_code", "error_message", "date_updated"])
preprod_artifact.installable_app_error_code = None
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Comment thread src/sentry/preprod/api/endpoints/organization_preprod_list_builds.py Outdated
Move the distribution_error_code filter from the old list builds
endpoint to artifact_search.py, following the size_state pattern
used by the new builds endpoint. Also add the search key to the
frontend allowed keys and update the TS distribution info type
with error_code and error_message fields.

Refs EME-842
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@runningcode runningcode force-pushed the runningcode/preprod-list-builds branch from fba0d9c to 6331f21 Compare February 27, 2026 13:45
'build_configuration_name',
'build_number',
'build_version',
'distribution_error_code',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this happens to be fine because MOBILE_BUILDS_ALLOWED_KEYS isn't used anywhere a user could get at it - but ideally we should roll out UI changes separately from backend changes. Since the deployments aren't synchronized the user can end up with a frontend version which know about some field - with a backend that will error if that field is used for example.

@runningcode runningcode merged commit 745cc57 into master Mar 3, 2026
66 of 68 checks passed
@runningcode runningcode deleted the runningcode/preprod-list-builds branch March 3, 2026 07:10
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants