Skip to content

ref(preprod): Remove snapshot feature flags and backend gating#118263

Merged
NicoHinderling merged 1 commit into
masterfrom
nico/ref/preprod-remove-snapshot-flags-backend
Jun 23, 2026
Merged

ref(preprod): Remove snapshot feature flags and backend gating#118263
NicoHinderling merged 1 commit into
masterfrom
nico/ref/preprod-remove-snapshot-flags-backend

Conversation

@NicoHinderling

@NicoHinderling NicoHinderling commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

The preprod snapshot features are GA, so this unregisters the three flags in temporary.py and removes all backend gating on them:

  • organizations:preprod-snapshots
  • organizations:preprod-snapshot-pr-comments
  • organizations:preprod-selective-base-snapshots

Behavior changes:

  • The snapshot endpoints (create/detail/delete, archive, image-detail, latest-base, upload-options) no longer short-circuit with 403 {"detail": "Feature not enabled"} for orgs without preprod-snapshots — they now always serve, the same as the existing IS_DEV path. Existing auth/project-access checks are unchanged.
  • Selective snapshots are now always eligible as comparison bases. find_base_snapshot_artifact previously excluded selective bases unless preprod-selective-base-snapshots was set; the allow_selective parameter and its filter branch are removed, and the now-dead allow_selective plumbing in the create handler, recompare, and build-details is gone.
  • The snapshot PR-comment task no longer gates on preprod-snapshot-pr-comments. Its other early-returns — the sentry:preprod_snapshot_pr_comments_enabled project option and the missing-commit-comparison / PR-info / client checks — are kept.

Tests that asserted the old flag-OFF behavior (403 responses, the feature_disabled skip, the selective-base-excluded-by-default case) are deleted or updated to the always-on behavior; the remaining tests just lose their with self.feature(...) wrappers.

Stacked on top of the frontend flag-removal PR (#118262) and should merge after it.

@NicoHinderling NicoHinderling requested a review from a team as a code owner June 23, 2026 18:21

NicoHinderling commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 23, 2026
@NicoHinderling NicoHinderling force-pushed the nico/ref/preprod-remove-snapshot-flags-backend branch from 792e374 to 6400018 Compare June 23, 2026 18:33
Base automatically changed from nico/ref/preprod-remove-snapshot-flags-frontend to master June 23, 2026 18:38
@NicoHinderling NicoHinderling requested review from a team as code owners June 23, 2026 18:38
The preprod snapshot features are now GA. Unregister the three flags in
temporary.py and remove every backend check for:

- organizations:preprod-snapshots
- organizations:preprod-snapshot-pr-comments
- organizations:preprod-selective-base-snapshots

The 403 "Feature not enabled" guards are dropped, the allow_selective
lookups become unconditional, and the snapshot PR-comment task no longer
gates on the flag (the project-option and VCS guards are kept). Tests
that asserted the now-removed flag-OFF behavior are deleted; the rest
have their with self.feature(...) wrappers removed.

Stacked on top of the frontend flag-removal PR.
@NicoHinderling NicoHinderling force-pushed the nico/ref/preprod-remove-snapshot-flags-backend branch from 6400018 to 4628765 Compare June 23, 2026 18:39
@NicoHinderling NicoHinderling enabled auto-merge (squash) June 23, 2026 18:41
@NicoHinderling NicoHinderling merged commit d5eefb8 into master Jun 23, 2026
86 checks passed
@NicoHinderling NicoHinderling deleted the nico/ref/preprod-remove-snapshot-flags-backend branch June 23, 2026 18:56
sehr-m pushed a commit that referenced this pull request Jun 23, 2026
The preprod snapshot features are GA, so this unregisters the three
flags in `temporary.py` and removes all backend gating on them:

- `organizations:preprod-snapshots`
- `organizations:preprod-snapshot-pr-comments`
- `organizations:preprod-selective-base-snapshots`

Behavior changes:

- The snapshot endpoints (create/detail/delete, archive, image-detail,
latest-base, upload-options) no longer short-circuit with `403
{"detail": "Feature not enabled"}` for orgs without `preprod-snapshots`
— they now always serve, the same as the existing `IS_DEV` path.
Existing auth/project-access checks are unchanged.
- Selective snapshots are now always eligible as comparison bases.
`find_base_snapshot_artifact` previously excluded selective bases unless
`preprod-selective-base-snapshots` was set; the `allow_selective`
parameter and its filter branch are removed, and the now-dead
`allow_selective` plumbing in the create handler, recompare, and
build-details is gone.
- The snapshot PR-comment task no longer gates on
`preprod-snapshot-pr-comments`. Its other early-returns — the
`sentry:preprod_snapshot_pr_comments_enabled` project option and the
missing-commit-comparison / PR-info / client checks — are kept.

Tests that asserted the old flag-OFF behavior (403 responses, the
`feature_disabled` skip, the selective-base-excluded-by-default case)
are deleted or updated to the always-on behavior; the remaining tests
just lose their `with self.feature(...)` wrappers.

Stacked on top of the frontend flag-removal PR (#118262) and should
merge after it.
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants