Detect version mismatch in embedded image tags#19
Merged
ChrisJBurns merged 1 commit intomainfrom Jan 29, 2026
Merged
Conversation
Previously, when updating YAML files with embedded versions (e.g., image tags like `ghcr.io/repo:v1.0.0`), if the expected version wasn't found, releaseo would silently replace the entire value with just the version string, resulting in broken image references like `image: v1.0.1`. This change detects when a value contains an embedded version that doesn't match the expected current version and returns a clear error message explaining the mismatch and how to fix it. Example error: version mismatch in values.yaml at path operator.image: expected to find "v0.8.2" but found "v0.8.1" in value "ghcr.io/stacklok/toolhive/operator:v0.8.1". This usually means the file was not updated in a previous release. Co-Authored-By: Claude Opus 4.5 <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.
Summary
image: v1.0.1(instead ofimage: ghcr.io/repo:v1.0.1)Background
This fixes the issue seen in stacklok/toolhive#3515 where image URLs were being stripped and replaced with just the version tag because the VERSION file didn't match the embedded versions in values.yaml.
Example Error Message
Test plan
findEmbeddedVersion()functionUpdateYAMLFile()🤖 Generated with Claude Code