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

support triggering only failed jobs in a github workflow #31132

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

akhilerm
Copy link
Member

Add support to trigger only the failed jobs and its dependents in a workflow run. This will make sure that all the jobs are not retriggered on a /retest command, and only the failed jobs will be rerun

Ref: https://docs.github.com/en/rest/actions/workflow-runs#re-run-failed-jobs-from-a-workflow-run

Fix: #30713

Add support to trigger only the failed jobs and its dependents in a
workflow run. This will make sure that all the jobs are not
retriggered on a /retest command, and only the failed jobs will be
rerun

Ref: https://docs.github.com/en/rest/actions/workflow-runs#re-run-failed-jobs-from-a-workflow-run

Signed-off-by: Akhil Mohan <makhil@vmware.com>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 26, 2023
@k8s-ci-robot k8s-ci-robot added area/prow Issues or PRs related to prow area/prow/plugins Issues or PRs related to prow's plugins for the hook component sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Oct 26, 2023
@akhilerm
Copy link
Member Author

/retest

Copy link
Contributor

@matthyx matthyx left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 29, 2023
Copy link
Member

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot
Copy link
Contributor

@samuelkarp: changing LGTM is restricted to collaborators

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

@MadhavJivrajani MadhavJivrajani left a comment

Choose a reason for hiding this comment

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

/approve
Thank you @akhilerm!

Also - I noticed that we don't have tests for triggering GitHub workflows, it might be worth looking into what that would look like sometime in the future.

@MadhavJivrajani
Copy link
Contributor

/assign @petr-muller
for approval

Copy link
Member

@petr-muller petr-muller left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akhilerm, MadhavJivrajani, matthyx, petr-muller, samuelkarp

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 21, 2023
@k8s-ci-robot k8s-ci-robot merged commit 4e39ac2 into kubernetes:master Nov 21, 2023
@akhilerm akhilerm deleted the trigger-failed-workflow branch November 21, 2023 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/prow/plugins Issues or PRs related to prow's plugins for the hook component area/prow Issues or PRs related to prow cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

trigger_github_workflows retriggers all workflows on retest instead of failed jobs
6 participants