Skip to content

Commit

Permalink
OCPBUGS-7910: Sort channels in lexicographical order in Packagemanife…
Browse files Browse the repository at this point in the history
…st (#2925)

See operator-framework/operator-registry#1069
for more details

Signed-off-by: Anik <[email protected]>

Upstream-repository: operator-lifecycle-manager
Upstream-commit: e4b15326c297f610dbf569d771abd62a703b0eb2
  • Loading branch information
anik120 committed Mar 22, 2023
1 parent 3a82ea6 commit 4d388fa
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,9 @@ func (p *RegistryProvider) List(namespace string, selector labels.Selector) (*op

func newPackageManifest(ctx context.Context, logger *logrus.Entry, pkg *api.Package, client *registryClient, entriesByChannel map[string][]operators.ChannelEntry) (*operators.PackageManifest, error) {
pkgChannels := pkg.GetChannels()
sort.Slice(pkgChannels, func(i, j int) bool {
return pkgChannels[i].Name < pkgChannels[j].Name
})
catsrc := client.catsrc
manifest := &operators.PackageManifest{
ObjectMeta: metav1.ObjectMeta{
Expand Down
Loading

0 comments on commit 4d388fa

Please sign in to comment.