Skip to content
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

workflows: Fix change detection of comment-triggered jobs #17171

Merged
merged 2 commits into from Aug 17, 2021

Conversation

pchaigno
Copy link
Member

Commit 98e6ea4 ("workflows: Improve the change check for issue_comment triggers") modified the change detection logic of comment-triggered jobs to use a more appropriate base commit. It used the github.event.pull_request.commits_url context to retrieve the list of commits. However, this context is not available to comment-triggered jobs and the jobs are therefore failing.

Instead, we need to retrieve the commits_url from the pull request API object, which we are already downloading.

Fixes: #16841.

Commit 98e6ea4 ("workflows: Improve the change check for issue_comment
triggers") modified the change detection logic of comment-triggered jobs
to use a more appropriate base commit. It used the
'github.event.pull_request.commits_url' context to retrieve the list of
commits. However, this context is not available to comment-triggered
jobs and the jobs are therefore failing.

Instead, we need to retrieve the commits_url from the pull request API
object, which we are already downloading.

Fixes: 98e6ea4 ("workflows: Improve the change check for issue_comment triggers")
Signed-off-by: Paul Chaignon <paul@cilium.io>
@pchaigno 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. labels Aug 16, 2021
@pchaigno pchaigno requested review from a team as code owners August 16, 2021 20:42
@pchaigno pchaigno requested a review from tklauser August 16, 2021 20:42
Commit 98e6ea4 ("workflows: Improve the change check for issue_comment
triggers") and its subsequent fix (see previous commit) missed the L4LB
workflow. This commit fixes it by applying the same modifications to the
L4LB workflow.

Fix: 98e6ea4 ("workflows: Improve the change check for issue_comment triggers")
Signed-off-by: Paul Chaignon <paul@cilium.io>
@pchaigno pchaigno added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Aug 16, 2021
@pchaigno
Copy link
Member Author

I tested the Bash changes manually and reviews are in. I've marked as ready to merge.

@ti-mo ti-mo merged commit 7b0b606 into master Aug 17, 2021
@ti-mo ti-mo deleted the pr/pchaigno/fix-comment-triggered-workflows branch August 17, 2021 08:17
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants