-
Notifications
You must be signed in to change notification settings - Fork 249
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
Package sort for deterministic ordering in ListBundles API #1084
Package sort for deterministic ordering in ListBundles API #1084
Conversation
Skipping CI for Draft Pull Request. |
Codecov Report
@@ Coverage Diff @@
## master #1084 +/- ##
==========================================
+ Coverage 52.57% 52.61% +0.03%
==========================================
Files 107 107
Lines 9384 9389 +5
==========================================
+ Hits 4934 4940 +6
+ Misses 3523 3522 -1
Partials 927 927
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -34,6 +35,7 @@ func (pkgs packageIndex) GetPackage(_ context.Context, name string) (*registry.P | |||
CurrentCSVName: ch.Head, | |||
}) | |||
} | |||
sort.Slice(channels, func(i, j int) bool { return strings.Compare(channels[i].Name, channels[j].Name) < 0 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This come up in a different conversation somewhere didn't it? Did we never fix this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you're thinking of operator-lifecycle-manager/pull/2925 ?
Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
This solves the ordering issues of the bundles, but not of the package manifests, a related, but separate issue.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: grokspawn, tmshort The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…framework#1084) * impose order on maps Signed-off-by: Jordan Keister <jordan@nimblewidget.com> * now modding GetBundle Signed-off-by: Jordan Keister <jordan@nimblewidget.com> * more terse Signed-off-by: Jordan Keister <jordan@nimblewidget.com> * forgot bundles Signed-off-by: Jordan Keister <jordan@nimblewidget.com> --------- Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
Description of the change:
Motivation for the change:
solves #1069
Reviewer Checklist
/docs