From 1ffd82669355c972d7fbea63eb1a8ff8d40a7271 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Mon, 16 Nov 2026 09:52:18 +0100 Subject: [PATCH 1/3] chore: add the shared DIRACGrid Renovate config preset --- renovate-config.json5 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 renovate-config.json5 diff --git a/renovate-config.json5 b/renovate-config.json5 new file mode 100644 index 0000000..b543160 --- /dev/null +++ b/renovate-config.json5 @@ -0,0 +1,30 @@ +{ + $schema: "https://docs.renovatebot.com/renovate-schema.json", + description: "DIRACGrid default Renovate policy. Repos adopt it with: \"extends\": [\"local>DIRACGrid/.github//renovate-config\"].", + extends: ["config:recommended", "helpers:pinGitHubActionDigests"], + // Supply-chain protection: do not adopt releases younger than 7 days. + // Repos watching ghcr.io images may override this per packageRule: ghcr.io + // exposes no release timestamps, so a minimumReleaseAge blocks those updates + // entirely (see the diracx-charts config for an example). + minimumReleaseAge: "7 days", + packageRules: [ + { + description: "Group all GitHub Actions updates together", + matchManagers: ["github-actions"], + groupName: "GitHub Actions", + labels: ["dependencies", "github-actions"], + }, + { + description: "Handle major version updates separately, never automerge", + matchUpdateTypes: ["major"], + groupName: "Major version updates", + labels: ["breaking-change"], + automerge: false, + }, + { + description: "Never automerge by default (repos may re-enable it per package)", + matchUpdateTypes: ["minor", "patch", "pin", "digest"], + automerge: false, + }, + ], +} From ff0cd9201900ff7226fe2421dafb108a1bbbb6a6 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Mon, 16 Nov 2026 10:03:31 +0100 Subject: [PATCH 2/3] chore: keep pixi.lock files fresh in the shared Renovate preset --- renovate-config.json5 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/renovate-config.json5 b/renovate-config.json5 index b543160..7faae3b 100644 --- a/renovate-config.json5 +++ b/renovate-config.json5 @@ -7,7 +7,18 @@ // exposes no release timestamps, so a minimumReleaseAge blocks those updates // entirely (see the diracx-charts config for an example). minimumReleaseAge: "7 days", + // Keep pixi.lock files fresh: this is what makes dependency cooldowns + // enforceable in pixi-based repos (the lock is only touched via reviewed PRs). + lockFileMaintenance: { + enabled: true, + }, packageRules: [ + { + description: "Group pixi lockfile maintenance into a single PR", + matchUpdateTypes: ["lockFileMaintenance"], + matchManagers: ["pixi"], + groupName: "pixi lockfile maintenance", + }, { description: "Group all GitHub Actions updates together", matchManagers: ["github-actions"], From b79e823c04efd710a731c81ee6cee223660d4de9 Mon Sep 17 00:00:00 2001 From: aldbr Date: Mon, 16 Nov 2026 11:08:13 +0100 Subject: [PATCH 3/3] fix: make the shared Renovate preset loadable and its cooldown honest - Rename renovate-config.json5 to renovate-config.json: Renovate appends ".json" to a preset name without extension, so the documented `local>DIRACGrid/.github//renovate-config` never found the .json5 file. - Drop the pixi-only lockFileMaintenance group: the pep621 manager also refreshes pixi.lock (via [tool.pixi]), so the group split one refresh into two PRs (diracx#1174 and #1175 touch the same pixi.lock). - State that lock file maintenance skips minimumReleaseAge; the cooldown for transitive deps is pixi's `exclude-newer = "7d"`. Do not refresh npm lock files, which have no rolling equivalent. - Exempt DIRACGrid's own Actions, reusable workflows and images from the cooldown: refs pinned to a branch have no timestamp and were blocked forever under timestamp-required. - Drop the "Major version updates" group (it bundled every major in one PR; Renovate already separates majors per dependency) and the no-op automerge: false rules (they also overrode a repo-level automerge). - Use labels + addLabels so rules add labels instead of replacing them. - Add :configMigration, and a workflow validating the preset as repo config, since every repo breaks at once if it is invalid. Assisted-by: Claude:claude-opus-5-5 --- .github/workflows/renovate-config.yml | 36 +++++++++++++++++++++++ renovate-config.json | 37 ++++++++++++++++++++++++ renovate-config.json5 | 41 --------------------------- 3 files changed, 73 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/renovate-config.yml create mode 100644 renovate-config.json delete mode 100644 renovate-config.json5 diff --git a/.github/workflows/renovate-config.yml b/.github/workflows/renovate-config.yml new file mode 100644 index 0000000..e957767 --- /dev/null +++ b/.github/workflows/renovate-config.yml @@ -0,0 +1,36 @@ +name: Validate Renovate preset + +on: + pull_request: + paths: + - renovate-config.json + - .github/workflows/renovate-config.yml + push: + branches: [main] + paths: + - renovate-config.json + - .github/workflows/renovate-config.yml + +permissions: {} + +jobs: + validate: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: 24 + # Every DIRACGrid repo extends this file: a broken preset breaks Renovate everywhere at once. + # Copied to renovate.json so it is checked as repository config, which is how repos consume it + # (given an arbitrary file name, the validator checks it as global config instead). + - name: Validate renovate-config.json + run: | + mkdir "$RUNNER_TEMP/preset" + cp renovate-config.json "$RUNNER_TEMP/preset/renovate.json" + cd "$RUNNER_TEMP/preset" + npx --yes --package renovate@44.243.0 -- renovate-config-validator --strict diff --git a/renovate-config.json b/renovate-config.json new file mode 100644 index 0000000..353005a --- /dev/null +++ b/renovate-config.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "description": [ + "DIRACGrid default Renovate policy.", + "Adopt with: {\"extends\": [\"local>DIRACGrid/.github//renovate-config\"]}.", + "Repos with maintained release branches also set baseBranchPatterns, e.g. [\"$default\", \"/^rel-/\"]." + ], + "extends": [ + "config:recommended", + "helpers:pinGitHubActionDigests", + ":configMigration" + ], + "labels": ["dependencies"], + "minimumReleaseAge": "7 days", + "lockFileMaintenance": { + "enabled": true + }, + "packageRules": [ + { + "description": "Do not hold back our own Actions, reusable workflows and images: the cooldown is for third-party code, and our refs pinned to a branch (e.g. `@ # main`) have no release timestamp, so the cooldown would block their digest updates forever.", + "matchPackageNames": ["DIRACGrid/**", "ghcr.io/diracgrid/**"], + "minimumReleaseAge": null + }, + { + "description": "Group all GitHub Actions updates together.", + "matchManagers": ["github-actions"], + "groupName": "GitHub Actions", + "addLabels": ["github-actions"] + }, + { + "description": "Lock file maintenance re-resolves everything to the newest version and skips minimumReleaseAge, so only the package manager can enforce a cooldown. pixi does it with `exclude-newer = \"7d\"` in pixi.toml / [tool.pixi.workspace] (set it in every pixi repo); npm has no rolling equivalent, so its lock files are not refreshed blindly.", + "matchManagers": ["npm"], + "matchUpdateTypes": ["lockFileMaintenance"], + "enabled": false + } + ] +} diff --git a/renovate-config.json5 b/renovate-config.json5 deleted file mode 100644 index 7faae3b..0000000 --- a/renovate-config.json5 +++ /dev/null @@ -1,41 +0,0 @@ -{ - $schema: "https://docs.renovatebot.com/renovate-schema.json", - description: "DIRACGrid default Renovate policy. Repos adopt it with: \"extends\": [\"local>DIRACGrid/.github//renovate-config\"].", - extends: ["config:recommended", "helpers:pinGitHubActionDigests"], - // Supply-chain protection: do not adopt releases younger than 7 days. - // Repos watching ghcr.io images may override this per packageRule: ghcr.io - // exposes no release timestamps, so a minimumReleaseAge blocks those updates - // entirely (see the diracx-charts config for an example). - minimumReleaseAge: "7 days", - // Keep pixi.lock files fresh: this is what makes dependency cooldowns - // enforceable in pixi-based repos (the lock is only touched via reviewed PRs). - lockFileMaintenance: { - enabled: true, - }, - packageRules: [ - { - description: "Group pixi lockfile maintenance into a single PR", - matchUpdateTypes: ["lockFileMaintenance"], - matchManagers: ["pixi"], - groupName: "pixi lockfile maintenance", - }, - { - description: "Group all GitHub Actions updates together", - matchManagers: ["github-actions"], - groupName: "GitHub Actions", - labels: ["dependencies", "github-actions"], - }, - { - description: "Handle major version updates separately, never automerge", - matchUpdateTypes: ["major"], - groupName: "Major version updates", - labels: ["breaking-change"], - automerge: false, - }, - { - description: "Never automerge by default (repos may re-enable it per package)", - matchUpdateTypes: ["minor", "patch", "pin", "digest"], - automerge: false, - }, - ], -}