8000 Read the version from image tags pinned with a digest by clain23 · Pull Request #2151 · Altinity/clickhouse-operator · GitHub
[go: up one dir, main page]

Skip to content

Read the version from image tags pinned with a digest - #2151

Open
clain23 wants to merge 1 commit into
Altinity:0.28.0from
clain23:fix/image-tag-with-digest
Open

clain23 wants to merge 1 commit into
Altinity:0.28.0from
clain23:fix/image-tag-with-digest

Conversation

@clain23
@clain23 clain23 commented Nov 12, 2026
Copy link
Copy Markdown

Fixes #2149.

Changes

  • ContainerGetImageTag: for name:tag@sha256:... docker.Parse keeps only the digest, so the tag and the version in it were lost. The digest is now stripped before parsing when the reference still carries an explicit tag. A digest-only reference still returns sha256:....
  • reconcileHostTables: sets host.Runtime.Version to the version the host reported before the schemer is built. Without it a new host whose tag carries no version (a digest, a custom build) keeps the minimum version 0.0.1, and the schemer takes the engine path, so CREATE DATABASE ... Engine = Replicated fails with Code: 36.
  • Unit test TestContainerGetImageTag for plain, tag+digest (with and without a registry port), digest-only and untagged references. It fails without the fix.

Checks

  • go build ./..., go vet on the touched packages
  • go test ./pkg/model/... ./pkg/controller/... passes

Checklist

  • All commits in the PR are squashed
  • The PR is made into dedicated next-release branch (0.28.0), not into master
  • The PR is signed

🤖 Generated with Claude Code

For an image like "clickhouse-server:26.8.2.7@sha256:..." docker.Parse keeps
only the digest, so ContainerGetImageTag returned "sha256:..." and no version
was found. A new host then got the minimum version 0.0.1: version-gated addons
were dropped and the schemer of a new replica took the "engine" path, so
CREATE DATABASE ... Engine = Replicated failed with Code: 36.

Strip the digest before parsing when the reference still carries a tag. Also
set host.Runtime.Version to the version the host reported before building
the schemer, so a new replica with a tag that carries no version (a custom
build) does not stay on the minimum version.

Fixes Altinity#2149

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Igor Kudrin <igor@maestra.io>

This branch has not been deployed

No deployments
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

0