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
.github: Fix concurrency group comment triggers #16310
Merged
twpayne
merged 2 commits into
cilium:master
from
pchaigno:fix-concurrency-group-comment-triggers
May 26, 2021
Merged
.github: Fix concurrency group comment triggers #16310
twpayne
merged 2 commits into
cilium:master
from
pchaigno:fix-concurrency-group-comment-triggers
May 26, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Commit 7e953b9 (".github: Cancel outdated comment workflows") introduced concurrency groups for workflows triggered by comments. In each concurrency group, a single workflow can be running at any time, with previous workflows cancelled when more recent are scheduled. However, in the context of comment-triggered workflows, a workflow is triggered for every single comment in the pull request. The actual tests on the other hand are only triggered for specific comments. But even if those comments don't contain a phrase that triggers the test (e.g., test-me-please or ci-gke), they will cancel previously-running workflows. To fix this, we need to ensure that the concurrency group with comments that trigger tests does not include any comments which don't trigger tests. We can achieve that by appending the actual comment text to the concurrency group name. So for example, a comment with "test-me-please" on PR 12345 will trigger a workflow which belong to concurrency group: ConformanceEKS (ci-eks) cilium#12345 test-me-please If GKE tests are then triggered with ci-gke, the new workflow will belong to a second concurrency group and won't cancel the first: ConformanceEKS (ci-eks) cilium#12345 ci-gke That is probably okay since it will preserve most of the benefits of concurrency groups without cancelling everything as soon as someone posts a comment. Fixes: 7e953b9 (".github: Cancel outdated comment workflows") Signed-off-by: Paul Chaignon <paul@cilium.io>
pchaigno
added
kind/bug/CI
This is a bug in the testing code.
area/CI
Continuous Integration testing issue or flake
release-note/ci
This PR makes changes to the CI.
needs-backport/1.10
labels
May 25, 2021
pchaigno
changed the title
Fix concurrency group comment triggers
.github: Fix concurrency group comment triggers
May 25, 2021
nbusseneau
reviewed
May 25, 2021
christarazi
approved these changes
May 25, 2021
pchaigno
force-pushed
the
fix-concurrency-group-comment-triggers
branch
from
May 25, 2021 21:46
3895af8
to
15e051f
Compare
Commit 50df544 (".github: Skip unnecessary ci-xxx tests") introduced a new job in each of the comment-triggered workflows (ConformanceXXX) to inspect the code modified by pull requests and skip the end-to-end tests when possible. This commit copies the workflow conditions (i.e., scheduled on cilium/cilium or specific trigger phrase in comment) from the second job to the first in the workflow to ensure we also skip the new, first job when possible. As a consequence the first job won't run for every single comment posted on pull request. Even though that first job is very quick (~3s), it can quickly add up in busy hours. It also won't run in forks. The dependence of the second job on the first (via 'needs') already ensures the second job won't run if the first is skipped. Signed-off-by: Paul Chaignon <paul@cilium.io>
pchaigno
force-pushed
the
fix-concurrency-group-comment-triggers
branch
from
May 25, 2021 21:49
15e051f
to
5fe0069
Compare
nbusseneau
approved these changes
May 25, 2021
aanm
approved these changes
May 26, 2021
tklauser
approved these changes
May 26, 2021
tklauser
added
the
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
label
May 26, 2021
Removing the label for backport, the relevant parts of the GitHub actions are not in 1.10. |
@qmonnet If they are not, I think they should be added. Maybe a PR is missing its |
I can have a look at it tomorrow, and backport in a later PR if necessary. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/CI
Continuous Integration testing issue or flake
kind/bug/CI
This is a bug in the testing code.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/ci
This PR makes changes to the CI.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The first commit fixes the concurrency groups to avoid random PR comments cancelling ongoing end-to-end tests. The second commit enables skipping the
paths-filter
job when possible. See commit descriptions for details.Fixes: #16199.