Skip to content

Commit 4187bc5

Browse files
committed
Sort channels in lexicographical order in Packagemanifest
See issue #1069 for more details
1 parent 4bae06a commit 4187bc5

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed

Diff for: pkg/package-server/provider/registry.go

+3
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,9 @@ func (p *RegistryProvider) List(namespace string, selector labels.Selector) (*op
512512

513513
func newPackageManifest(ctx context.Context, logger *logrus.Entry, pkg *api.Package, client *registryClient, entriesByChannel map[string][]operators.ChannelEntry) (*operators.PackageManifest, error) {
514514
pkgChannels := pkg.GetChannels()
515+
sort.Slice(pkgChannels, func(i, j int) bool {
516+
return pkgChannels[i].Name < pkgChannels[j].Name
517+
})
515518
catsrc := client.catsrc
516519
manifest := &operators.PackageManifest{
517520
ObjectMeta: metav1.ObjectMeta{

0 commit comments

Comments
 (0)