Skip to content

Add Renovate config (Gradle + Docker)#358

Open
jonbartels wants to merge 3 commits into
mainfrom
add-renovate-config
Open

Add Renovate config (Gradle + Docker)#358
jonbartels wants to merge 3 commits into
mainfrom
add-renovate-config

Conversation

@jonbartels

@jonbartels jonbartels commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Supersedes the Dependabot approach in #356.

Summary

Adds renovate.json to configure Renovate for dependency updates. No custom workflow is needed — Renovate maintains the Gradle dependency-verification metadata itself (see below).

renovate.json

  • Base: config:recommended
  • Schedule: monthly, America/New_York
  • minimumReleaseAge: "2 days" — waits before opening a PR (skips yanked/broken releases)
  • Grouping by coherent project family, keyed deep so unrelated org.apache.* projects stay separate (org.apache.commons, org.apache.logging.log4j, …): aws-sdk, jetty, jersey, jackson, netty, log4j, apache-commons, test-tooling, plus a catch-all all-minor-and-patch. Rule order accounts for Renovate's last-match-wins merge so family groups aren't swallowed by the catch-all.
  • Noise/safety: prConcurrentLimit: 10, prHourlyLimit: 2, ecosystem labels (java/docker), semantic commits, dependencyDashboard, osvVulnerabilityAlerts
  • Majors require Dependency Dashboard approval (major.dependencyDashboardApproval: true)
  • automerge: false — never automerge
  • Docker Dockerfile handled automatically by Renovate's dockerfile manager

Gradle dependency verification — handled by Renovate, no workflow

This repo enforces gradle/verification-metadata.xml (verify-metadata=true). Renovate's Gradle manager detects that and runs ./gradlew --write-verification-metadata sha256 dependencies, committing the refreshed checksums in its own PR.

This was verified empirically on a live Mend-hosted fork: on a genuinely-needed update (org.eclipse.jetty:jetty-http → 10.0.0), Renovate committed the catalog bump and the new jar/pom/parent-POM checksums in a single renovate[bot] commit (origin="Generated by Gradle"), with no helper workflow present. An earlier draft of this PR carried a split-privilege regen workflow; it turned out to be unnecessary (it only looked required because its push-triggered commit raced Renovate's own artifact update). That workflow has been removed.

⚠️ Manual configuration (repo admin)

  1. Install the Mend Renovate GitHub App on the repo and merge its onboarding PR.
  2. Labels dependencies / java / docker already exist — no action.
  3. No dependabot.yml exists on main; ensure no org-level Dependabot config double-runs updates.

🤖 Generated with Claude Code

Configure Renovate for dependency updates instead of Dependabot: monthly
schedule, 2-day minimumReleaseAge, coherent-project grouping (keyed deep
so unrelated org.apache.* projects stay separate), ecosystem labels, PR
limit, and OSV vulnerability alerts.

Because this repo enforces Gradle dependency verification and the metadata
file cannot always be regenerated by the bot, add a split-privilege
workflow that regenerates gradle/verification-metadata.xml on renovate/**
branches: an untrusted build job with a read-only token and no secrets
produces the file, and a separate trusted job that runs no dependency code
commits it. This isolates the writable token from untrusted execution.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jon Bartels <jonathan.bartels@gmail.com>
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

Test Results

654 tests  ±0   654 ✅ ±0   3m 44s ⏱️ + 1m 1s
108 suites ±0     0 💤 ±0 
108 files   ±0     0 ❌ ±0 

Results for commit 73213dd. ± Comparison against base commit a08c114.

♻️ This comment has been updated with latest results.

@jonbartels
jonbartels marked this pull request as ready for review July 21, 2026 23:03
@jonbartels
jonbartels marked this pull request as draft July 21, 2026 23:03
@jonbartels

jonbartels commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Here is an example of what we get out of renovate. https://github.com/jonbartels/oie-engine/pulls/app%2Frenovate

This doesn't do the grouping like dependa does I'll work on configuring it.

Add prHourlyLimit to avoid PR bursts, require Dependency Dashboard
approval before major-version PRs open, and set the schedule timezone.
Explicitly set automerge=false; we never want automerge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jon Bartels <jonathan.bartels@gmail.com>
Comment thread .github/workflows/renovate-verification-metadata.yaml Outdated
Verified empirically on a live Mend-hosted fork: when its PR branch is not
externally modified, Renovate runs ./gradlew --write-verification-metadata
and commits the refreshed gradle/verification-metadata.xml itself (jetty-http
10.0.0: jar+pom+parent checksums authored by renovate[bot], no workflow
present). The custom workflow only appeared necessary because its commit
raced Renovate's on push; removing it lets Renovate self-maintain.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jon Bartels <jonathan.bartels@gmail.com>

@kpalang kpalang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks alright, lets see what we get.

@jonbartels jonbartels changed the title Add Renovate config (Gradle + Docker) with verification-metadata automation Add Renovate config (Gradle + Docker) Jul 22, 2026
@jonbartels
jonbartels requested review from a team and pacmano1 July 23, 2026 12:48
@pacmano1

Copy link
Copy Markdown
Contributor

Read the config against the version catalog and the repo's labels. The verification-metadata
story is the right solution to the problem demonstrated on #356, and the empirical run on the
live fork is the evidence that matters. Four items, none of them blocking.

  1. Catch-all scope, question. The all-minor-and-patch rule matches on update type only,
    and config:recommended also enables the dockerfile and github-actions managers (the root
    Dockerfile and the two workflows). Won't a monthly run pull a base-image bump and an actions
    bump into the same group PR as the gradle patches, with merged labels? If that's not
    intended, "matchManagers": ["gradle"] on the catch-all would scope it. If your fork run
    already showed separate PRs, ignore this.

  2. App install ownership. Merging this is a no-op until the Mend app is installed, and the
    failure mode is pure silence, no dashboard, no PRs, no error. Who owns the install? Suggest
    doing it after merge so Renovate detects the existing config and skips onboarding, then
    posting here once the Dependency Dashboard issue appears. That's the same-day confirmation
    the wiring is live, instead of waiting a month to notice nothing happened.

  3. Description fix. The catch-all description says majors stay individual. That's true only
    for deps no family rule matches. The family rules have no matchUpdateTypes, so an approved
    jetty major rides the jetty group branch with any pending minors. Grouping family majors
    is arguably correct, those move in lockstep, but the description should say what actually
    happens: ungrouped majors stay individual, family majors ride their family group. Same
    overstatement is in the PR body.

  4. For the record, on reviewing future Renovate PRs. Since Renovate regenerates
    gradle/verification-metadata.xml from whatever it downloads, the checksum file is not an
    independent check at bump time. It still pins artifacts against later tampering, but at bump
    time the control is the diff review. Review rule going forward: the metadata diff on a
    Renovate PR should only touch entries for the artifacts being bumped, unrelated churn in
    that file is the thing to stop on. The 2-day minimumReleaseAge covers the yanked-release
    window. And per the race documented in this PR's body, no regen workflow should be added
    back later, Renovate maintains the file itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants