Add exact match check to use specified addon versions #8478
+7
−0
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.
Add exact match check to use specified addon versions
Description
The current addon version selection logic uses partial string matching to find the latest version among all matching candidates. This causes unexpected behavior when users specify exact versions.
For example, when a user runs:
The current implementation incorrectly selects
v1.0.0-eksbuild.20
instead of the specifiedv1.0.0-eksbuild.2
, becausestrings.Contains("v1.0.0-eksbuild.20", "v1.0.0-eksbuild.2")
returnstrue
.This Pull Request adds an exact match check before the partial matching logic in
getLatestMatchingVersion()
.Manual Test Results
before
after
Checklist
README.md
, or theuserdocs
directory)=> I think no documentation changes are required as the modified behavior aligns with existing documentation expectations.
https://eksctl.io/usage/addons/
area/nodegroup
) and kind (e.g.kind/improvement
)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