Skip to content

fix(deploy): stale file:// Chart.lock and the Strimzi CRD conflict no longer stop kates deploy - #450

Merged
bmscomp merged 2 commits into
mainfrom
fix/file-deps-stale-lock
Oct 22, 2026
Merged

bmscomp merged 2 commits into
mainfrom
fix/file-deps-stale-lock

Conversation

@bmscomp

@bmscomp bmscomp commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Problem

kates deploy failed with:

Error: the lock file (Chart.lock) is out of sync with the dependencies file (Chart.yaml). Please update the dependencies with 'helm dependency update'

charts/*/*.lock is git-ignored, so a checkout keeps the Chart.lock its first helm dependency build wrote. #447 moved kafka-common to 0.1.1; older checkouts' connect-cluster and mirror-maker2 locks still name 0.1.0, and helm dependency build refuses them.

Fix

kates deploy (connect-cluster, mirror-maker2) and kates migrate (ensureMirrorChartDeps) run helm dependency update --skip-refresh instead of build. Their only dependency is file://../kafka-common, so regenerating the lock is offline and cannot drift. The Strimzi operator chart keeps build, where the Chart.lock pin matters.

Tests

  • The deploy and migrate fakes expect the new command; go test ./cmd passes; golangci-lint --new-from-rev reports 0 issues.
  • Against the stale locks locally: helm dependency update --skip-refresh rewrote both to kafka-common 0.1.1, and helm dependency build then passes.
  • Not run as a full kates deploy.

charts/kates-platform/Chart.lock is stale too, but kates deploy does not build it; make platform-chart-deps updates it.

Also: the Strimzi helm install skips CRDs (from #449)

applyLocalStrimziCRDs server-side-applies the Strimzi CRDs as the kubectl field manager; Helm 4's upgrade --install then re-applied the chart's crds/ as helm on a fresh install and failed with conflict with "kubectl": .spec.versions. The Strimzi upgrade now passes --skip-crds, and the Group A test asserts it. This PR carries that commit so one deploy has both fixes; #449 is the same change on its own.

…le Chart.lock no longer stops a deploy

charts/*/*.lock is git-ignored, so a checkout keeps whatever Chart.lock
its first `helm dependency build` wrote. Since #447 moved kafka-common
to 0.1.1, every older checkout's connect-cluster and mirror-maker2
locks name 0.1.0, and `helm dependency build` refuses them as out of
sync. `kates deploy` and `kates migrate` now run
`helm dependency update --skip-refresh` on these two charts: their only
dependency is file://, so regenerating the lock is offline and cannot
drift. The Strimzi operator chart keeps `build`, where the pin matters.
…eady applied

applyLocalStrimziCRDs server-side-applies the Strimzi CRDs as the
"kubectl" field manager. On a fresh install Helm 4 then applies the
chart's crds/ again as "helm" without forcing, and fails with a
conflict over .spec.versions. Pass --skip-crds so the CRDs are applied
once, by the step that already owns them.
@bmscomp bmscomp changed the title fix(cli): file:// chart dependencies are updated, not built, so a stale Chart.lock no longer stops a deploy fix(deploy): stale file:// Chart.lock and the Strimzi CRD conflict no longer stop kates deploy Oct 22, 2026
@bmscomp
bmscomp merged commit 42d0a5f into main Oct 22, 2026
55 checks passed
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.

1 participant