fix(renovate): run the image bump task on every branch
Build / build (pull_request) Successful in 15s
Lint / lint (pull_request) Successful in 39s
Molecule / molecule (pull_request) Successful in 2s

The postUpgradeTasks lived in a packageRule matching package "*". Branch
renovate/pip-compile-refresh (a lock regeneration, no package upgrade) did not
get the task, so its requirements-dev.lock change reached the lint check
without the ci image version bump and failed `check_image_versions.py bump`.
A top-level postUpgradeTasks applies to every branch.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
This commit is contained in:
Defame1297andClaude Sonnet 5.5 committed 2026-11-16 07:13:53 +00:00
1 parent d774760d2a
commit bbb4f1f888
2 files changed
+15 -20

No files matched your search

+12 -18
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"description": "Run by .gitea/workflows/renovate.yml on the kamino-runner. Policy: automerge minor and patch, majors by hand. Every bot pull request must pass scripts/check_bot_pr_diff.py (lint workflow), which allows only version, tag, digest and pin lines. The image-input rule runs scripts/bump_image_versions.py as a postUpgradeTasks command (allowed by RENOVATE_ALLOWED_COMMANDS of .gitea/workflows/renovate.yml, where Renovate runs).",
"description": "Run by .gitea/workflows/renovate.yml on the kamino-runner. Policy: automerge minor and patch, majors by hand. Every bot pull request must pass scripts/check_bot_pr_diff.py (lint workflow), which allows only version, tag, digest and pin lines. The top-level postUpgradeTasks runs scripts/bump_image_versions.py on every branch, lock refreshes included, which carry no package a packageRule could match (allowed by RENOVATE_ALLOWED_COMMANDS of .gitea/workflows/renovate.yml, where Renovate runs).",
"extends": [
"config:recommended",
":enablePreCommit"
@@ -22,6 +22,15 @@
"prHourlyLimit": 5,
"minimumReleaseAge": "3 days",
"minimumReleaseAgeBehaviour": "timestamp-optional",
"postUpgradeTasks": {
"commands": [
"python3 scripts/bump_image_versions.py origin/main"
],
"fileFilters": [
".gitea/workflows/image.yml"
],
"executionMode": "branch"
},
"timezone": "UTC",
"ansible-galaxy": {
"managerFilePatterns": [
@@ -53,7 +62,7 @@
"customManagers": [
{
"customType": "regex",
"description": "The uv pin that installs the build-stage Python interpreters of the ci image (images/ci/Dockerfile). It is an image input: the version bump comes from scripts/bump_image_versions.py via postUpgradeTasks (rule below).",
"description": "The uv pin that installs the build-stage Python interpreters of the ci image (images/ci/Dockerfile). It is an image input: the version bump comes from scripts/bump_image_versions.py via the top-level postUpgradeTasks.",
"managerFilePatterns": [
"/^images/ci/Dockerfile$/"
],
@@ -90,27 +99,12 @@
],
"packageRules": [
{
"description": "Dockerfile base-image tag and digest bumps (images/*/Dockerfile) MAY automerge. Kamino is the untrusted side and the bump pull request's own CI exercises the new image before the merge. Placed first so the major-version rule below still turns automerge off. The image version bump in image.yml comes from scripts/bump_image_versions.py via postUpgradeTasks (rule below).",
"description": "Dockerfile base-image tag and digest bumps (images/*/Dockerfile) MAY automerge. Kamino is the untrusted side and the bump pull request's own CI exercises the new image before the merge. Placed first so the major-version rule below still turns automerge off. The image version bump in image.yml comes from scripts/bump_image_versions.py via the top-level postUpgradeTasks.",
"matchManagers": [
"dockerfile"
],
"automerge": true
},
{
"description": "Every update runs scripts/bump_image_versions.py against origin/main as a postUpgradeTasks command (the base ref and clone depth in Renovate's checkout are verified by the first dry run). The rule matches every package (matchPackageNames *, which strict validation requires as a selector) on purpose: with executionMode branch only the FIRST upgrade's postUpgradeTasks of a branch counts and a branch can carry several upgrades; the script is a no-op when no image input (requirements-dev.txt, requirements.yml, .pre-commit-config.yaml, images/**) changed and otherwise makes the PATCH bump of the image version in image.yml. The command must match RENOVATE_ALLOWED_COMMANDS in renovate.yml exactly.",
"matchPackageNames": [
"*"
],
"postUpgradeTasks": {
"commands": [
"python3 scripts/bump_image_versions.py origin/main"
],
"fileFilters": [
".gitea/workflows/image.yml"
],
"executionMode": "branch"
}
},
{
"description": "The Renovate job container of renovate.yml runs with the job token: hand-bumped, never by the bot (the bot-diff gate would refuse a change to that file anyway).",
"matchFileNames": [
+3 -2
View File
@@ -17,8 +17,9 @@ order; an entry that cannot be parsed unambiguously is an error); comments, quot
the rest of the file are kept. Untracked files count as inputs unless git ignores them, so a cache
under images/ must be in .gitignore.
It runs as a Renovate `postUpgradeTasks` command: renovate.json sets it on a catch-all
packageRule (matches every package, executionMode branch, fileFilters limited to .gitea/workflows/image.yml),
It runs as a Renovate `postUpgradeTasks` command: renovate.json sets it at the top level
(so it runs on every branch, a lock refresh with no package included), with executionMode branch and fileFilters limited to
.gitea/workflows/image.yml,
allowed by RENOVATE_ALLOWED_COMMANDS of .gitea/workflows/renovate.yml. It is a no-op when no image
input changed, so a dependency bump that changes an image input carries its version bump and
passes the `bump` check without a human edit.