Skip to content

Commit

Permalink
Sort channels in lexicographical order in Packagemanifest
Browse files Browse the repository at this point in the history
See operator-framework/operator-registry#1069
for more details

Signed-off-by: Anik <anikbhattacharya93@gmail.com>
  • Loading branch information
anik120 authored and perdasilva committed Feb 28, 2023
1 parent 1fed5af commit ca055ba
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/package-server/provider/registry.go
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 ca055ba

Please sign in to comment.