-
Notifications
You must be signed in to change notification settings - Fork 79
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
refactor: order by key when printing labels #960
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #960 +/- ##
==========================================
+ Coverage 63.66% 70.17% +6.50%
==========================================
Files 243 245 +2
Lines 10719 10782 +63
==========================================
+ Hits 6824 7566 +742
+ Misses 3180 2539 -641
+ Partials 715 677 -38
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Personally I do not think this is worth bumping the Go dependency before 1.24 is released and 1.22 becomes EOL anyway. |
I initially created this PR because the undeterministic behavior of label output made it difficult to test output in the e2e tests. Since the CLI is not a library I don't see any drawbacks from upgrading to a newer Go version. On that note, we could also test the new |
This already causes the CI to fail randomly: https://github.com/hetznercloud/cli/actions/runs/12893320728/job/35949486386#step:5:527 |
Since #991 was merged, we now require Go 1.23, so this PR doesn't bump the Go version anymore. |
I do not think this is worthy of being added to the Changelog, does not really matter for customers and is more about test behaviour. I updated the title for this. |
This PR adds sorting of labels by their keys, which is useful for testing, since iteration order over maps in Go is undefined by default.
It uses the Go 1.23 iteration feature.
If we want to use this, we should probably bump the Go version in a separate PR.