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: run only sanity check on limited OSes for nonbehavioral changes #16564

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

Harry-Chen
Copy link
Contributor

@Harry-Chen Harry-Chen commented Sep 24, 2024

Motivation and Context

Some small and nonbehavioral changes (e.g. to documentation or manpages) do not need a full CI run.

Description

The commit uses some heuristics to determine whether a PR is behavioral:

It runs "quick" CI (i.e., only use sanity.run on fewer OSes) if (explicity required by user):

  • the last commit message contains a line 'ZFS-CI-Type: quick', or if (by heuristics):
  • the files changed are not in the list of specified directory, and
  • all commit messages does not contain 'ZFS-CI-Type: full'.

It runs "full" CI otherwise.

See: #16561 (comment)

How Has This Been Tested?

Tested in my own fork: https://github.com/Harry-Chen/zfs/actions/runs/11011261744

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)

(If enhancement to CI performance also counts.)

Checklist:

@Harry-Chen Harry-Chen force-pushed the reduce_ci_time branch 3 times, most recently from cae6107 to 47e9139 Compare September 24, 2024 09:46
@Harry-Chen
Copy link
Contributor Author

Since upstream is still struggling with insufficient runners, I created a PR in my fork. When using quick mode, zfs-qemu takes about 20 minutes * 7 platforms (and can certainly be further reduced): https://github.com/Harry-Chen/zfs/actions/runs/11011261744

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together to quickly. I'm no expert on GitHub Actions but this makes sense to me and should take some load off the builders. I'm sure we'll continue to refine and needed. Just a couple small nits from me.

.github/CONTRIBUTING.md Outdated Show resolved Hide resolved
.github/workflows/scripts/generate-ci-type.py Outdated Show resolved Hide resolved
.github/workflows/scripts/generate-ci-type.py Outdated Show resolved Hide resolved
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Sep 24, 2024
The commit uses heuristics to determine whether a PR is behavioral:

It runs "quick" CI (i.e., only use sanity.run on fewer OSes)
if (explicity required by user):
- the *last* commit message contains a line 'ZFS-CI-Type: quick',
or if (by heuristics):
- the files changed are not in the list of specified directory, and
- all commit messages does not contain 'ZFS-CI-Type: full'.

It runs "full" CI otherwise.

See: openzfs#16561 (comment)
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
@Harry-Chen Harry-Chen changed the title CI: run only sanity check on limited OSes when changes are trivial CI: run only sanity check on limited OSes for nonbehavioral changes Sep 25, 2024
@Harry-Chen
Copy link
Contributor Author

@behlendorf All suggestions applied. I also changed my wording from "trivial" to "nonbehavioral". Documentation & other stuff are also important to this project :-)

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Sep 25, 2024
@behlendorf behlendorf merged commit 05a7a95 into openzfs:master Sep 25, 2024
14 checks passed
@Harry-Chen Harry-Chen deleted the reduce_ci_time branch September 27, 2024 16:55
robn pushed a commit to robn/zfs that referenced this pull request Nov 5, 2024
The commit uses heuristics to determine whether a PR is behavioral:

It runs "quick" CI (i.e., only use sanity.run on fewer OSes)
if (explicitly requested by user):
- the *last* commit message contains a line 'ZFS-CI-Type: quick',
or if (by heuristics):
- the files changed are not in the list of specified directory, and
- all commit messages does not contain 'ZFS-CI-Type: full'.

It runs "full" CI otherwise.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Closes openzfs#16564
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants