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>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: e4b15326c297f610dbf569d771abd62a703b0eb2
  • Loading branch information
anik120 authored and perdasilva committed Mar 7, 2023
1 parent 78bdc89 commit 5600ff4
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 5600ff4

Please sign in to comment.