Repository navigation
Check the live draft state before skipping release notes checks - #443
Merged
Merged
Conversation
The event's draft flag is a snapshot. In Kibana, the run for a push to a draft started 90 seconds after the PR was marked ready, and it skipped validate. A late skip can hide a failed check, because GitHub shows the newest result and counts a skip as passing. Now a draft-state job reads the PR from the API, and validate skips only when the PR is still a draft. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0198Z15QXfthJ2QgGztrDHtu
theletterf
marked this pull request as draft
October 27, 2026 20:36
theletterf
marked this pull request as ready for review
October 28, 2026 08:12
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.
With
skip-drafts, the release notes checks now skip a run only when the pull request is still a draft when the run starts. A late run for a push to a draft can no longer hide a failed check on a pull request that is already ready.Prompt summary: After #442 shipped, we checked whether Kibana behaves correctly. One ready Kibana pull request had a skipped
validaterun that the design did not explain. The ask is to find the cause, reproduce it, and fix it.Why
The
validatejob read the draft flag from the event, and that flag is a snapshot from the moment of the event. On elastic/kibana#300911, the author pushed to the draft at 19:38:52 and marked it ready at 19:38:59. Theready_for_reviewrun passed at 19:39:03. GitHub started the push run 90 seconds later, still withdraft: true, sovalidatewas skipped on the ready pull request. GitHub shows the newest result for a check and counts a skip as passing. If theready_for_reviewrun had failed, the late skip would have hidden the failure, and the pull request could merge unchecked.What
The live state decides
When the event says the pull request is a draft, a new
draft-statejob reads the pull request from the GitHub API.validateskips only when that live state is still draft. When the event says the pull request is ready,draft-statedoes not run, so ready pull requests pay no extra cost.Fail toward checking
validateruns whendraft-stateis skipped or fails. An API error therefore runs the checks instead of skipping them. Callers need no change, because the workflow already haspull-requests: read.Caller guidance
The "Draft pull requests" section of
release-notes/README.mdsays that a skip depends on the state when the run starts.Verify
elastic/docs-playground-release-notes-tagged#77 points its caller at this branch. A re-run reuses the original event, so re-running the draft-time run after the pull request is ready reproduces the Kibana case:
v1reads only the event's draft flag, so it would skipvalidateon the same re-run. I did not run that case.Out of scope: A run whose event says "ready" still runs
validateif the pull request went back to draft in the meantime. That only adds a check, so it is safe.Generated by Claude Code