Conversation
Add a check-prior-build job to ci.yml that queries the GitHub API for a prior run on the same commit SHA. If all required binary and Docker digest artifacts are found unexpired, the Rust, Java, and Docker build jobs are skipped and test workflows download artifacts from that prior run instead of rebuilding from scratch. Each test workflow now accepts an artifacts_run_id input passed through from ci.yml, and uses it as the run-id in actions/download-artifact so cross-run artifact fetches work with the built-in action and no third-party dependencies. Build jobs that are skipped leave result=skipped (not failure), so sentinel cancel jobs and the final main job are unaffected.
67e0a3b to
12a497a
Compare
mythical-fred
left a comment
There was a problem hiding this comment.
Solid design. The two-step fallback (consolidate-outputs always runs, defaults to empty run_id) means the job truly never fails and never blocks. The test-integration-runtime.yml gap is intentional — that job runs against deployed infra, not build artifacts.
One soft note: the artifact list fetch uses per_page=100. If a future run ever exceeds 100 artifacts, the check silently falls back to rebuilding (not a correctness bug, just a missed optimization). Worth a comment or bumping to 200.
| needs: [invoke-build-rust, invoke-build-java] | ||
| needs: [check-prior-build, invoke-build-rust, invoke-build-java] | ||
| if: | | ||
| always() && |
There was a problem hiding this comment.
is there some special semantic associated with always() in gha? otherwise this is just if true && a && b and can be rewritten as if a && b
| needs: [invoke-build-rust] | ||
| needs: [check-prior-build, invoke-build-rust] | ||
| if: | | ||
| always() && |
| needs: [invoke-build-rust, invoke-build-java] | ||
| needs: [check-prior-build, invoke-build-rust, invoke-build-java] | ||
| if: | | ||
| always() && |
| invoke-generate-sbom: | ||
| name: Generate SBOMs | ||
| needs: [invoke-build-docker] | ||
| if: | |
| name: Integration Tests | ||
| needs: [invoke-build-docker] | ||
| needs: [check-prior-build, invoke-build-docker] | ||
| if: | |
| name: Integration Tests | ||
| needs: [invoke-build-java] | ||
| needs: [check-prior-build, invoke-build-java] | ||
| if: | |
| name: Java Tests | ||
| needs: [invoke-build-java] | ||
| needs: [check-prior-build, invoke-build-java] | ||
| if: | |
| name: Publish Crates (Dry Run) | ||
| needs: [invoke-build-rust] | ||
| needs: [check-prior-build, invoke-build-rust] | ||
| if: | |
| type: string | ||
| required: false | ||
| default: "" | ||
| workflow_dispatch: |
There was a problem hiding this comment.
does this also need a run id similar to test-integration-platform.yaml?
Add a 'check-prior-build' job that queries the GitHub API for a prior run on the same commit SHA. If all required binary and Docker digest artifacts are found unexpired, the Rust, Java, and Docker build jobs are skipped and test workflows download artifacts from that prior run instead of rebuilding.
Fixes: #5531