Repository navigation
ci: pin every action to a commit SHA and let Dependabot update them (#1968) - #1981
Conversation
…1968) - Every `uses:` of an action outside the repository now names the commit its tag resolved to, with the release as a `# vX.Y.Z` comment; each action keeps its current major line. - `.github/dependabot.yml` adds the `github-actions` ecosystem from `/`, weekly like `pip`, with dependabot's default labels. - `tests/_workflows.py` gains `pinned()` and `versions()`; the tests that named an action by tag now check the pin and its version comment. - `tests/project/test_actions_pinned_1968.py` fails on an unpinned `uses:` or a missing `github-actions` ecosystem. - Docs: an Action Pins section in workflows.rst, the pinned versions in releasing.rst, and dependabot's labels in conventions/process.rst.
|
GOOD TO GO at
|
|
i thought pinned at version is already enough? what else should Dependabot watch and update? |
|
Why a SHA and not a version. A tag such as What Dependabot watches. The
|
|
sure go with your suggestion. im thinking benchmark can probably be watched as well? we dont normally update those and they can easily drift. also, i think we had PyUp to do some of the dependency updates as well. might worth considering opt out that if Dependabot is already covering. |
|
Thanks. The SHA pins stay. Dependabot's |
…Up's updates (#1968) - `pip` in `.github/dependabot.yml` now lists `directories:` `/`, `/docs`, `/conda` and `/examples/benchmark`; a `docker` entry watches `/examples/benchmark`. - `.pyup.yml` sets a global `update: False` and drops its `requirements:` list, whose per-file default of `all` would override it. - workflows.rst gains a Dependency Updates section; process.rst names the `docker` label and PyUp's opt-out. - `test_actions_pinned_1968` pins the pip and docker directories and the PyUp opt-out; `test_conventions_doc_claims` expects the `docker` ecosystem.
|
Pushed
Two of my earlier suggestions turn out to buy nothing:
I'd drop both, keeping |
|
Sonnet delta review of
Three comments carry timed wording ("now", "next run"). They get fixed in the same round as your answer on dropping |
|
drop both, keeping /, /docs and /examples/benchmark for pip. |
|
Dropping the |
- `.github/dependabot.yml` drops the `docker` entry and `/conda` from the `pip` directories, keeping `/`, `/docs` and `/examples/benchmark`, and says why the two are left out. - workflows.rst and process.rst match, and the timed wording in `.pyup.yml`, workflows.rst and the pin's docstring goes. - `test_actions_pinned_1968` pins the three pip directories and the absence of `/conda` and `docker`; `test_conventions_doc_claims` expects `pip` and `github-actions` only.
|
Pushed |
|
GOOD TO GO at |
|
NEEDS CHANGES at |
|
Coverage: 91.52% (unit tier, Python 3.15,
Per-file detail: the |
- `test_workflow_apt_cache` finds the `actions/cache/restore` and `actions/cache/save` steps through `_workflows.PINNED`, so the pinned `@<sha> # vX.Y.Z` form is read instead of failing as `None`. - `test_ci_timing` reads its `actions/upload-artifact` steps the same way rather than with a regex of its own.
|
Pushed |
|
GOOD TO GO at |
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
ci— workflows or build toolingDescription of your pull request and other information
#1968 part 2. Every third-party
uses:is pinned to the commit its current tag points at, with an exact-version comment (@<sha> # v7.0.1), staying on the same major line. Dependabot gains a weeklygithub-actionsecosystem, so pins update by PR.create-release.ymlchanges in itsuses:lines only.tests/_workflows.pygainspinned()/versions(). The tests that hard-coded tags now check the pinned commit and its version comment.tests/project/test_actions_pinned_1968.pyfails on any unpinneduses:or a missing ecosystem. It fails onmainand passes here.workflows.rstgains an "Action Pins" section, andreleasing.rstandprocess.rstare updated.The
github-actionsentry has nolabels:key, like the pip entry, so Dependabot's defaults apply (dependencies,github_actions).actionlintis not installed locally, so it was not run.Refs #1968