Skip to content

Check the live draft state before skipping release notes checks - #443

Merged
theletterf merged 1 commit into
mainfrom
ccr-8311a0e2-qmcqgm
Oct 28, 2026
Merged

theletterf merged 1 commit into
mainfrom
ccr-8311a0e2-qmcqgm

Conversation

@theletterf

@theletterf theletterf commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

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 validate run that the design did not explain. The ask is to find the cause, reproduce it, and fix it.

Why

The validate job 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. The ready_for_review run passed at 19:39:03. GitHub started the push run 90 seconds later, still with draft: true, so validate was skipped on the ready pull request. GitHub shows the newest result for a check and counts a skip as passing. If the ready_for_review run 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-state job reads the pull request from the GitHub API. validate skips only when that live state is still draft. When the event says the pull request is ready, draft-state does not run, so ready pull requests pay no extra cost.

Fail toward checking

validate runs when draft-state is skipped or fails. An API error therefore runs the checks instead of skipping them. Callers need no change, because the workflow already has pull-requests: read.

Caller guidance

The "Draft pull requests" section of release-notes/README.md says 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:

opened as draft             -> draft-state: draft=true    -> validate skipped
ready_for_review            -> draft-state not needed     -> validate failed (no label)
re-run of the draft run     -> event draft, live false    -> validate failed (no label)

v1 reads only the event's draft flag, so it would skip validate on the same re-run. I did not run that case.

Out of scope: A run whose event says "ready" still runs validate if the pull request went back to draft in the meantime. That only adds a check, so it is safe.


Generated by Claude Code

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
theletterf requested a review from a team as a code owner October 27, 2026 20:32
@theletterf
theletterf requested a review from reakaleek October 27, 2026 20:32
@theletterf theletterf added the bug Something isn't working label Oct 27, 2026 — with Claude
@theletterf
theletterf marked this pull request as draft October 27, 2026 20:36
@theletterf
theletterf marked this pull request as ready for review October 28, 2026 08:12
@theletterf
theletterf merged commit 6ce1eb5 into main Oct 28, 2026
6 checks passed
@theletterf
theletterf deleted the ccr-8311a0e2-qmcqgm branch October 28, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant