Skip to content

Commit

Permalink
WIP: sort channels in lexicographical order in packagemanifest
Browse files Browse the repository at this point in the history
  • Loading branch information
anik120 committed Feb 22, 2023
1 parent 4bae06a commit 9a410ec
Showing 1 changed file with 3 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

0 comments on commit 9a410ec

Please sign in to comment.