NO-ISSUE: fix: set channel.default.v1 annotation to bundle's own channel#1260
Conversation
The prepare-upstream.sh script was setting the bundle's channel.default.v1 annotation to DEFAULT_CHANNEL (the package-level default, e.g. stable-3.17), even when the bundle only belongs to a different channel (e.g. stable-3.9). This causes the community-operators FBC pipeline to fail: the build-fbc-scratch-catalog step creates a minimal scratch catalog containing only the bundle's channel but sets defaultChannel to the value from channel.default.v1 — OPM rejects this because the referenced default channel doesn't exist in the catalog. The fix changes channel.default.v1 to use CHANNEL (the bundle's own channel) instead of DEFAULT_CHANNEL. The package-level default channel is managed separately in the FBC catalog template, not in individual bundle annotations. This is consistent with hack/build.sh which already uses CHANNEL for both annotations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Marcus Kok <mkok@redhat.com>
WalkthroughThe operator bundle preparation script now uses the ChangesBundle Channel Annotation Update
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
|
@Marcusk19: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/cherrypick redhat-3.17 |
|
/cherrypick redhat-3.16 |
|
/cherrypick redhat-3.15 |
|
/cherrypick redhat-3.14 |
|
/cherrypick redhat-3.12 |
|
/cherrypick redhat-3.10 |
|
/cherrypick redhat-3.9 |
|
@Marcusk19: new pull request created: #1261 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@Marcusk19: new pull request created: #1262 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@Marcusk19: new pull request created: #1263 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@Marcusk19: new pull request created: #1264 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@Marcusk19: new pull request created: #1265 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@Marcusk19: new pull request created: #1266 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@Marcusk19: new pull request created: #1267 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Summary
hack/prepare-upstream.shto set the bundle'schannel.default.v1annotation toCHANNEL(the bundle's own channel) instead ofDEFAULT_CHANNEL(the package-level default channel).stable-3.9), the bundle annotations were previously set tochannel.default.v1: stable-3.17andchannels.v1: stable-3.9. This caused the community-operators-prod FBC pipeline to fail.prepare-upstream.shwithhack/build.sh, which already usesCHANNELfor both annotations.Problem
The
build_scratch_catalog.pystep in the operator-pipelines FBC validation creates a minimal scratch catalog containing only the bundle's declared channel (channels.v1). It then readschannel.default.v1from the bundle annotations and sets that as thedefaultChannelin the catalog. Whenchannel.default.v1points to a channel that doesn't exist in the scratch catalog (e.g.stable-3.17when the bundle only belongs tostable-3.9), OPM rejects the catalog with a validation error.The package-level default channel is managed in the FBC catalog template (
catalogs/*/catalog-template.yaml), not in individual bundle annotations. Settingchannel.default.v1to the bundle's own channel is the correct behavior for bundle-level metadata.Discovered while investigating community-operators-prod failures: #9576, #9572, #9570.
Test plan
prepare-releasewithCHANNEL=stable-3.9andDEFAULT_CHANNEL=stable-3.17now produceschannel.default.v1: stable-3.9inbundle/metadata/annotations.yaml🤖 Generated with Claude Code