Skip to content

SRE-4015 ci: stack tip for validating mid-stack required checks - #19074

Draft
ryon-jensen wants to merge 5 commits into
ryon-jensen/SRE-4015from
ryon-jensen/SRE-4015-stack-tip
Draft

ryon-jensen wants to merge 5 commits into
ryon-jensen/SRE-4015from
ryon-jensen/SRE-4015-stack-tip

Conversation

@ryon-jensen

Copy link
Copy Markdown
Contributor

Stack layer 2 of 2, on top of #19073. Placeholder so that #19073 is a mid-stack pull request, which is the case being validated. Carries skip pragmas so this tip run stays build-only and cheap.

Not for landing.

Every pull request in a GitHub stack currently runs the complete
verification pipeline, so an N deep stack costs N full runs to validate
one change set. Only the tip contains the cumulative result that lands,
so only the tip needs the full pipeline.

updateRunStage() now disables every stage on a mid-stack PR except
Pre-build, Python Bandit check and the builds, and Build on EL 9 drops
RPM generation, the valgrind build and the RPM uploads. A mid-stack
layer therefore still fails fast on a compile error or a lint problem
while skipping everything that needs hardware.

target_branch comes from targetBranch() rather than env.CHANGE_TARGET.
For a mid-stack PR CHANGE_TARGET is the parent layer's branch, not the
branch the change lands on, which silently selected the wrong package
repositories and the wrong skip rules. The provisioning scripts read the
resolved value from DAOS_TARGET_BRANCH, falling back to the previous
behaviour when it is absent.

Because verification is deferred to the tip, a stack must be merged from
the top. Document that alongside the Skip-stack-optimization pragma that
restores full per-layer verification when a layer needs it.

Signed-off-by: Ryon Jensen <ryon.jensen@hpe.com>
Temporary, for validating tip-only stack verification. Do not land.

Signed-off-by: Ryon Jensen <ryon.jensen@hpe.com>
A status check context is published from inside the body of the stage
that produces it, so a stage that does not run never reports it and
GitHub blocks the pull request forever waiting for it.

That makes every layer below the top of a stack unmergeable.  Ten of the
twenty contexts master requires belong to stages that a mid-stack pull
request deliberately does not run, because that verification is run on
the tip of the stack instead.  On a real three deep stack the bottom
pull request published four contexts and reported a mergeable state of
blocked.  Only the bottom layer of a stack targets master, so this is
not obvious at first: as each layer merges, the one above it retargets
to master and hits the same wall in turn.

Publish those contexts from updateRunStage() once the mid-stack stage
selection is known, describing each as running on the tip of the stack
so it is clear the stage did not run here.  This happens before any
stage starts, and statuses are last-write-wins per context, so a stage
that does run, such as the EL 9 build, still overwrites it with the real
result including a failure.

Document the behaviour for contributors.

Signed-off-by: Ryon Jensen <ryon.jensen@hpe.com>
@github-actions

Copy link
Copy Markdown

Errors are Unable to load ticket data
https://daosio.atlassian.net/browse/SRE-4015

A mid-stack pull request is only proven to compile, so it should compile
on both toolchains that the project ships.  Building only EL 9 left a
Leap 15 build break invisible until the tip of the stack ran.

'Build on Leap 15' therefore joins the mid-stack allow list, and is no
longer one of the contexts that notifySkippedRequiredChecks() has to
publish: the stage runs, so it reports its own real result.

Signed-off-by: Ryon Jensen <ryon.jensen@hpe.com>
Placeholder change so that the pull request below this one is in the
middle of a stack, which is the case being validated.

Skip-unit-tests: true
Skip-test: true
Skip-test-hardware: true
Signed-off-by: Ryon Jensen <ryon.jensen@hpe.com>
@ryon-jensen
ryon-jensen force-pushed the ryon-jensen/SRE-4015-stack-tip branch from 2c304bd to 48d60c2 Compare September 16, 2026 01:14
@ryon-jensen

Copy link
Copy Markdown
Contributor Author

Note: This PR will not get landed. It was just used to test 19073 as a non-tip PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant