Skip to content

Ci fast fail on job failure#5786

Merged
jyotshnayaparla-00 merged 2 commits intomainfrom
ci-fast-fail-on-job-failure
Mar 14, 2026
Merged

Ci fast fail on job failure#5786
jyotshnayaparla-00 merged 2 commits intomainfrom
ci-fast-fail-on-job-failure

Conversation

@jyotshnayaparla-00
Copy link
Contributor

@jyotshnayaparla-00 jyotshnayaparla-00 commented Mar 10, 2026

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 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 run-id in actions/download-artifact so cross-run artifact fetches work with the built-in action.

Validated in feldera/feldera-ci-test: Run 1 built everything and passed; Run 2 skipped all build phases and reused artifacts from Run 1.

Fixes: #5531

@jyotshnayaparla-00 jyotshnayaparla-00 requested a review from gz March 10, 2026 00:28
Copy link

@mythical-fred mythical-fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Clean rebase of the closed #5759 (which Gerd had approved). The check-prior-build job is designed to never fail (all steps are continue-on-error / if: always()), so no cancel sentinel needed — correctly noted. All downstream jobs gate on result == 'success' || result == 'skipped' so the skip path is properly handled.

artifacts_run_id: ${{ steps.result.outputs.artifacts_run_id }}
skip_docker: ${{ steps.result.outputs.skip_docker }}
steps:
- name: Find prior run with all build artifacts for this commit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be good to make this a dedicated step with a composite action. the inputs are a list of artifacts you require and the step passes or fails wether the artifacts are there or not

@jyotshnayaparla-00 jyotshnayaparla-00 requested a review from gz March 12, 2026 00:44
@jyotshnayaparla-00 jyotshnayaparla-00 force-pushed the ci-fast-fail-on-job-failure branch 2 times, most recently from f4d44c7 to 2cbc7bc Compare March 12, 2026 00:53
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.
@jyotshnayaparla-00 jyotshnayaparla-00 force-pushed the ci-fast-fail-on-job-failure branch from 8a1356e to fc8fe9e Compare March 13, 2026 17:21
@jyotshnayaparla-00 jyotshnayaparla-00 added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit 95e6e07 Mar 14, 2026
1 check passed
@jyotshnayaparla-00 jyotshnayaparla-00 deleted the ci-fast-fail-on-job-failure branch March 14, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If a CI job is re-enqueued but build passed, start from test phase and don't go through build phase again

3 participants