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: release sort order #176

Merged
merged 1 commit into from
Oct 10, 2024
Merged

fix: release sort order #176

merged 1 commit into from
Oct 10, 2024

Conversation

ctrox
Copy link
Contributor

@ctrox ctrox commented Oct 10, 2024

The OrderReleaseList returns the latest release last, which is not what the comment on the function says. Because of this, exec sometimes fails if there are two releases available (can happen when switching to a new release).

As a side effect, this also changes the order of the get release command. Should we reverse it for get?

@thirdeyenick
Copy link
Contributor

The OrderReleaseList returns the latest release last, which is not what the comment on the function says. Because of this, exec sometimes fails if there are two releases available (can happen when switching to a new release).

As a side effect, this also changes the order of the get release command. Should we reverse it for get?

Good catch! I think reversing the order for get release might make sense as one would expect the latest release to be on the bottom?

@ctrox ctrox force-pushed the release-sort-order branch from d03704b to 45e617f Compare October 10, 2024 11:12
@ctrox
Copy link
Contributor Author

ctrox commented Oct 10, 2024

Good catch! I think reversing the order for get release might make sense as one would expect the latest release to be on the bottom?

Yeah I was thinking the same, especially since all other resources are sorted by the name, which for example makes the builds be sorted by "latest on the bottom" as they are numbered. I added a bool to reverse (just) the timestamp order, does this make sense to you?

The OrderReleaseList returns the latest release last, which is not what
the comment on the function says. Because of this, exec sometimes fails
if there are two releases available (can happen when switching to a new
release).
@ctrox ctrox force-pushed the release-sort-order branch from 45e617f to 278043e Compare October 10, 2024 11:17
Copy link
Contributor

@thirdeyenick thirdeyenick left a comment

Choose a reason for hiding this comment

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

👍

@thirdeyenick
Copy link
Contributor

Good catch! I think reversing the order for get release might make sense as one would expect the latest release to be on the bottom?

Yeah I was thinking the same, especially since all other resources are sorted by the name, which for example makes the builds be sorted by "latest on the bottom" as they are numbered. I added a bool to reverse (just) the timestamp order, does this make sense to you?

Yeah this makes sense.

@ctrox ctrox merged commit 4863e34 into main Oct 10, 2024
2 checks passed
@ctrox ctrox deleted the release-sort-order branch October 10, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants