Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix checks for updated addon versions #7471

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

mttrb
Copy link
Contributor

@mttrb mttrb commented Jan 11, 2024

Description

Fixes #7229

When executing eksctl get addons an available update is not shown if the only change to the version string is the eksbuild number, e.g. v1.0.0-eksbuild.2 is not shown as an update of v1.0.0-eksbuild.1.

The findNewerVersions func in pkg/actions/get.go had code to explicitly ignore anything after the patch number. So v1.1.0-eksbuild.1 and v1.1.0-eksbuild.4 were both converted to 1.1.0 and considered equal. This fix removes the code that explicitly ignores the -eksbuild.x portion of the version and allows the semver package to compare the full version information.

Tests have also been updated to better match the version strings used by AWS addons.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes
  • (Core team) Added labels for change area (e.g. area/nodegroup) and kind (e.g. kind/improvement)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello mttrb 👋 Thank you for opening a Pull Request in eksctl project. The team will review the Pull Request and aim to respond within 1-10 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

When executing `eksctl get addons` an available update is not shown
if the only change to the version string is the `eksbuild` number, e.g.
`v1.0.0-eksbuild.2` is not shown as an update of `v1.0.0-eksbuild.1`.

The `findNewerVersions` func in `pkg/actions/get.go` had code to
explicitly ignore anything after the patch number. So `v1.1.0-eksbuild.1`
and `v1.1.0-eksbuild.4` were both converted to `1.1.0` and considered
equal. This fix removes the code that explicitly ignores the
`-eksbuild.x` portion of the version and allows the `semver` package
to compare the full version information.

Tests have also been updated to better match the version strings used
by AWS addons.
@yuxiang-zhang
Copy link
Member

Thanks for this contribution! LGTM 🚀

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@yuxiang-zhang yuxiang-zhang merged commit 647874e into eksctl-io:main Feb 14, 2024
11 of 12 checks passed
@mttrb mttrb deleted the fix_addon_versions branch February 14, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] eksctl get addon --name coredns does not show update version available
3 participants