Fix checks for updated addon versions #7471
Merged
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.
Description
Fixes #7229
When executing
eksctl get addons
an available update is not shown if the only change to the version string is theeksbuild
number, e.g.v1.0.0-eksbuild.2
is not shown as an update ofv1.0.0-eksbuild.1
.The
findNewerVersions
func inpkg/actions/get.go
had code to explicitly ignore anything after the patch number. Sov1.1.0-eksbuild.1
andv1.1.0-eksbuild.4
were both converted to1.1.0
and considered equal. This fix removes the code that explicitly ignores the-eksbuild.x
portion of the version and allows thesemver
package to compare the full version information.Tests have also been updated to better match the version strings used by AWS addons.
Checklist
README.md
, or theuserdocs
directory)area/nodegroup
) and kind (e.g.kind/improvement
)