Skip to content

chore: migrate build to container-base v1.1.8 and fix Go/dmt lint#18

Merged
duckhawk merged 5 commits into
mainfrom
fix/no-cyrillic-translate-changelog
Jun 28, 2026
Merged

chore: migrate build to container-base v1.1.8 and fix Go/dmt lint#18
duckhawk merged 5 commits into
mainfrom
fix/no-cyrillic-translate-changelog

Conversation

@duckhawk

@duckhawk duckhawk commented Jun 28, 2026

Copy link
Copy Markdown
Member

Branch cut from main; bundles a build-toolchain migration with the lint fixes that were blocking CI on every PR.

1. Migrate werf build to container-base v1.1.8

Align the sds-object build with the other storage modules (sds-node-configurator #300, csi-ceph): consume base images through the Images map (from: {{ index $.Images "…" }} instead of fromImage:) and bump base-images to v1.1.8 from the container-base catalog.

  • Workflows: BASE_IMAGES_VERSION v0.5.79v1.1.8; fetch base_images.yml from deckhouse/container-base/base-images.
  • .werf/base-images.yaml: drop the per-base-image artifact range loop (only the Images map is needed now).
  • .werf/images.yaml: expose the Images map to each per-image build context.
  • Builder renames: builder/altbuilder/golang-alt, builder/golang-alpinebuilder/golang, builder/golang-alt-svacebuilder/alpine-svace, base/distrolessbuilder/distroless, tools/jqjq, tools/yqyq.
  • images-digests: import jq from the catalog instead of apk add jq.

The three Go images (controller, webhooks, go-hooks) build CGO-free, so the svace path uses the musl builder/alpine-svace and the default path uses builder/golang. The garage and seaweedfs images keep vendoring their upstream static binaries into builder/distroless. werf config render resolves every from: to the v1.1.8 container-factory digests with no errors.

2. Fix build_dev / Lint (dmt no-cyrillic)

.github/workflows/translate-changelog.yml had a Cyrillic comment that dmt lint flagged as a critical #no-cyrillic error. Translated to English.

3. Fix Go linter for images (unparam + gci)

Four pre-existing findings the fail-fast linter surfaced one module at a time:

  • garage/resources_test.go: drop the invariant ClusterType param from the cluster test helper.
  • controller/shared.go: drop the invariant readyType param from advance/gateAfter/aggregateReady (both CR Ready conditions equal "Ready"); replace with a conditionReady constant.
  • webhooks/validator_test.go: drop the invariant clusterRef param from the obObj test helper.
  • hooks/go/main.go: merge the import group per gci.

These were failing on main, so this also unblocks linting for other open PRs.

Test plan

  • go build / go vet / go test ./... green in all four Go modules
  • build_dev / Lint and Go linter for images pass
  • werf config render resolves all base images to v1.1.8 digests
  • build_dev builds and pushes all five images

🤖 Generated with Claude Code

duckhawk and others added 4 commits June 28, 2026 16:00
… no-cyrillic lint

The `dmt lint` no-cyrillic linter flagged a Cyrillic comment in
.github/workflows/translate-changelog.yml as a critical error, failing the
build_dev / Lint check. Translate the comment to English.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Go linter (golangci-lint / unparam) flagged three params that always
receive the same value:

- garage/resources_test.go: the `cluster` test helper's ClusterType param
  always got Lightweight — drop it and set the type inside.
- controller/shared.go: advance() and aggregateReady() took a readyType param
  that always resolved to "Ready" (both v1alpha1.OSCConditionReady and
  OBConditionReady equal "Ready"). The aggregate Ready condition type is a
  single invariant, so introduce a package-level conditionReady constant and
  drop the param from advance/gateAfter/aggregateReady and their callers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two more findings surfaced once the controller package was clean (the
go_linter action fails fast per module, so it only reports the next module
after the previous one passes):

- webhooks/handlers/validator_test.go: the obObj test helper's clusterRef
  param always received "c1" (unparam) — drop it and set it inside.
- hooks/go/main.go: gci wanted the third-party and module-local imports in a
  single group (no blank-line split).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Align the sds-object build with the other storage modules (e.g.
sds-node-configurator, csi-ceph): consume base images through the `Images` map
(`from: {{ index $.Images "…" }}` instead of `fromImage:`) and bump
base-images to v1.1.8 from the container-base catalog.

- Workflows: BASE_IMAGES_VERSION v0.5.79 -> v1.1.8 and switch the base_images.yml
  fetch URL to deckhouse/container-base/base-images.
- .werf/base-images.yaml: drop the per-base-image artifact range loop (only the
  Images map is needed now).
- .werf/images.yaml: expose the Images map to each per-image build context.
- Builder renames: builder/alt -> builder/golang-alt, builder/golang-alpine ->
  builder/golang, builder/golang-alt-svace -> builder/alpine-svace,
  base/distroless -> builder/distroless, tools/jq -> jq, tools/yq -> yq.
- images-digests: import jq from the catalog instead of `apk add jq`.

The Go images build CGO-free (CGO_ENABLED=0), so the svace path uses the musl
builder/alpine-svace and the default path uses builder/golang. The garage and
seaweedfs images still vendor their upstream binaries into builder/distroless.

`werf config render` resolves every `from:` to the v1.1.8 container-factory
digests with no errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@duckhawk duckhawk changed the title ci: fix no-cyrillic lint in translate-changelog workflow chore: migrate build to container-base v1.1.8 and fix Go/dmt lint Jun 28, 2026
The controller and webhooks images already declare a mount-points.yaml and
include the "image mount points" template in their final stage; the garage and
seaweedfs images did not. Every final image in the sibling storage modules
(e.g. csi-nfs, including vendored-binary images) wires this mechanism, so add it
here for consistency. Both declare an empty dirs list (their data paths are
provided by Kubernetes volume mounts at runtime), matching the controller image.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@duckhawk duckhawk merged commit c900aa2 into main Jun 28, 2026
11 of 12 checks passed
@duckhawk duckhawk deleted the fix/no-cyrillic-translate-changelog branch June 28, 2026 13:32
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