ci(renovate): bump the molecule-controller pins like the ci ones
Renovate's pip-compile manager now reads requirements-molecule.lock, and its uv manager reads the controller Dockerfile's uv pin. The bot-PR guard holds the controller requirements and lock to the same rules as requirements-dev.txt and its lock, so the bot's pull requests for them are neither refused nor freer than the ci ones. The ansible tooling group spans both locks, so one pull request moves both ansible-core pins, which check_image_versions.py holds equal. Checked with renovate 44.161.0 --platform=local: it extracts requirements-molecule.txt with requirements-molecule.lock, and the uv pin of images/molecule-controller/Dockerfile. Refs #477 Assisted-by: Claude Code
This commit is contained in:
1 parent
fd448d7e9e
commit
0fb4fd70ee
3 files changed
+40
-13
No files matched your search
@@ -6,11 +6,12 @@
|
||||
|
||||
When <head-ref> starts with `renovate/`, the diff of <base-ref>...HEAD may only touch:
|
||||
|
||||
* requirements-dev.txt: pinned `name==version` lines, the same packages before and after;
|
||||
* requirements-dev.lock (pip-compile --generate-hashes output): `name==version` entries,
|
||||
`--hash=sha256:<64 hex>` lines and plain `# via` or prose comments, nothing else; packages may
|
||||
be added or removed (a transitive dependency), but the `# pip-compile ...` command in the
|
||||
header, which Renovate runs again, must stay as it is;
|
||||
* requirements-dev.txt and requirements-molecule.txt: pinned `name==version` lines, the same
|
||||
packages before and after;
|
||||
* requirements-dev.lock and requirements-molecule.lock (pip-compile --generate-hashes output):
|
||||
`name==version` entries, `--hash=sha256:<64 hex>` lines and plain `# via` or prose comments,
|
||||
nothing else; packages may be added or removed (a transitive dependency), but the
|
||||
`# pip-compile ...` command in the header, which Renovate runs again, must stay as it is;
|
||||
* requirements.yml and extensions/molecule/requirements.yml: `version:` lines (the collection
|
||||
names, and every other line, stay);
|
||||
* .pre-commit-config.yaml: `rev:` lines (a tag, or a commit SHA with its `# frozen: <tag>` comment);
|
||||
@@ -69,6 +70,9 @@ UBUNTU_LINE = re.compile(
|
||||
)
|
||||
DOCKERFILE = re.compile(r"images/[^/]+/Dockerfile")
|
||||
COLLECTION_PINS = {"requirements.yml", "extensions/molecule/requirements.yml"}
|
||||
# Lint's and the molecule-controller image's requirements, each with its pip-compile lock.
|
||||
REQUIREMENTS = {"requirements-dev.txt", "requirements-molecule.txt"}
|
||||
LOCKS = {"requirements-dev.lock", "requirements-molecule.lock"}
|
||||
CONSUMERS = {
|
||||
".gitea/workflows/lint.yml",
|
||||
".gitea/workflows/build.yml",
|
||||
@@ -108,7 +112,7 @@ def reduce_version(line):
|
||||
return "version" if VERSION_LINE.match(line) else None
|
||||
|
||||
|
||||
# requirements-dev.lock: an entry (with an optional environment marker), a hash, or a comment.
|
||||
# A lock: an entry (with an optional environment marker), a hash, or a comment.
|
||||
# The marker and the prose comment use a small character set: no backslash, quote of a shell, `$` or `--`.
|
||||
LOCK_ENTRY = re.compile(
|
||||
r"^[A-Za-z0-9][A-Za-z0-9._-]*==[0-9][0-9A-Za-z.+!_-]*"
|
||||
@@ -122,7 +126,7 @@ LOCK_COMMENT = re.compile(
|
||||
|
||||
|
||||
def lock_problem(removed, added):
|
||||
"""None when every changed line of requirements-dev.lock is an entry, a hash or a plain comment and
|
||||
"""None when every changed line of a lock is an entry, a hash or a plain comment and
|
||||
the `# pip-compile ...` command line is the same on both sides."""
|
||||
for line in removed + added:
|
||||
if LOCK_COMMAND.match(line):
|
||||
@@ -165,14 +169,14 @@ def reduce_pin(line):
|
||||
|
||||
def file_problem(path, removed, added):
|
||||
"""One-line reason why the change to `path` is not allowed for a bot, or None."""
|
||||
if path == "requirements-dev.txt":
|
||||
if path in REQUIREMENTS:
|
||||
return same_shape(
|
||||
removed,
|
||||
added,
|
||||
reduce_requirement,
|
||||
"a pinned `name==version` line of the same package",
|
||||
)
|
||||
if path == "requirements-dev.lock":
|
||||
if path in LOCKS:
|
||||
return lock_problem(removed, added)
|
||||
if path in COLLECTION_PINS:
|
||||
return same_shape(removed, added, reduce_version, "a `version:` line")
|
||||
|
||||
Reference in new issue
Block a user