Skip to content

ci(acceptance): Re-run on the override selective testing label - #131408

Merged
joshuarli merged 1 commit into
masterfrom
ci/acceptance-override-label
Nov 17, 2026
Merged

joshuarli merged 1 commit into
masterfrom
ci/acceptance-override-label

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Adding Trigger: Override Selective Testing to a pull request now starts a full acceptance run right away. Before, it only took effect on the next push, because the pull_request trigger in acceptance.yml left out labeled.

Workflow triggers can't filter by label name, so every label event starts a run:

  • Override label: the run behaves like a push and runs the full suite. It shares the PR's concurrency group, so it cancels an in-flight selective run.
  • Any other label:
    • detect what files changed is skipped, so every acceptance job skips.
    • The run gets its own concurrency group, so it doesn't cancel the real run.
    • The aggregator reports as Acceptance (ignored label event).

GitHub counts a job skipped by a condition as passing for required checks. A skipped job named Acceptance could replace a real failure, or a run still in progress, on the same commit. The rename keeps ignored runs off the Acceptance check.

Trade-offs:

  • Each ignored label event still uses a small runner for a few seconds.
  • The label condition appears in three places, because concurrency, job if and job name can't read workflow env.

Open question: none of the labeled paths has run on a real label event yet.

Related: #131325, #131325 (comment)

Refs DI-2885

via @joshuarli.

--

View Session [Sentry]

Adding the Trigger: Override Selective Testing label now starts a full
acceptance run without a new push. Other label events skip the run, use
their own concurrency group, and report under a different check name.
A skipped job counts as passing, so this keeps them from replacing a
real Acceptance result.

Refs DI-2885

Co-Authored-By: Joshua Li <[email protected]>
@linear-code

linear-code Bot commented Nov 17, 2026

Copy link
Copy Markdown

DI-2885

@joshuarli
joshuarli marked this pull request as ready for review November 17, 2026 00:20
@joshuarli
joshuarli requested a review from a team as a code owner November 17, 2026 00:20
@joshuarli
joshuarli merged commit 7516bd5 into master Nov 17, 2026
76 checks passed
@joshuarli
joshuarli deleted the ci/acceptance-override-label branch November 17, 2026 00:20
@sentry-junior
sentry-junior Bot requested a review from joshuarli November 17, 2026 00:20
jan-auer added a commit that referenced this pull request Nov 17, 2026
…-store

