Automate dependency updates with Renovate - #692
Draft
NickJosevski wants to merge 3 commits into
Draft
Conversation
Adopts the Octopus house pattern for dependency updates (self-hosted Renovate run from a GitHub Actions workflow) so chart dependency bumps like #690 are raised for us. Chart dependencies are raised against the oldest active release stream only, so they enter the documented forward-merge process, and a post upgrade task writes the changeset so the chart version is bumped and the update lands in the changelog. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Description
Yes — this is a job for Renovate, which is what the rest of the org uses for dependency
bumps (~48 repos, e.g.
tool-containers,nautilus-workloads,Binnacle-*,OctoVersion). It is self-hosted throughthe
renovatebot/github-actionaction rather than the Mend app, so this PR follows the same shape as those repos:a
renovate.jsonplus a scheduled workflow.release-pleaseis also used in the org, but that solves versioning andchangelogs, which changesets already does for us here — it wouldn't have raised #690.
With this in place, a monitor release like #690 arrives as a
ready-to-merge PR:
Chart.yaml,Chart.lock(Renovate runshelm dependency updatefor the OCI dependency) and thechangeset.
What's in scope
helmv3—kubernetes-monitor-chartincharts/kubernetes-agent/Chart.yamlrelease/kubernetes-agent/v2github-actions— action versions in our workflowsmainnpm—@changesets/cli,cross-envmainTwo deliberate decisions worth reviewing:
main. That is where Update Kubernetes monitor to 0.37 #690 went, and itkeeps updates inside the forward merge process.
The cost is that
baseBranchPatternsnamesrelease/kubernetes-agent/v2explicitly and has to be updated when arelease stream is retired or added — called out in that doc.
helm-values(image tags invalues.yaml) is disabled.agent.image.taghas to move in lockstep withChart.yamlappVersion(enforced inkubernetes-agent-publish-chart.yaml) andworker-toolsisn't semanticallyversioned, so those stay manual.
nfs-server/nfs-watchdogcould be enabled later.Otherwise the config is the org's house style:
dependencies+ datasource labels, dashboard issue, assignees fromCODEOWNERS,
prConcurrentLimit: 1, and a 3 dayminimumReleaseAge— waived forkubernetes-monitor-chartsince wepublish it ourselves.
Blocker before this can be merged
A
RENOVATE_GITHUB_TOKENrepository secret is needed. It's a per-repository secret elsewhere (not an org secret — thisrepo only inherits
CHANGESETS_GITHUB_TOKENand friends), and the PRs in the other repos are raised byteam-builds-bot, so Build Platform needs to provision it here. Until it exists the Renovate job will fail on themissing token, which is why this is a draft.
Testing
The workflow runs on pull requests that touch
renovate.jsonor the workflow itself, withRENOVATE_DRY_RUN=full, soonce the token lands this PR validates its own config and logs exactly which updates it would raise — check the log for
the
Chart.lockartifact update and the.changeset/renovate-*.mdpost upgrade task before merging.Validated locally:
renovate.jsonparses, theRENOVATE_ALLOWED_COMMANDSregex matches the fully templatedprintfcommand, and that command produces a changeset byte-identical in shape to the hand-written one in #690.
Pre-requisites
renovate.jsonis only ever read from the default branch.🤖 Generated with Claude Code