Skip to content

Commit 4e0e671

Browse files
committed
Let version catalog refs decide Renovate grouping
Renovate's Gradle manager records each catalog entry's version.ref and uses it as the group name when no rule sets one, so every ref already updates as one branch. Two things worked against that: - config:recommended includes group:monorepos, which puts Jetty, Jackson, Netty, Log4j2, Jersey, Mockito, jaxb-ri and slf4j into "<name> monorepo" groups. - Vulnerability-alert updates reset groupName to null and fall back to the ref name. So a family whose normal updates get a group name other than the ref name is split: a jar with an OSV advisory lands on renovate/<ref>, the rest on renovate/<group>, and both branches rewrite the same catalog line. The explicit jetty, jackson, netty and log4j groups only avoided this because their names happen to equal the refs, and that does not work for refs with a dash, which become dotted branch names (jaxb-ri -> renovate/jaxb.ri). jaxb-ri, slf4j and the refs inside the multi-ref groups (awssdk in aws-sdk, mockito and byte-buddy in test-tooling, hk2 in jersey, jaxws-ri in sun-xml) were exposed. The pdfbox group's *pdfbox* pattern also pulled openhtmltopdf-pdfbox away from the rest of the openhtmltopdf ref. Ignore group:monorepos and remove every groupName rule, leaving the refs as the only grouping. A local Renovate 44.199.0 run with OSV alerts on (--platform=local, gradle manager) confirms that each ref then goes to exactly one branch, plus its major-update branch, that no branch updates more than one ref, and that jetty-http's advisory update lands on renovate/jetty with the other Jetty jars. Dockerfile and Gradle wrapper branches are unchanged. Artifacts on literal versions, such as the Apache Commons and Metro jars that the apache-commons and sun-xml groups bundled, now get one PR each. In the same run, PR-producing branches went from 59 to 82 and major-only branches, which wait for dashboard approval, from 31 to 40; prConcurrentLimit and the monthly schedule still pace them. Grouping never kept those jars compatible anyway, since each update in a group moves to its own latest version. Document the rule in CONTRIBUTING.md and point to it from the catalog. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Tony Germano <tony@germano.name>
1 parent 594c6fb commit 4e0e671

3 files changed

Lines changed: 6 additions & 74 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ GRADLE_USER_HOME=$(mktemp -d) ./gradlew --write-verification-metadata sha256 bui
4444
```
4545
The cold cache matters: a warm cache skips re-resolving already-cached parent POMs, so they never get recorded, and the build then fails verification only in CI (this bit us once during the migration). The run downloads everything once and takes a few minutes. Only when adding a **new** artifact that ships in the distribution does `gradle/vendored-layout.json` need a one-line placement entry, and the build fails with a message telling you so.
4646

47+
Artifacts that are released together under one version number share a `[versions]` entry (a ref) in `gradle/libs.versions.toml`. [Renovate](https://docs.renovatebot.com/) proposes each ref's update as one PR, on a branch named after the ref, and puts a security fix for any artifact on that ref on the same branch. To keep it that way, `renovate.json` defines no groups and ignores Renovate's built-in `group:monorepos` preset, so the refs alone decide what is updated together. Don't add a `groupName` rule: a security-fix update never joins a named group, so the family would be split across two branches that edit the same line. To have several artifacts updated together, put them on one ref, which is only correct if they share a version. Artifacts on literal versions get one PR each.
48+
4749
### Changing build logic
4850

4951
The build's correctness is guarded by output comparison, not by unit

‎gradle/libs.versions.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
[versions]
1313
# Shared by artifacts released together; bump the whole family at once.
14+
# Renovate updates each ref in one PR (see CONTRIBUTING.md).
1415
asm = "9.6"
1516
awssdk = "2.55.12"
1617
bouncycastle = "1.78.1"

‎renovate.json‎

Lines changed: 3 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"schedule:monthly",
66
"helpers:pinGitHubActionDigests"
77
],
8+
"ignorePresets": [
9+
"group:monorepos"
10+
],
811
"timezone": "America/New_York",
912
"minimumReleaseAge": "14 days",
1013
"prConcurrentLimit": 10,
@@ -45,80 +48,6 @@
4548
"addLabels": [
4649
"github actions"
4750
]
48-
},
49-
{
50-
"groupName": "aws-sdk",
51-
"matchPackageNames": [
52-
"software.amazon.awssdk:*",
53-
"software.amazon.eventstream:*"
54-
]
55-
},
56-
{
57-
"groupName": "jetty",
58-
"matchPackageNames": [
59-
"org.eclipse.jetty*"
60-
]
61-
},
62-
{
63-
"groupName": "bouncycastle",
64-
"matchPackageNames": [
65-
"org.bouncycastle*"
66-
]
67-
},
68-
{
69-
"groupName": "jersey",
70-
"matchPackageNames": [
71-
"org.glassfish.jersey*",
72-
"org.glassfish.hk2*"
73-
]
74-
},
75-
{
76-
"groupName": "pdfbox",
77-
"matchPackageNames": [
78-
"*pdfbox*"
79-
]
80-
},
81-
{
82-
"groupName": "sun-xml",
83-
"matchPackageNames": [
84-
"com.sun.xml*"
85-
]
86-
},
87-
{
88-
"groupName": "jackson",
89-
"matchPackageNames": [
90-
"com.fasterxml.jackson*"
91-
]
92-
},
93-
{
94-
"groupName": "netty",
95-
"matchPackageNames": [
96-
"io.netty*",
97-
"com.typesafe.netty*"
98-
]
99-
},
100-
{
101-
"groupName": "log4j",
102-
"matchPackageNames": [
103-
"org.apache.logging.log4j*"
104-
]
105-
},
106-
{
107-
"groupName": "apache-commons",
108-
"matchPackageNames": [
109-
"org.apache.commons:*",
110-
"commons-*"
111-
]
112-
},
113-
{
114-
"groupName": "test-tooling",
115-
"matchPackageNames": [
116-
"org.mockito*",
117-
"net.bytebuddy*",
118-
"org.objenesis:*",
119-
"org.hamcrest:*",
120-
"junit:*"
121-
]
12251
}
12352
]
12453
}

0 commit comments

Comments
 (0)