Repository navigation
Pin Renovate Maven lookups to the registry hosting each package - #11
Merged
Merged
Conversation
Renovate's Maven manager appends Maven Central to every Maven dependency regardless of settings.xml, and the datasource queries every registry for every dep. When Central answers 429, the datasource raises an ExternalHostError and the whole run aborts before any lookup or update. This is what has been aborting runs in packtests since around Sep 6, and this repo is exposed to the same failure even though its settings.xml only declares GitHub Packages. - Restrict org.cyclops.* lookups to our GitHub Packages registry, so Central is no longer in the lookup path at all. - Add a hostRule for repo.maven.apache.org as a backstop. Its description records that it does not actually suppress the Central abort, since the Maven datasource throws unconditionally for that host. - Migrate matchPackagePrefixes to matchPackageNames in "Cyclops packages", which Renovate was reporting as a needed config migration. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N6hkW22Va1tk2EqxDguWG4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to CyclopsMC/packtests#73, which fixes the same problem in the pack tests repo.
Why this repo is affected too
Renovate runs in
packtestshave been aborting withExternal host error causing abort - skippingsince around Sep 6. The cause is a429 Too Many Requestsfrom Maven Central, which Renovate turns into anExternalHostErrorthat takes down the whole run before any lookup or update happens.It would be easy to assume this repo is safe, since its
settings.xmldeclares only GitHub Packages and no Central. That assumption is wrong. Inmodules/manager/maven/extract.js,cleanResultappends Maven Central to every Maven dependency'sregistryUrlsunconditionally, whateversettings.xmlsays. The datasource then usesregistryStrategy = "merge", so Central is queried for bothorg.cyclopsdeps on every run, and a 429 from it aborts this repo's run exactly as it does inpacktests.(Line references are from
renovate@44.82.3, the current release.)What changed
registryUrlspackage rule restrictingorg.cyclops.*tohttps://maven.pkg.github.com/CyclopsMC/packages, the only registry that actually serves it. This takes Central out of the lookup path entirely, which is what prevents the abort.hostRuleforrepo.maven.apache.orgwithabortOnError: falseandabortIgnoreStatusCodes: [429], as a backstop. See the caveat below.matchPackagePrefixes: ["org.cyclops."]is nowmatchPackageNames: ["org.cyclops.{/,}**"].The
rubensworks/renovate-presets:jsextend,enabledManagers, both automerge rules (including theversioningregex on the Maven one), and thegithub-actionsmajor setting are all unchanged.Caveat: the hostRule is a backstop, not the fix
I checked this rather than assuming it, and it does not do what it looks like it does. In
util/http/http.jstheExternalHostErrorconversion is gated onabortOnErrorbeing truthy, andabortOnErroris already falsy by default, so setting it tofalseis a no-op, andabortIgnoreStatusCodesis only consulted whenabortOnErroris true. The abort we actually hit is thrown later and unconditionally by the Maven datasource's own Central special case inmodules/datasource/maven/util.js. NohostRulesuppresses it.So change 1 is the real fix. The hostRule is kept only as a harmless backstop for non-Central hosts, and carries an in-file
descriptionsaying so, so nobody later mistakes it for working protection.If you want a hard guarantee instead,
{"matchHost": "repo.maven.apache.org", "enabled": false}does work: a disabled host raises a plainhost-disablederror that the Maven datasource classifies as unknown and swallows, never reaching the Central special case. I left it out because its failure mode is silent, but say the word and I will add it.Validation
matchRegexOrGlobList: bothorg.cyclops.cyclopscore:cyclopscore-1.21.1-neoforgeandorg.cyclops.evilcraft:evilcraft-1.21.1-neoforgematch the new registry rule and the migrated "Cyclops packages" group rule, so grouping behaviour is preserved.npx --yes --package renovate -- renovate-config-validator --strictpasses on the new config. The same command onmasterexits 1 withConfig migration necessary.🤖 Generated with Claude Code
https://claude.ai/code/session_01N6hkW22Va1tk2EqxDguWG4
Generated by Claude Code