Skip to content

Pin CI checkout refs to immutable commit SHAs to fix build/test skew#503

Merged
swahtz merged 1 commit into
openvdb:mainfrom
swahtz:fix/build_test_ci_skew
Mar 5, 2026
Merged

Pin CI checkout refs to immutable commit SHAs to fix build/test skew#503
swahtz merged 1 commit into
openvdb:mainfrom
swahtz:fix/build_test_ci_skew

Conversation

@swahtz

@swahtz swahtz commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

When the build and test jobs checked out the base branch by name (e.g. "main"), a PR merged between the build and test phases could advance the branch tip, causing test jobs to run newer tests against an older built package. Fix by using github.event.pull_request.base.sha and github.sha instead of branch refs, and fetching the PR head by its exact SHA rather than the mutable pull/N/head ref. All values are constants within a single workflow run, guaranteeing every job sees the same source tree.

Applied to tests.yml, cu128.yml, and cu130.yml.

When the build and test jobs checked out the base branch by name (e.g.
"main"), a PR merged between the build and test phases could advance the
branch tip, causing test jobs to run newer tests against an older built
package. Fix by using github.event.pull_request.base.sha and github.sha
instead of branch refs, and fetching the PR head by its exact SHA rather
than the mutable pull/N/head ref. All values are constants within a
single workflow run, guaranteeing every job sees the same source tree.

Applied to tests.yml, cu128.yml, and cu130.yml.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
@swahtz swahtz requested a review from a team as a code owner March 5, 2026 01:40
@swahtz swahtz added CI Issues related to the Github actions CI/CD. For build issues use CMake/Build tests labels Mar 5, 2026
@swahtz swahtz enabled auto-merge (squash) March 5, 2026 01:56
@swahtz swahtz merged commit c018641 into openvdb:main Mar 5, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Issues related to the Github actions CI/CD. For build issues use CMake/Build tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants