Skip to content

ref(control): Remove the github check-drop option now that it is baselined - #122581

Merged
vaind merged 2 commits into
masterfrom
ivandlugos/ref/remove-github-check-drop-option
Sep 1, 2026
Merged

vaind merged 2 commits into
masterfrom
ivandlugos/ref/remove-github-check-drop-option

Conversation

@vaind

@vaind vaind commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Step 3 of the option-removal order for hybridcloud.webhookpayload.github_drop_checks_without_own_repo_pr: the call site and the registration.

The earlier steps are already out — #121954 moved the rolled-out value into the registered default (False → True), and sentry-options-automator#9218 removed the control-silo override that had held true since 2026-08-12. options.get(...) has only been able to return true since, so the branch behind it is unreachable.

Merge gate: the automator run for sentry-options-automator#9218 needs to be green before this lands. It ran while the option was still registered, which is what lets configoptions sync unset the row — removing the registration first would strand it.

What changed

  • github.py — dropped the options.get(...) conjunct, so the own-repo-PR drop is unconditional for the actions in own_repo_pr_actions.
  • defaults.py — removed the register(...).
  • Dropped the has_own_repo_pr tag from github.webhook.forwarded_event. Both action-filtered event types list completed in own_repo_pr_actions, so any payload that would have tagged false is now dropped before the forward — the tag could only ever read true, and emitting it costs a second references_own_repo_pull_request scan on the control parser's hot path. If you group that counter by has_own_repo_pr: the split goes away, the counter does not.
  • Tests — removed the kill-switch cases, the ones asserting the dropped tag, and two _by_default cases that became exact duplicates of their _with_no_pull_requests counterparts.

Testing

tests/sentry/middleware/integrations/parsers/test_github.py — 62 passing. prek and mypy clean.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@vaind
vaind requested review from a team as code owners August 25, 2026 13:58
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 25, 2026
@vaind
vaind requested a review from a team August 26, 2026 06:04
@vaind
vaind force-pushed the ivandlugos/ref/remove-github-check-drop-option branch from 60224ac to 30a0a70 Compare August 27, 2026 08:57
…lined

The own-repo-PR predicate held its rollout override at `true` for a fortnight
with `sentry.pr_metrics.check.activity_recorded` flat, which was the bar the
rollout set for itself. #121954 moved that value into the registered default and
sentry-options-automator#9218 removed the override, so the option has only ever
been able to read `true` since. Collapsing the call site is what retires the
switch; leaving the read in place would keep a branch nothing can reach.

Drops the `has_own_repo_pr` tag on `github.webhook.forwarded_event` with it.
Both action-filtered event types list `completed` in `own_repo_pr_actions`, so a
payload that would tag `false` is now dropped before the forward and the tag is
a constant. Emitting it cost a second `references_own_repo_pull_request` scan
per completed check on the control parser's hot path.

The tests that pinned the disabled path go too: the two kill-switch cases, the
three asserting the `false` tag, and two `_by_default` cases that became exact
duplicates of the `_with_no_pull_requests` drop tests once the option was gone.
@vaind
vaind force-pushed the ivandlugos/ref/remove-github-check-drop-option branch from 30a0a70 to bd82003 Compare September 1, 2026 06:50
@vaind
vaind merged commit 80d4ffc into master Sep 1, 2026
120 of 122 checks passed
@vaind
vaind deleted the ivandlugos/ref/remove-github-check-drop-option branch September 1, 2026 12:58
sentry-junior Bot added a commit that referenced this pull request Sep 1, 2026
vaind added a commit that referenced this pull request Sep 2, 2026
The base branch (#123298) was squash-merged, so its commits reach master as
one new commit that shares no history with the copies still on this branch.
Every hunk they both touch conflicts even where the two sides agree.

Resolutions:

- github.py `_get_drop_response`: took master. The two sides differ only in
  the `github_drop_checks_without_own_repo_pr` gate, which master deleted in
  #122581 once the behaviour was baselined; keeping this branch's copy would
  resurrect an option that no longer exists.
- github.py `get_response`: kept `integration_for_request()`. Routing through
  the memo is what this branch is for.
- parser.py `__init__`: kept the `_integration` / `_integration_fetched`
  fields backing that memo.
- jira_server.py: took master's `get_request_body()` over the inlined
  `orjson.loads`. Same parse, plus the non-dict guard, in the shared helper.
- test_gitlab.py: took master's added imports; this side added none.
- test_github.py: both sides carried byte-identical copies of the four
  drop/shed tests, and git kept both. Dropped the second copy.

Co-Authored-By: Claude Opus 5 <[email protected]>

This branch was successfully deployed

1 active deployment
Preview — 55e8c09d Deployed Sep 1, 2026 by vercel[bot]
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.

3 participants