-
Notifications
You must be signed in to change notification settings - Fork 3.1k
ci: Improve no-fail-fast mechanism #13370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had some clarification questions
.github/workflows/cicd-main.yml
Outdated
@@ -179,42 +220,49 @@ jobs: | |||
tests_to_run: '["L0_Setup_Test_Data_And_Models"]' | |||
|
|||
cicd-main-unit-tests: | |||
needs: [pre-flight, cicd-test-container-build] | |||
needs: [pre-flight, cicd-test-container-build, cicd-wait-in-queue] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to add the cicd-wait-in-queue
if the build step depends on it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We weant to run unit-tests only if the queue event was skipped, but for instance not if the build has failed.
Therefore we need a query like:
needs.pre-flight.outputs.test_to_run != '[]'
&& (
success()
|| (
needs.cicd-wait-in-queue.result == 'skipped'
&& needs.pre-flight.outputs.is_ci_workload == 'true'
)
)
&& !cancelled()
Since we want to access cicd-wait-in-queue
's result attribute, we need to add it to the job's need array
.github/workflows/cicd-main.yml
Outdated
with: | ||
test_to_run: ${{ needs.pre-flight.outputs.test_to_run }} | ||
|
||
cicd-main-export-deploy: | ||
needs: [pre-flight, cicd-test-container-build, cicd-main-unit-tests] | ||
uses: ./.github/workflows/cicd-main-export-deploy.yml | ||
if: | | ||
(success() || needs.cicd-wait-in-queue.result == 'skipped') && (contains(fromJson(needs.pre-flight.outputs.components_to_run), 'export-deploy') || needs.pre-flight.outputs.components_to_run == '["all"]') | ||
(success() || (needs.cicd-wait-in-queue.result == 'skipped' && needs.pre-flight.outputs.is_ci_workload == 'true') || needs.pre-flight.outputs.no_fail_fast == 'true') && (contains(fromJson(needs.pre-flight.outputs.components_to_run), 'export-deploy') || needs.pre-flight.outputs.components_to_run == '["all"]') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should we have both is_ci_workload mechanisms rather than relying on the no-fail-fast label like we did before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open for discussion, my thinking was that no-fail-fast
is a label that also engineers can attach. We don't want to let them bypass approval though. CI-workloads make use of no-fail-fast
but also get an express lane on the CI. So it's two different mechanisms that we need
Signed-off-by: oliver könig <okoenig@nvidia.com>
* ci: Improve no-fail-fast mechanism Signed-off-by: oliver könig <okoenig@nvidia.com> * f Signed-off-by: oliver könig <okoenig@nvidia.com> * maybe like this? Signed-off-by: oliver könig <okoenig@nvidia.com> * test Signed-off-by: oliver könig <okoenig@nvidia.com> * fix Signed-off-by: oliver könig <okoenig@nvidia.com> * fix Signed-off-by: oliver könig <okoenig@nvidia.com> * test Signed-off-by: oliver könig <okoenig@nvidia.com> * test Signed-off-by: oliver könig <okoenig@nvidia.com> * test Signed-off-by: oliver könig <okoenig@nvidia.com> * fix Signed-off-by: oliver könig <okoenig@nvidia.com> * jobs Signed-off-by: oliver könig <okoenig@nvidia.com> * revert debugging Signed-off-by: oliver könig <okoenig@nvidia.com> * test Signed-off-by: oliver könig <okoenig@nvidia.com> * fix Signed-off-by: oliver könig <okoenig@nvidia.com> --------- Signed-off-by: oliver könig <okoenig@nvidia.com> Signed-off-by: Yuanzhe Dong <yudong@nvidia.com>
Important
The
Update branch
button must only be pressed in very rare occassions.An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.
What does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Collection: [Note which collection this PR will affect]
Changelog
Usage
# Add a code snippet demonstrating how to use this
GitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information