* ref/inline-payload-defaults: (2542 commits)
  feat(classifiers): Support search syntax in classifier list query (#131423)
  ref(settings): Update settings tour entry copy (#131424)
  fix(conversations): Track tab switch from the View Timeline button (#131196)
  ref(sourcemaps): Read has_debug_ids in the source map debugger (#130425)
  ci(acceptance): Re-run on the override selective testing label (#131408)
  feat(inbox): Include inbox URLs in item responses (#131406)
  ref(flags): Remove `organizations:jira-explicit-mapping-removals` (frontend) (#130393)
  ci(acceptance): Select acceptance tests on pull requests (#131325)
  fix(audit-log): Render legacy internal integration token entries (#131042)
  ref(api): Drop the isRecord guard from SentryApiError body reads (#131394)
  ref: bump sentry-protos to 0.120.1 (#131396)
  feat(inbox): add URL configuration for inbox events (#131336)
  fix(circuit-breaker): Don't raise from record_error or record_success when redis fails (#131364)
  fix(redis): Let cluster client_args set the per-node connection limit (#131355)
  fix(sentry-apps): Stop retrying service hooks to blocked or unreachable URLs (#131171)
  fix(charts): Stop tooltip errors when a chart refresh removes series (#131341)
  perf(crons): Make the check-in timeout index partial (#131376)
  feat(api): Know per-operation error codes and read top-level codes (#131362)
  feat(api): Generate error codes and challenge fields from the spec (#131287)
  feat(apidocs): Mark auth-challenge error codes in the error component (#131346)
  ...

# Conflicts:
#	src/sentry/conf/server.py
#	src/sentry/event_manager.py
#	src/sentry/ingest/consumer/attachment_event.py
#	src/sentry/ingest/consumer/processors.py
#	src/sentry/processing/backpressure/topology.py
#	src/sentry/tasks/store.py
#	tests/sentry/ingest/ingest_consumer/test_ingest_consumer_kafka.py
#	tests/sentry/ingest/ingest_consumer/test_ingest_consumer_processing.py
#	tests/sentry/processing/backpressure/test_checking.py
#	tests/sentry/processing/backpressure/test_monitoring.py
#	tests/sentry/tasks/test_post_process.py
#	tests/sentry/tasks/test_store.py
#	tests/sentry/tasks/test_symbolication.py
joshuarli added a commit that referenced this pull request Nov 19, 2026
Since #131408, a label event other than `Trigger: Override Selective
Testing` starts an acceptance run where every job skips and the
aggregator reports as `Acceptance (ignored label event)`. If that run is
the newest acceptance run on a commit, the merge box keeps waiting for
the required `Acceptance` check, even though an older run on the same
commit passed. Re-running the older run doesn't help, because it is
still not the newest run.

This hits PRs where a person adds a label after the last push. The
common case is Seer and bot PRs that need `Trigger: getsentry tests`
added again after each push. #131004, reported by @gggritso, is one
example: `Acceptance` passed twice on its head commit, the PR is
approved, and it still shows as blocked. #131456 shows the same pattern.

This change handles label events the way `backend.yml` already does:
- They share the PR's concurrency group.
- They run selective acceptance as usual.
- They report `Acceptance`.

The override label keeps working, because `skip_selective_testing` still
reads the PR's labels.

Trade-off: each manual label added to a PR now starts a selective
acceptance run and cancels any run in progress, just like backend.
#131408 used the ignored-label path to avoid that cost.

Open question: the claim that the merge box only counts the newest run
per workflow is inferred from the check and merge state of the PRs
above, not from GitHub docs.

Refs DI-2885

<!-- junior-request-attribution:start -->
via @joshuarli.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3ACTJL7358X%3A1795105768.817939 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/slack%3ACTJL7358X%3A1795105768.817939)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3ACTJL7358X%3A1795105768.817939/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Joshua Li <[email protected]>
xb18 pushed a commit to xb18/sentry that referenced this pull request Nov 22, 2026
…defaults

* origin/master: (2542 commits)
  feat(classifiers): Support search syntax in classifier list query (getsentry#131423)
  ref(settings): Update settings tour entry copy (getsentry#131424)
  fix(conversations): Track tab switch from the View Timeline button (getsentry#131196)
  ref(sourcemaps): Read has_debug_ids in the source map debugger (getsentry#130425)
  ci(acceptance): Re-run on the override selective testing label (getsentry#131408)
  feat(inbox): Include inbox URLs in item responses (getsentry#131406)
  ref(flags): Remove `organizations:jira-explicit-mapping-removals` (frontend) (getsentry#130393)
  ci(acceptance): Select acceptance tests on pull requests (getsentry#131325)
  fix(audit-log): Render legacy internal integration token entries (getsentry#131042)
  ref(api): Drop the isRecord guard from SentryApiError body reads (getsentry#131394)
  ref: bump sentry-protos to 0.120.1 (getsentry#131396)
  feat(inbox): add URL configuration for inbox events (getsentry#131336)
  fix(circuit-breaker): Don't raise from record_error or record_success when redis fails (getsentry#131364)
  fix(redis): Let cluster client_args set the per-node connection limit (getsentry#131355)
  fix(sentry-apps): Stop retrying service hooks to blocked or unreachable URLs (getsentry#131171)
  fix(charts): Stop tooltip errors when a chart refresh removes series (getsentry#131341)
  perf(crons): Make the check-in timeout index partial (getsentry#131376)
  feat(api): Know per-operation error codes and read top-level codes (getsentry#131362)
  feat(api): Generate error codes and challenge fields from the spec (getsentry#131287)
  feat(apidocs): Mark auth-challenge error codes in the error component (getsentry#131346)
  ...

# Conflicts:
#	tests/sentry/ingest/ingest_consumer/test_ingest_consumer_processing.py
#	tests/sentry/tasks/test_reprocessing2.py
#	tests/sentry/tasks/test_store.py
#	tests/sentry/tasks/test_symbolication.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant