Skip to content

fix(preprod): Use recompare endpoint and add user-facing status check rerun#112084

Merged
NicoHinderling merged 1 commit intomasterfrom
nico/rerun-snapshot-comparison
Apr 2, 2026
Merged

fix(preprod): Use recompare endpoint and add user-facing status check rerun#112084
NicoHinderling merged 1 commit intomasterfrom
nico/rerun-snapshot-comparison

Conversation

@NicoHinderling
Copy link
Copy Markdown
Contributor

@NicoHinderling NicoHinderling commented Apr 2, 2026

Summary

Two changes to the snapshot header actions menu:

  1. Admin "Re-run comparison" now calls the recompare endpoint instead of
    rerun-status-checks. This actually re-runs the full image diff pipeline
    (and automatically re-posts the GitHub status check when complete).

  2. New user-facing "Rerun Status Checks" menu item lets regular users
    re-post the GitHub status check without needing admin access or re-running
    the full image diff.

Test plan

  • Verify "Rerun Status Checks" is visible to all users and calls rerun-status-checks with check_types: ['snapshots']
  • Verify "Re-run comparison" is only visible to Sentry employees and calls the recompare endpoint
  • Confirm the snapshot comparison is re-run with fresh image diffs when using the admin action

@github-actions github-actions bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels Apr 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🚨 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.

Comment thread src/sentry/preprod/api/endpoints/preprod_artifact_rerun_analysis.py Outdated
@NicoHinderling NicoHinderling marked this pull request as ready for review April 2, 2026 02:16
@NicoHinderling NicoHinderling requested a review from a team as a code owner April 2, 2026 02:16
Comment thread src/sentry/preprod/api/endpoints/preprod_artifact_rerun_analysis.py Outdated
Comment thread src/sentry/preprod/api/endpoints/preprod_artifact_rerun_analysis.py Outdated
Comment thread src/sentry/preprod/api/endpoints/preprod_artifact_rerun_analysis.py Outdated
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a 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 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread src/sentry/preprod/api/endpoints/preprod_artifact_rerun_analysis.py Outdated
Comment thread src/sentry/preprod/api/endpoints/preprod_artifact_rerun_analysis.py Outdated
@NicoHinderling NicoHinderling force-pushed the nico/rerun-snapshot-comparison branch from 151c2eb to 1db3a98 Compare April 2, 2026 02:45
@NicoHinderling NicoHinderling changed the title feat(preprod): Add snapshot comparison rerun to rerun-analysis endpoint fix(preprod): Use recompare endpoint for snapshot re-run button Apr 2, 2026
… rerun

The admin "Re-run comparison" button was calling rerun-status-checks,
which only re-posts the GitHub status check without re-running the
actual image diff. Point it at the recompare endpoint instead, which
dispatches compare_snapshots (full image diff + status check posting).

Also adds a user-facing "Rerun Status Checks" menu item so regular
users can re-post the GitHub status check without needing admin access.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@NicoHinderling NicoHinderling force-pushed the nico/rerun-snapshot-comparison branch from 1db3a98 to 6648e87 Compare April 2, 2026 02:50
@NicoHinderling NicoHinderling changed the title fix(preprod): Use recompare endpoint for snapshot re-run button fix(preprod): Use recompare endpoint and add user-facing status check rerun Apr 2, 2026
@NicoHinderling NicoHinderling merged commit 3e9d94c into master Apr 2, 2026
76 checks passed
@NicoHinderling NicoHinderling deleted the nico/rerun-snapshot-comparison branch April 2, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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