chore(ci): run ci checks conditionally#16982
Conversation
This should prevent docs changes from having the need to run e2e tests etc, and prevent backend changes from needing to run ui tests, and vice versa. This is similar to previous attempts (see argoproj#16706 and argoproj#13507), with the difference here that we add the if checks on each _step_ rather than each _job_ - the reason being that most of these jobs are required, and if we skip whole jobs any PR which does this will be left hanging indefinitely, so Github forces us to do this on a step level instead. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
terrytangyuan
left a comment
There was a problem hiding this comment.
Sounds great. We’ve taken a similar approach for Workflows as well
|
I commented on Slack too; as Terry said I had a PR for Workflows for this a couple months ago: argoproj/argo-workflows#12006 All the step-level Overall I think the skips have been a huge boon as lots of PRs no longer run all E2E tests, for instance, which means flakey tests don't affect them and the CI finishes much faster. |
|
@blakepettersson According to the Github docs, if a job is skipped, it won't be required.
So as long as we skip the jobs, they shouldn't block merging. |
Try conditional jobs, according to https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
@todaywasawesome it doesn't seem to be the case with c37ed7d 😞
|
This is a workaround for the e2e tests which do not run yet report `pending` when they are actually skipped. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
|
@todaywasawesome it seems like the tests which never completes are only the matrix tests - but the solution with @agilgur5 has seems to do the trick, assuming we modify the |
yea indeed matrices are an exception. In my PR, I referenced issues actions/runner#952 and https://github.com/orgs/community/discussions/9141 and the workaround from https://github.com/orgs/community/discussions/9141#discussioncomment-2296809 and https://github.com/orgs/community/discussions/26822#discussioncomment-3305794. also jobs that depend on skipped jobs can have gotchas as well, which is why I modified
confirming that is one of the requirements as well. I had to ask Terry to change the checks for Workflows since I didn't/don't have that access either. also noting that due to the new checks, some PRs will also have to be rebased as well in order to run the new jobs. PRs with checks already passing I believe are fine, but any future runs will require those. |
ishitasequeira
left a comment
There was a problem hiding this comment.
This looks great. LGTM!!
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
|
@ishitasequeira (or @rbreeze or some other maintainer) - for this to be able to be merged we need to remove the required checks on the E2E test checks. Once this PR has been merged we'd then need to set the |
ishitasequeira
left a comment
There was a problem hiding this comment.
@blakepettersson , unfortunately I do not seem to have permissions to update the setting. Most likely someone with owner permissions might be able to update that.
@alexmt can you help with updating the setting?
Related to argoproj#16982. In order for the steps to properly run, we need to set `needs: changes` on them. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Related to argoproj#16982. In order for the steps to properly run, we need to set `needs: changes` on them. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
* chore(ci): run ci checks conditionally This should prevent docs changes from having the need to run e2e tests etc, and prevent backend changes from needing to run ui tests, and vice versa. This is similar to previous attempts (see argoproj#16706 and argoproj#13507), with the difference here that we add the if checks on each _step_ rather than each _job_ - the reason being that most of these jobs are required, and if we skip whole jobs any PR which does this will be left hanging indefinitely, so Github forces us to do this on a step level instead. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): run ci checks conditionally Try conditional jobs, according to https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): add composite test-e2e action This is a workaround for the e2e tests which do not run yet report `pending` when they are actually skipped. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> --------- Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> Co-authored-by: Remington Breeze <remington@breeze.software> Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
* chore(ci): run ci checks conditionally This should prevent docs changes from having the need to run e2e tests etc, and prevent backend changes from needing to run ui tests, and vice versa. This is similar to previous attempts (see argoproj#16706 and argoproj#13507), with the difference here that we add the if checks on each _step_ rather than each _job_ - the reason being that most of these jobs are required, and if we skip whole jobs any PR which does this will be left hanging indefinitely, so Github forces us to do this on a step level instead. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): run ci checks conditionally Try conditional jobs, according to https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): add composite test-e2e action This is a workaround for the e2e tests which do not run yet report `pending` when they are actually skipped. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> --------- Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> Co-authored-by: Remington Breeze <remington@breeze.software> Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
* chore(ci): run ci checks conditionally This should prevent docs changes from having the need to run e2e tests etc, and prevent backend changes from needing to run ui tests, and vice versa. This is similar to previous attempts (see argoproj#16706 and argoproj#13507), with the difference here that we add the if checks on each _step_ rather than each _job_ - the reason being that most of these jobs are required, and if we skip whole jobs any PR which does this will be left hanging indefinitely, so Github forces us to do this on a step level instead. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): run ci checks conditionally Try conditional jobs, according to https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): add composite test-e2e action This is a workaround for the e2e tests which do not run yet report `pending` when they are actually skipped. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> --------- Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> Co-authored-by: Remington Breeze <remington@breeze.software> Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com> Signed-off-by: Adrian Aneci <aneci@adobe.com>
* chore(ci): run ci checks conditionally This should prevent docs changes from having the need to run e2e tests etc, and prevent backend changes from needing to run ui tests, and vice versa. This is similar to previous attempts (see argoproj#16706 and argoproj#13507), with the difference here that we add the if checks on each _step_ rather than each _job_ - the reason being that most of these jobs are required, and if we skip whole jobs any PR which does this will be left hanging indefinitely, so Github forces us to do this on a step level instead. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): run ci checks conditionally Try conditional jobs, according to https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): add composite test-e2e action This is a workaround for the e2e tests which do not run yet report `pending` when they are actually skipped. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> --------- Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> Co-authored-by: Remington Breeze <remington@breeze.software> Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com> Signed-off-by: penglongli <pelenli@tencent.com>
* chore(ci): run ci checks conditionally This should prevent docs changes from having the need to run e2e tests etc, and prevent backend changes from needing to run ui tests, and vice versa. This is similar to previous attempts (see argoproj#16706 and argoproj#13507), with the difference here that we add the if checks on each _step_ rather than each _job_ - the reason being that most of these jobs are required, and if we skip whole jobs any PR which does this will be left hanging indefinitely, so Github forces us to do this on a step level instead. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): run ci checks conditionally Try conditional jobs, according to https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): add composite test-e2e action This is a workaround for the e2e tests which do not run yet report `pending` when they are actually skipped. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> --------- Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> Co-authored-by: Remington Breeze <remington@breeze.software> Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com> Signed-off-by: Kevin Lyda <kevin@lyda.ie>
* chore(ci): run ci checks conditionally This should prevent docs changes from having the need to run e2e tests etc, and prevent backend changes from needing to run ui tests, and vice versa. This is similar to previous attempts (see argoproj#16706 and argoproj#13507), with the difference here that we add the if checks on each _step_ rather than each _job_ - the reason being that most of these jobs are required, and if we skip whole jobs any PR which does this will be left hanging indefinitely, so Github forces us to do this on a step level instead. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): run ci checks conditionally Try conditional jobs, according to https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): add composite test-e2e action This is a workaround for the e2e tests which do not run yet report `pending` when they are actually skipped. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> --------- Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> Co-authored-by: Remington Breeze <remington@breeze.software> Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>
* chore(ci): run ci checks conditionally This should prevent docs changes from having the need to run e2e tests etc, and prevent backend changes from needing to run ui tests, and vice versa. This is similar to previous attempts (see argoproj#16706 and argoproj#13507), with the difference here that we add the if checks on each _step_ rather than each _job_ - the reason being that most of these jobs are required, and if we skip whole jobs any PR which does this will be left hanging indefinitely, so Github forces us to do this on a step level instead. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): run ci checks conditionally Try conditional jobs, according to https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> * chore(ci): add composite test-e2e action This is a workaround for the e2e tests which do not run yet report `pending` when they are actually skipped. Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> --------- Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com> Co-authored-by: Remington Breeze <remington@breeze.software> Co-authored-by: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com>

This should prevent docs changes from having the need to run e2e tests etc, and prevent backend changes from needing to run ui tests, and vice versa.
This is similar to previous attempts (see #16706 and #13507), with the difference here that we add
the if checks on each step rather than each job - the reason being that most of these jobs are required, and if we skip whole jobs any PR which does this will be left hanging indefinitely, so Github forces us to do this on a step level insteada composite job is added which checks the aggregated status of the matrix jobs, any of which can either be skipped, passed or failed. If they are skipped or passed, the composite job passes, otherwise it's marked as failed.Once this is merged, a maintainer will need to switch the required check to the composite job for this to work.
Checklist: