Skip to content

Commit 9a410ec

Browse files
committed
WIP: sort channels in lexicographical order in packagemanifest
1 parent 4bae06a commit 9a410ec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-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)