Improve CI (pin actions + Dependabot)#652
Conversation
Squashed some automated PRs: ======================================== Bump styfle/cancel-workflow-action in the gha-bump group Bumps the gha-bump group with 1 update: [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action). Updates `styfle/cancel-workflow-action` from 0.12.1 to 0.13.1 - [Release notes](https://github.com/styfle/cancel-workflow-action/releases) - [Commits](styfle/cancel-workflow-action@85880fa...d07a454) --- updated-dependencies: - dependency-name: styfle/cancel-workflow-action dependency-version: 0.13.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: gha-bump ... Signed-off-by: dependabot[bot] <support@github.com> ======================================== Bump actions/cache from 3.5.0 to 6.1.0 Bumps [actions/cache](https://github.com/actions/cache) from 3.5.0 to 6.1.0. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@6f8efc2...55cc834) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> ======================================== Bump actions/checkout from 4.4.0 to 7.0.1 Bumps [actions/checkout](https://github.com/actions/checkout) from 4.4.0 to 7.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@11d5960...3d3c42e) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> ======================================== Bump codecov/codecov-action from 5.5.5 to 7.0.0 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.5.5 to 7.0.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@0fb7174...fb8b358) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> ======================================== Bump conda-incubator/setup-miniconda from 3.3.0 to 4.0.1 Bumps [conda-incubator/setup-miniconda](https://github.com/conda-incubator/setup-miniconda) from 3.3.0 to 4.0.1. - [Release notes](https://github.com/conda-incubator/setup-miniconda/releases) - [Changelog](https://github.com/conda-incubator/setup-miniconda/blob/main/CHANGELOG.md) - [Commits](conda-incubator/setup-miniconda@fc2d68f...8ee1f36) --- updated-dependencies: - dependency-name: conda-incubator/setup-miniconda dependency-version: 4.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> ======================================== Merge pull request #1 from currocam/dependabot/github_actions/gha-bump-ca51f02dbf Bump styfle/cancel-workflow-action from 0.12.1 to 0.13.1 in the gha-bump group ======================================== Merge pull request #2 from currocam/dependabot/github_actions/actions/cache-6.1.0 Bump actions/cache from 3.5.0 to 6.1.0 ======================================== Merge pull request #3 from currocam/dependabot/github_actions/actions/checkout-7.0.1 Bump actions/checkout from 4.4.0 to 7.0.1 ======================================== Merge pull request #4 from currocam/dependabot/github_actions/codecov/codecov-action-7.0.0 Bump codecov/codecov-action from 5.5.5 to 7.0.0 ======================================== Merge pull request #5 from currocam/dependabot/github_actions/conda-incubator/setup-miniconda-4.0.1 Bump conda-incubator/setup-miniconda from 3.3.0 to 4.0.1
|
Hi @currocam! This all sounds sensible. I notice that your dependabot commit addresses only minor and patch updates. So if your plan that we would manually notice major updates to these tools and do them ourselves manually? Or am I misunderstanding? Seems like we probably want to shift forward onto major updates in an automated fashion too, but perhaps not squashed together with the minor/patch updates since we might want to actually think about the major ones (maybe). Yes, this makes the CI more complex, and no, I don't fully understand it all (and don't really want to :->). If you are happy to continue keeping things running for the foreseeable future, then I'm happy to adopt the full scheme you propose here. If not, I might think harder about it, since I don't like being on the hook to maintain things I don't understand. (But that is true when things break for unknown reasons, too, of course!) I think modulo your replies to these questions, I'm inclined to merge all of this. Thanks! |
|
(1) The dependabot addresses all updates, I think. What the config file declares is a special group that consists of all minor and patches. Sorry if the comment was not clear. The idea is that each major update gets its own PR (because presumably it breaks something), whereas all small changes are accumulated into a single PR to reduce the noise. Also, running the cron job each month sounds sensible to me, but pls adjust. |
|
OK, this all sounds great, thanks! Merged! You are a life-saver @currocam. :-> I'm actively working in the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #652 +/- ##
==========================================
- Coverage 75.86% 75.62% -0.24%
==========================================
Files 114 114
Lines 72808 72808
Branches 12877 12872 -5
==========================================
- Hits 55234 55064 -170
- Misses 17574 17744 +170 🚀 New features to boost your workflow:
|
Hello Ben,
I have recently learned a bit more about GitHub Actions working in a project of mine, and I have some ideas about how the current SLiM CI could be improved.
Before, there have been issues with CI suddenly failing (see #627, #498).
I’m decently sure now that those are triggered by either (1) some minor version being released (say, for example, changing from setup-msys2@v2.31.1 to setup-msys2@v2.32.0 or (2) someone updating a git tag. Note that currently CI sometimes does not pin to any specific version, e.g. actions/cache@v3, conda-incubator/setup-miniconda@v3, etc.
I propose we change the CI to point to specific commit hashes and follow the format
username/repository@commit_hash # tag name.I made that change in the first commit of this PR.
Possible automation
One would have to keep track of those dependencies and update them from time to time. One automation I've found very useful is dependabot. It's basically a cron job that opens PRs with the updated dependency. The automated PRs look like this (notice that they maintain the format
commit hash # version tagand have some useful information in the commit message)currocam#5
Ideally, one would merge those PR after running the updated CI, rather than unexpectedly finding it in red. The obvious downside is that this complicates the CI more.
Bump versions
To avoid creating many PRs at once and running CI many times, I’ve squashed all changes from the automated PRs, so the third commit bump all the GitHub Actions to the latest version. Feel free to cherry-pick which commit (if any) you would like to merge.
Best,
Curro