Skip to content

chore: enable Renovate's pre-commit manager in the shared preset - #8

Merged
aldbr merged 2 commits into
DIRACGrid:mainfrom
fstagni:precommit-manager
Nov 17, 2026
Merged

aldbr merged 2 commits into
DIRACGrid:mainfrom
fstagni:precommit-manager

Conversation

@fstagni

@fstagni fstagni commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Part of #5.

Renovate disables the pre-commit manager by default, so the hook revs pinned in .pre-commit-config.yaml never get update PRs — while the GitHub Actions in the same repos are digest-pinned and Renovate-managed. Several repos still pin 2023-era hooks (black 23.1.0, flynt 0.77, pyupgrade v3.3.1) that predate the removal of ast.Str in Python 3.12 and crash on current runner Pythons (already seen in diraccfg, where the CI pre-commit job had to pin Python 3.11 as a workaround).

Audit of how hook updates are done today:

  • diracx: the pre-commit.ci app posts weekly [pre-commit.ci] pre-commit autoupdate PRs — hooks are fresh, no Renovate manager needed
  • diracx-charts: the app is installed (last autoupdate Dec 2025)
  • intercede, signurlarity, diracx-charts: only pre-commit-ci/lite-action (runs hooks, no update mechanism)
  • everyone else (DB12, DIRAC, DIRACOS2, diraccfg, diracgrid.org, mkdocs-diracx-plugin, WebAppDIRAC, Pilot, .github, container-images): nothing — revs frozen

Enabling the manager once here covers all preset adopters; it is a no-op for repos without .pre-commit-config.yaml. Repos where the pre-commit.ci app already does the autoupdates (diracx, diracx-charts) should disable it per-repo to avoid duplicate update PRs.

Note: expect a first wave of hook-update PRs in the stale repos (e.g. black 23.1.0 → 26.x on DIRAC integration is a large formatting change), and release branches with baseBranchPatterns will get them too — hold those back per-repo if unwanted.

Also in this PR (22fdd9c):

  • all pre-commit hook updates are grouped in one pre-commit hooks PR per repo (otherwise one PR per hook: 4 in diraccfg, 6 in DIRAC, 7 in WebAppDIRAC).
  • third-party Actions pinned to a branch (e.g. pypa/gh-action-pypi-publish@<sha> # release/v1) have no release timestamp, so with the default minimumReleaseAgeBehaviour: timestamp-required their digest updates were held forever (docs). They now use timestamp-optional; versioned refs (# v4.2.0) keep the 7-day cooldown.

Renovate disables the pre-commit manager by default, so the hook revs
pinned in .pre-commit-config.yaml never get update PRs. Several repos
still pin 2023-era hooks (black 23.1.0, flynt 0.77, pyupgrade v3.3.1)
that predate the removal of ast.Str in Python 3.12 and crash on the
current runner Pythons.

Repos where the pre-commit.ci app already does the autoupdates (diracx,
diracx-charts) disable this per-repo to avoid duplicate update PRs.

Part of DIRACGrid#5.
fstagni added a commit to fstagni/diracx that referenced this pull request Nov 17, 2026
…autoupdates

The shared preset enables Renovate's pre-commit manager (DIRACGrid/.github#8),
but the pre-commit.ci app already posts the weekly 'pre-commit autoupdate'
PRs here. Disable the manager per-repo to avoid duplicate update PRs.

Part of DIRACGrid/.github#5.
fstagni added a commit to fstagni/DIRAC that referenced this pull request Nov 17, 2026
Same pattern as the other DIRACGrid repositories (intercede,
signurlarity, diracx-charts, diracx): pre-commit/action runs the hooks
and pre-commit-ci/lite-action pushes auto-fixes to PR branches. Hook
rev updates come from Renovate's pre-commit manager (DIRACGrid/.github#8).

Python stays pinned to 3.11 until the pinned hooks (flynt 0.77,
pyupgrade v3.3.1, black 23.1.0) are updated, as they predate the removal
of ast.Str in Python 3.12.

Part of DIRACGrid/.github#5.
fstagni added a commit to fstagni/WebAppDIRAC that referenced this pull request Nov 17, 2026
Same pattern as the other DIRACGrid repositories (intercede,
signurlarity, diracx-charts, diracx): pre-commit/action runs the hooks
and pre-commit-ci/lite-action pushes auto-fixes to PR branches. Hook
rev updates come from Renovate's pre-commit manager (DIRACGrid/.github#8).

Python stays pinned to 3.11 until the pinned hooks (flynt 0.77,
pyupgrade v3.10.1, black 23.7.0) are updated, as they predate the
removal of ast.Str in Python 3.12.

Part of DIRACGrid/.github#5.
aldbr added a commit to fstagni/diraccfg that referenced this pull request Nov 17, 2026
The shared preset enables it for every adopter (DIRACGrid/.github#8).

Assisted-by: Claude:claude-opus-5-5
- one grouped PR for all pre-commit hook updates instead of one per hook
- digest updates of third-party Actions pinned to a branch (e.g.
  pypa/gh-action-pypi-publish # release/v1) have no release timestamp,
  so minimumReleaseAge held them forever; let them through while
  versioned refs keep the cooldown

Assisted-by: Claude:claude-opus-5-5
@aldbr
aldbr merged commit b9f51cf into DIRACGrid:main Nov 17, 2026
2 checks passed
aldbr added a commit to fstagni/diracx that referenced this pull request Nov 17, 2026
pre-commit.ci already opens the weekly hook autoupdate PRs in this repo,
so Renovate's pre-commit manager (enabled in the shared preset by
DIRACGrid/.github#8) would only duplicate them.

Assisted-by: Claude:claude-opus-5-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants