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

Use version sort for k3d version list output #1554

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kravciak
Copy link
Contributor

@kravciak kravciak commented Feb 14, 2025

What

k3d version list uses string comparison instead of version sort. This bring a problem where 1.0 < 1.10 < 1.2.
PR changes sort method to handle semver. Also excludes dind and sha- from version list by default.

~ k3d version list k3s -i '1.26' -s desc | grep -v s390x
v1.26.9-k3s1
v1.26.8-k3s1
v1.26.7-k3s1
v1.26.6-k3s1
v1.26.5-k3s1
v1.26.4-k3s1
v1.26.3-k3s1
v1.26.2-k3s1
v1.26.15-k3s1
v1.26.14-k3s1
v1.26.13-k3s2
...

~ k3d version list k3d
sha-05d839b-dind
sha-05d839b
sha-011b299-dind
sha-011b299
sha-0068fbc-dind
sha-0068fbc
enhancement-gh-actions
5.8.2-dind
5.8.2
5.8.1-dind
5.8.1
5.8-dind
5.8
...

Why

  • output is not sorted properly
  • version list contains sha digests and -dind images

Implications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant