chore: migrate build to container-base v1.1.8 and fix Go/dmt lint#18
Merged
Conversation
… 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>
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>
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.
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
Imagesmap (from: {{ index $.Images "…" }}instead offromImage:) and bump base-images to v1.1.8 from thecontainer-basecatalog.BASE_IMAGES_VERSIONv0.5.79→v1.1.8; fetchbase_images.ymlfromdeckhouse/container-base/base-images..werf/base-images.yaml: drop the per-base-image artifactrangeloop (only theImagesmap is needed now)..werf/images.yaml: expose theImagesmap to each per-image build context.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.jqfrom the catalog instead ofapk add jq.The three Go images (
controller,webhooks,go-hooks) build CGO-free, so the svace path uses the muslbuilder/alpine-svaceand the default path usesbuilder/golang. Thegarageandseaweedfsimages keep vendoring their upstream static binaries intobuilder/distroless.werf config renderresolves everyfrom:to the v1.1.8 container-factory digests with no errors.2. Fix
build_dev / Lint(dmt no-cyrillic).github/workflows/translate-changelog.ymlhad a Cyrillic comment thatdmt lintflagged as a critical#no-cyrillicerror. 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 invariantClusterTypeparam from theclustertest helper.controller/shared.go: drop the invariantreadyTypeparam fromadvance/gateAfter/aggregateReady(both CR Ready conditions equal"Ready"); replace with aconditionReadyconstant.webhooks/validator_test.go: drop the invariantclusterRefparam from theobObjtest helper.hooks/go/main.go: merge the import group pergci.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 modulesbuild_dev / LintandGo linter for imagespasswerf config renderresolves all base images to v1.1.8 digestsbuild_devbuilds and pushes all five images🤖 Generated with Claude Code