Repository navigation
ci(getsentry): Dispatch getsentry backend tests for merge groups - #131267
Draft
sentry-junior[bot] wants to merge 2 commits into
Draft
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
A merge queue waits for every required check on the merge group commit, including getsentry / backend, which getsentry only reports for pull requests today. A no-op merge_group workflow starts a workflow_run dispatcher. The dispatcher runs from master, so code in the merge group never runs with the getsentry token. It diffs the group against its base, filters the changed paths with master's filters, and dispatches only getsentry's backend workflow, which reports the check on the group head. Refs DI-2872 Co-Authored-By: Burak Yigit Kaya <[email protected]>
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 |
…ch-merge-group Co-Authored-By: BYK <[email protected]> # Conflicts: # .pre-commit-config.yaml
BYK
added a commit
to getsentry/junior
that referenced
this pull request
Nov 25, 2026
…4306) Some Junior drafts stay drafts after their required checks pass: marking them ready would ask CODEOWNERS (#3380), or the repo's `AGENTS.md` asks for drafts. Today the Watch only posts a Slack message about these drafts. It adds no Inbox item, so the PR lands in Code · Mine's "Drafts" pile and never shows in "Waiting on you". getsentry/sentry#131267 is one example. With this change, a held draft gets the same one ask as any other Junior PR. It is a GitHub review request to the requester only, and the Inbox item follows from it. Nobody else is pinged, and the item gives one step. - **Watch**: when it keeps a draft, it calls `github_updatePullRequest` with the new `request_review: true` and posts nothing in the thread. - **`request_review`**: asks only the requester's linked GitHub login to review. It does nothing when GitHub already asks them, or when they already reviewed, so after a change request only the review-again flow asks again. A dismissed review counts as no review. GitHub requests the code owners only when the PR is marked ready, so they are not asked. - **Next action** (`pull-request-action.ts`): a review that GitHub asks for on a draft is a new `review_draft` action. Its item is `Review requested · #N` with the text "#N is a draft. Review it, then mark it ready for review." When the draft becomes ready, the same item changes to the usual "GitHub asks you to review #N." The `next_action` column is text, so no migration is needed. - **Copy**: the github-code skill and SPEC now say the Watch asks the requester to review, and do not say that it tells them. They also say that the requester's approval marks a held draft ready. - **Evals**: the code-owner and AGENTS.md draft cases now expect one `request_review` call and no reply. The draft HTTP fixture serves review requests. - **Approval marks it ready**: on a draft Watch, an approval is no longer a quiet event. When the requester (`sender_login` is `opener_username`) approves a draft, the Watch marks it ready, so GitHub asks the code owners only after the requester has looked. A draft that the requester asked to keep, or that the repo's `AGENTS.md` leaves for a person to mark ready, stays a draft. Whether Junior held the draft is in the Conversation, so the agent decides from the Watch guidance. - **`design/github.md`**: the Gaps line now covers only the watched-issue half, and Rules has the new draft rule. There is no dashboard UI change. The new item text is not the plain `textRepeatsHead` text, so the row shows it under the head. ## Added sentence for @BYK to check The draft rule in `design/github.md` uses the text you confirmed, plus one new last sentence for the approval change: > When the requester approves a draft that Junior held, Junior marks it ready, so GitHub asks its code owners only after the requester has looked. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A6326d01da80f764780c9040642fdd8c7 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A6326d01da80f764780c9040642fdd8c7) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A6326d01da80f764780c9040642fdd8c7/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A merge queue waits for every required check on the merge group commit.
getsentry / backendis required, but it's only dispatched frompull_request_target, so a queued group would wait until the queue times out. This adds a merge-group path that dispatches the getsentry backend tests for the group's head SHA.getsentry-merge-queue-trigger.ymlruns onmerge_groupand does nothing. It haspermissions: {}and uses no secrets.getsentry-merge-queue-dispatch.ymlruns onworkflow_run(requested) of the trigger, and only formerge_groupruns. It:gh-readonly-queue/<base>/pr-<n>-<base sha>)git diff(newparse-pr-files.py --git-diffmode)file-filters.ymlsentry-shaandsentry-pr-shaset to the group headgetsentry / backendis the only required getsentry check. The PR path is unchanged.merge_groupruns take their workflow files and scripts from the merge group commit, so the dispatch that needs the getsentry token doesn't run there.workflow_runalways runs from master. The token job runs only master's code and filters, and it reads only GitHub-set fields from the triggering run: event, head branch, and head SHA. If a PR breaks the trigger, nothing is dispatched and the check never reports, so the queue entry fails closed.The
merge_group→workflow_runchain can't run until a queue is enabled, so its first real run will happen then.Refs DI-2872
via @BYK.
--
View Session [Sentry]