Repository navigation
[Cherry-pick to branch-1.3] [MINOR] fix(helm): Remove hardcoded version in chart unit tests (#11494) - #11505
Merged
Conversation
### What changes were proposed in this pull request?
Replace hardcoded SNAPSHOT version assertions in Helm chart unit tests
with matchRegex pattern matching, avoiding CI failures on every version
bump.
Changed files:
deployment_test.yaml
deployment_test.yaml
Both files changed from:
```
- equal:
path: spec.template.spec.containers[0].image
value: apache/gravitino-xxx:1.3.0-SNAPSHOT
```
to:
```
- matchRegex:
path: spec.template.spec.containers[0].image
pattern: "^apache/gravitino-xxx:.+"
```
This aligns with the existing approach in
deployment_test.yaml
### Why are the changes needed?
The chart unit tests hardcode SNAPSHOT version strings (e.g.,
1.3.0-SNAPSHOT). After every version bump, these tests fail and require
manual updates, adding unnecessary maintenance burden. For example, the
current CI failure:
```
Expected: apache/gravitino-iceberg-rest:1.3.0-SNAPSHOT
Actual: apache/gravitino-iceberg-rest:1.3.1-SNAPSHOT
```
Using matchRegex ensures the test validates the image repository is
correct and a tag is present, without coupling to a specific version.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
helm unittest --with-subchart=false
dev/charts/gravitino-iceberg-rest-server
helm unittest --with-subchart=false
dev/charts/gravitino-lance-rest-server
helm unittest --with-subchart=false dev/charts/gravitino
# Conflicts:
# dev/charts/gravitino-iceberg-rest-server/tests/deployment_test.yaml
# dev/charts/gravitino-lance-rest-server/tests/deployment_test.yaml
Author
Code Coverage Report
|
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.
Cherry-pick Information:
branch-1.3Please review and resolve the conflicts before merging.