Skip to content

Commit

Permalink
Sort channels in lexicographical order in Packagemanifest (#2925)
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 committed Mar 22, 2023
1 parent 3a82ea6 commit 916ddf5
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 916ddf5

Please sign in to comment.