diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 846b12117..ecbd2a2c2 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -4,35 +4,44 @@ 'config:recommended', 'helpers:pinGitHubActionDigests', ], - // config:recommended turns on every default manager, which would also open - // PRs for the ~20 pyproject.toml files (rewriting requires-python etc.) that - // we don't want Renovate touching. Limit it to exactly what this config - // targets: the custom managers for crossplane-project.yaml, the Renovate - // version in renovate.yml and the Nix version in renovate-entrypoint.sh, - // GitHub Actions, and the Nix flakes (inputs plus flake.lock via - // lockFileMaintenance below). + // Renovate runs every manager that's on by default. Limit it to exactly what + // this config targets: the custom managers for crossplane-project.yaml, the + // Renovate version in renovate.yml and the Nix version in + // renovate-entrypoint.sh, GitHub Actions, the Nix flakes (inputs plus + // flake.lock via lockFileMaintenance below), and vulnerability fixes for Go + // modules and uv.lock. enabledManagers: [ 'custom.regex', 'github-actions', + 'gomod', 'nix', + 'pep621', ], + // Renovate opens PRs to fix the repository's Dependabot alerts, forcing this + // object onto the dependency each alert matches. Setting enabled here is + // what lets those fixes past the package rule below that disables gomod and + // pep621. + vulnerabilityAlerts: { + enabled: true, + }, + // config:recommended ignores tests/ directories, which would hide the Go + // module under functions/compose-model-deployment/tests/oracle from + // vulnerability fixes. + gomod: { + ignorePaths: [], + }, // The Nix manager is disabled by default. Enable it (together with // lockFileMaintenance) so Renovate keeps flake.lock fresh. Renovate // installs its own Nix to apply those updates. nix: { enabled: true, }, - // Lock file maintenance defaults to 'before 4am on monday', which the - // workflow's daily 08:00 UTC run never falls in. lockFileMaintenance: { enabled: true, - schedule: [ - '* * * * 1', - ], }, // CONTRIBUTING forbids typed commit prefixes like chore(deps):. Disable // explicitly rather than relying on the 'auto' default, which sniffs - // recent history and could flip on from Dependabot's build(deps): commits. + // recent history and could flip on from any typed commits in it. semanticCommits: 'disabled', rebaseWhen: 'auto', rebaseLabel: 'rebase', @@ -44,6 +53,17 @@ 'automated', ], packageRules: [ + { + // gomod and pep621 are enabled only to fix vulnerabilities. Their + // routine updates would open PRs for every pyproject.toml (rewriting + // requires-python etc.), and pep621's lock file maintenance would + // refresh all of uv.lock. + matchManagers: [ + 'gomod', + 'pep621', + ], + enabled: false, + }, { matchFileNames: [ '.github/**', diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d2b02587b..04ae0d493 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,8 +13,8 @@ jobs: # until they're marked ready for review. The ready_for_review trigger above # re-runs this job when that happens. # - # The checklist is a human attestation, so skip it for bot PRs (Renovate, - # Dependabot) whose bodies don't carry the template. GitHub counts a + # The checklist is a human attestation, so skip it for bot PRs, such as + # Renovate's, whose bodies don't carry the template. GitHub counts a # skipped required check as passed, keeping those PRs mergeable. if: | github.event.pull_request.draft == false && diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 51b4b2b78..0f91b4cd4 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -9,7 +9,17 @@ on: default: "info" type: string schedule: - - cron: '0 8 * * *' + # Hourly, so a vulnerability alert gets its fix PR within about an hour. + # Not on the hour, when GitHub delays and sometimes drops scheduled runs. + # Lock file maintenance relies on some runs falling within its default + # schedule, before 4am on Monday. + - cron: '17 * * * *' + +# A run can outlast the hour, since the postUpgradeTask build alone may take up +# to RENOVATE_EXECUTION_TIMEOUT. Queue the next run rather than let two push to +# the same branches. +concurrency: + group: ${{ github.workflow }} permissions: contents: read