remote_rpm: stop caching repodata as immutable
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful

repodata (repomd.xml and its referenced index files) is a mutable index that
upstream RPM repos rotate frequently. Marking it immutable (immutable_ttl: 0)
makes artifactapi cache repomd.xml forever: classifier.go checks
immutable_patterns before the RPM provider's own rule (which already classifies
repodata/ as mutable), and SetTTL with ttl=0 writes a Redis key with no expiry.
The result is a stale repomd.xml that keeps pointing at checksum-named metadata
files upstream has already deleted -> 404 on dnf metadata refresh. This broke
rpmbuilder's almalinux8 builds via the epel remote and would eventually hit any
rolling RPM remote.

Remove the repodata immutable patterns from every remote_rpm config so repodata
falls through to the provider's Mutable classification and is re-fetched every
mutable_ttl. RPMs, noarch, GPG keys and .img files stay immutable.

- Drop ".*/repodata/.*\.{xml,sqlite,yaml}.*$" from all config/remote_rpm/*.yaml
  (14 files, 20 lines).

After apply, the already-cached stale repodata entries must be evicted (they
have no expiry); that is done per-remote as a follow-up.
This commit is contained in:
2026-07-18 14:12:02 +10:00
parent 53c26160f1
commit d168962f82
14 changed files with 0 additions and 20 deletions
-3
View File
@@ -5,9 +5,6 @@ mutable_ttl: 7200
immutable_patterns: immutable_patterns:
- ".*/x86_64/.*\\.rpm$" - ".*/x86_64/.*\\.rpm$"
- ".*/noarch/.*\\.rpm$" - ".*/noarch/.*\\.rpm$"
- ".*/repodata/.*\\.sqlite.*$"
- ".*/repodata/.*\\.xml.*$"
- ".*/repodata/.*\\.yaml.*$"
- ".*/install.img" - ".*/install.img"
- ".*/squashfs.img" - ".*/squashfs.img"
- ".*/updates.img" - ".*/updates.img"
-3
View File
@@ -5,9 +5,6 @@ mutable_ttl: 7200
immutable_patterns: immutable_patterns:
- ".*/x86_64/.*\\.rpm$" - ".*/x86_64/.*\\.rpm$"
- ".*/noarch/.*\\.rpm$" - ".*/noarch/.*\\.rpm$"
- ".*/repodata/.*\\.sqlite.*$"
- ".*/repodata/.*\\.xml.*$"
- ".*/repodata/.*\\.yaml.*$"
- ".*/install.img" - ".*/install.img"
- ".*/squashfs.img" - ".*/squashfs.img"
- ".*/updates.img" - ".*/updates.img"
-1
View File
@@ -5,4 +5,3 @@ mutable_ttl: 7200
immutable_patterns: immutable_patterns:
- ".*/x86_64/.*\\.rpm$" - ".*/x86_64/.*\\.rpm$"
- ".*/noarch/.*\\.rpm$" - ".*/noarch/.*\\.rpm$"
- ".*/repodata/.*\\.xml.*$"
-1
View File
@@ -5,4 +5,3 @@ mutable_ttl: 7200
immutable_patterns: immutable_patterns:
- ".*/x86_64/.*\\.rpm$" - ".*/x86_64/.*\\.rpm$"
- ".*/noarch/.*\\.rpm$" - ".*/noarch/.*\\.rpm$"
- ".*/repodata/.*\\.xml.*$"
-1
View File
@@ -5,4 +5,3 @@ mutable_ttl: 7200
immutable_patterns: immutable_patterns:
- ".*/x86_64/.*\\.rpm$" - ".*/x86_64/.*\\.rpm$"
- ".*/noarch/.*\\.rpm$" - ".*/noarch/.*\\.rpm$"
- ".*/repodata/.*\\.xml.*$"
-1
View File
@@ -3,4 +3,3 @@ description: "Claude Code RPM repository"
immutable_patterns: immutable_patterns:
- ".*/x86_64/.*\\.rpm$" - ".*/x86_64/.*\\.rpm$"
- ".*/noarch/.*\\.rpm$" - ".*/noarch/.*\\.rpm$"
- ".*/repodata/.*\\.xml.*$"
-3
View File
@@ -5,7 +5,4 @@ mutable_ttl: 7200
immutable_patterns: immutable_patterns:
- ".*/Everything/x86_64/.*\\.rpm$" - ".*/Everything/x86_64/.*\\.rpm$"
- ".*/noarch/.*\\.rpm$" - ".*/noarch/.*\\.rpm$"
- ".*/repodata/.*\\.sqlite.*$"
- ".*/repodata/.*\\.xml.*$"
- ".*/repodata/.*\\.yaml.*$"
- "RPM-GPG-KEY-.*$" - "RPM-GPG-KEY-.*$"
-1
View File
@@ -7,4 +7,3 @@ immutable_patterns:
- "updates/.*/Everything/x86_64/.*\\.rpm$" - "updates/.*/Everything/x86_64/.*\\.rpm$"
- "development/.*/Everything/x86_64/.*\\.rpm$" - "development/.*/Everything/x86_64/.*\\.rpm$"
- ".*/noarch/.*\\.rpm$" - ".*/noarch/.*\\.rpm$"
- ".*/repodata/.*\\.xml.*$"
-1
View File
@@ -4,4 +4,3 @@ immutable_ttl: 0
mutable_ttl: 7200 mutable_ttl: 7200
immutable_patterns: immutable_patterns:
- ".*\\.rpm$" - ".*\\.rpm$"
- ".*/repodata/.*\\.xml.*$"
-1
View File
@@ -4,5 +4,4 @@ immutable_ttl: 0
mutable_ttl: 7200 mutable_ttl: 7200
immutable_patterns: immutable_patterns:
- ".*\\.rpm$" - ".*\\.rpm$"
- ".*/repodata/.*\\.xml.*$"
- ".*/RPM-GPG-KEY-.*$" - ".*/RPM-GPG-KEY-.*$"
-1
View File
@@ -4,5 +4,4 @@ immutable_ttl: 0
mutable_ttl: 7200 mutable_ttl: 7200
immutable_patterns: immutable_patterns:
- ".*\\.rpm$" - ".*\\.rpm$"
- ".*/repodata/.*\\.xml.*$"
- "GPG-KEY-.*$" - "GPG-KEY-.*$"
-1
View File
@@ -4,6 +4,5 @@ immutable_ttl: 0
mutable_ttl: 7200 mutable_ttl: 7200
immutable_patterns: immutable_patterns:
- ".*\\.rpm$" - ".*\\.rpm$"
- ".*/repodata/.*\\.xml.*$"
- ".*/RPM-GPG-KEY-.*$" - ".*/RPM-GPG-KEY-.*$"
- ".*/PGDG-RPM-GPG-KEY-.*$" - ".*/PGDG-RPM-GPG-KEY-.*$"
-1
View File
@@ -4,5 +4,4 @@ immutable_ttl: 0
mutable_ttl: 7200 mutable_ttl: 7200
immutable_patterns: immutable_patterns:
- ".*\\.rpm$" - ".*\\.rpm$"
- ".*/repodata/.*\\.xml.*$"
- "public.key$" - "public.key$"
-1
View File
@@ -4,4 +4,3 @@ immutable_ttl: 0
mutable_ttl: 7200 mutable_ttl: 7200
immutable_patterns: immutable_patterns:
- ".*\\.rpm$" - ".*\\.rpm$"
- ".*/repodata/.*\\.xml.*$"