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 <[email protected]>
Upstream-repository: operator-lifecycle-manager
Upstream-commit: e4b15326c297f610dbf569d771abd62a703b0eb2
  • Loading branch information
anik120 authored and perdasilva committed Mar 7, 2023
1 parent 6302b3d commit d534b17
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/manifests/csv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: packageserver
namespace: openshift-operator-lifecycle-manager
labels:
olm.version: 0.0.0-8611b9bcfdc4690313d2743d1a36717080abb421
olm.version: 0.0.0-0357fe300b10525109ed7dbb6b27127f6b57a162
olm.clusteroperator.name: operator-lifecycle-manager-packageserver
annotations:
include.release.openshift.io/self-managed-high-availability: "true"
Expand Down Expand Up @@ -159,7 +159,7 @@ spec:
- packageserver
topologyKey: "kubernetes.io/hostname"
maturity: alpha
version: 0.0.0-8611b9bcfdc4690313d2743d1a36717080abb421
version: 0.0.0-0357fe300b10525109ed7dbb6b27127f6b57a162
apiservicedefinitions:
owned:
- group: packages.operators.coreos.com
Expand Down
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

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d534b17

Please sign in to comment.