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

CI: cancel workflows when PRs are updated #16562

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

behlendorf
Copy link
Contributor

@behlendorf behlendorf commented Sep 24, 2024

Motivation and Context

We want to cancel in-progress workflows for PRs which are updated to ensure the workers are testing useful changes. At the same time we always want to fully test changes which are merged to a branch.

@mcmilk @rincebrain I think this should handle the case mentioned in #16537 (comment).

Description

For checkstyle, zloop, zfs-qemu, and codeql workflows cancel in-progress jobs when the PR is updated.

Directly from GitHub Actions documentation:

The following concurrency group cancels in-progress jobs or run
on pull_request events only; if github.head_ref is undefined, the
concurrency group will fallback to the run ID, which is guaranteed
to be both unique and defined for the run.

https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value

How Has This Been Tested?

It hasn't. This is change is solely based on the example in the GitHub documentation.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

@behlendorf behlendorf added Component: Test Suite Indicates an issue with the test framework or a test case Status: Code Review Needed Ready for review and testing labels Sep 24, 2024
@behlendorf behlendorf marked this pull request as draft September 24, 2024 00:14
behlendorf added a commit to behlendorf/zfs that referenced this pull request Sep 24, 2024
For zloop, zfs-qemu, and codeql workflows cancel in-progress jobs
when the PR is updated.  We always let the style checker run
since it only takes a few minutes to complete.

Relevant GitHub Actions documentation:

  The following concurrency group cancels in-progress jobs or run
  on pull_request events only; if github.head_ref is undefined, the
  concurrency group will fallback to the run ID, which is guaranteed
  to be both unique and defined for the run.

https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#16562
@behlendorf behlendorf marked this pull request as ready for review September 24, 2024 05:05
behlendorf added a commit to behlendorf/zfs that referenced this pull request Sep 24, 2024
For zloop, zfs-qemu, and codeql workflows cancel in-progress jobs
when the PR is updated.  We always let the style checker run
since it only takes a few minutes to complete.

Relevant GitHub Actions documentation:

  The following concurrency group cancels in-progress jobs or run
  on pull_request events only; if github.head_ref is undefined, the
  concurrency group will fallback to the run ID, which is guaranteed
  to be both unique and defined for the run.

https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#16562
For checkstyle, zloop, zfs-qemu, and codeql workflows cancel
in-progress jobs when the PR is updated.

Relevant GitHub Actions documentation:

  The following concurrency group cancels in-progress jobs or run
  on pull_request events only; if github.head_ref is undefined, the
  concurrency group will fallback to the run ID, which is guaranteed
  to be both unique and defined for the run.

https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#16562
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Sep 24, 2024
@behlendorf behlendorf merged commit 4b5fbf7 into openzfs:master Sep 24, 2024
3 of 4 checks passed
@gmelikov gmelikov mentioned this pull request Nov 1, 2024
13 tasks
robn pushed a commit to robn/zfs that referenced this pull request Nov 5, 2024
For checkstyle, zloop, zfs-qemu, and codeql workflows cancel
in-progress jobs when the PR is updated.

Relevant GitHub Actions documentation:

  The following concurrency group cancels in-progress jobs or run
  on pull_request events only; if github.head_ref is undefined, the
  concurrency group will fallback to the run ID, which is guaranteed
  to be both unique and defined for the run.

https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#16562
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Test Suite Indicates an issue with the test framework or a test case Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant