Description of problem:
composite version order is not correct when using "opm alpha render-template "
Version-Release number of selected component (if applicable):
xzha@xzha1-mac catalog % opm version
Version: version.Version{OpmVersion:"v1.63.0-1-g9fa4d9b6", GitCommit:"9fa4d9b6", BuildDate:"2026-02-05T03:20:55Z", GoOs:"darwin", GoArch:"arm64"}
How reproducible:
always
Steps to Reproduce:
1. template file is
xzha@xzha1-mac catalog % cat template.yaml
---
entries:
- defaultChannel: candidate-v1.0
name: nginx87709
schema: olm.package
- entries:
- name: nginx87709.v1.0.1
- name: nginx87709.v1.0.2
skips:
- nginx87709.v1.0.1
name: candidate-v1.0
package: nginx87709
schema: olm.channel
- image: quay.io/olmqe/nginxolm-operator-bundle:v1.0.1-nginx87709
name: nginx87709.v1.0.1
package: nginx87709
properties:
- type: olm.gvk
value:
group: cache.example.com
kind: Nginxolm87709
version: v1alpha1
- type: olm.package
value:
packageName: nginx87709
version: 1.0.1
schema: olm.bundle
- image: quay.io/olmqe/nginxolm-operator-bundle:v1.0.2-nginx87709
name: nginx87709.v1.0.2
package: nginx87709
properties:
- type: olm.gvk
value:
group: cache.example.com
kind: Nginxolm87709
version: v1alpha1
- type: olm.package
value:
packageName: nginx87709
version: 1.0.2
schema: olm.bundle
schema: olm.template.substitutes
substitutions:
- name: quay.io/olmqe/nginxolm-operator-bundle:v1.0.2-20260101-nginx87709
base: nginx87709.v1.0.2
- name: quay.io/olmqe/nginxolm-operator-bundle:v1.0.1-20260101-nginx87709
base: nginx87709.v1.0.1
- name: quay.io/olmqe/nginxolm-operator-bundle:v1.0.1-20260201-nginx87709
base: nginx87709.v1.0.1
- name: quay.io/olmqe/nginxolm-operator-bundle:v1.0.1-alpha-nginx87709
base: nginx87709.v1.0.1
- name: quay.io/olmqe/nginxolm-operator-bundle:v1.0.1-beta-nginx87709
base: nginx87709.v1.0.1
2. opm alpha render-template
xzha@xzha1-mac catalog % opm alpha render-template template.yaml -o yaml > catalog-new/index.yaml
3, check catalog-new
xzha@xzha1-mac catalog % opm alpha list bundles catalog-new
PACKAGE CHANNEL BUNDLE REPLACES SKIPS SKIP RANGE IMAGE
nginx87709 candidate-v1.0 nginx87709-v1.0.1-20260101 nginx87709-v1.0.1-20260201 quay.io/olmqe/nginxolm-operator-bundle:v1.0.1-20260101-nginx87709
nginx87709 candidate-v1.0 nginx87709-v1.0.1-20260201 nginx87709-v1.0.1-alpha quay.io/olmqe/nginxolm-operator-bundle:v1.0.1-20260201-nginx87709
nginx87709 candidate-v1.0 nginx87709-v1.0.1-alpha nginx87709-v1.0.1-beta quay.io/olmqe/nginxolm-operator-bundle:v1.0.1-alpha-nginx87709
nginx87709 candidate-v1.0 nginx87709-v1.0.1-beta nginx87709.v1.0.1 quay.io/olmqe/nginxolm-operator-bundle:v1.0.1-beta-nginx87709
nginx87709 candidate-v1.0 nginx87709-v1.0.2-20260101 nginx87709.v1.0.2,nginx87709-v1.0.1-20260101 quay.io/olmqe/nginxolm-operator-bundle:v1.0.2-20260101-nginx87709
nginx87709 candidate-v1.0 nginx87709.v1.0.1 quay.io/olmqe/nginxolm-operator-bundle:v1.0.1-nginx87709
nginx87709 candidate-v1.0 nginx87709.v1.0.2 quay.io/olmqe/nginxolm-operator-bundle:v1.0.2-nginx87709
3.
Actual results:
the header of the channel candidate-v1.0 is nginx87709-v1.0.1-20260101
Expected results:
the header of the channel candidate-v1.0 is nginx87709-v1.0.1-beta
Additional info: