Fix foundation plugin catalog source migration names#507
Conversation
The migration was failing to find subscriptions because:
- legacy_source incorrectly used "cs-mirror-redhat-operators-v4-20"
instead of "cs-redhat-operator-index-v4-20" (the actual 0.1.0 name)
- new_source used an undefined catalog_mirror variable and incorrect format
Changes:
- Hard-code legacy_source to "cs-redhat-operator-index-v4-20"
- Fix new_source to "cs-{{ mirror_rh_operator_catalog }}-{{ plugin.name }}-v4-20"
- Only migrate redhat catalog plugins (exclude certified catalog)
This allows subscriptions to correctly migrate from cs-redhat-operator-index-v4-20
to plugin-specific sources like cs-mirror-redhat-operators-lvms-v4-20.
Assisted-by: Claude Code <noreply@anthropic.com>
WalkthroughThe migration task for foundation plugin operator subscriptions replaces dynamic ChangesFoundation Plugin Catalog Source Migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Remove complex ternary logic for catalog selection and only handle redhat catalog foundation plugins (LVMS, ODF). Certified catalog plugins like vast-csi are excluded from this migration. Changes: - Replace ternary catalog selection with direct redhat catalog variables - Add when condition to filter for redhat catalog plugins only - Simplifies catalog_image, catalog_mirror, and catalog_version vars Assisted-by: Claude Code <noreply@anthropic.com>
Use plugin.catalog instead of fleet_plugin.catalog to match the vars block where plugin is defined. Assisted-by: Claude Code <noreply@anthropic.com>
|
success indicated via slack |
rporres
left a comment
There was a problem hiding this comment.
yes, I tested this RHDP and works fine
Summary
Fixes the foundation plugin catalog source migration to use correct catalog source names.
Problem
The 0.1.0 to 0.1.1 upgrade migration was failing to migrate foundation plugin operator subscriptions because:
legacy_sourcewas wrong: Usedcs-mirror-redhat-operators-v4-20but 0.1.0 actually usedcs-redhat-operator-index-v4-20. example: https://github.com/rh-ecosystem-edge/enclave/blob/0.1.0/plugins/lvms/plugin.yaml#L13new_sourcewas wrong: Used undefinedcatalog_mirrorvariable and incorrect formatChanges
legacy_sourcetocs-redhat-operator-index-v4-20(actual 0.1.0 catalog source name)new_sourcetocs-{{ mirror_rh_operator_catalog }}-{{ plugin.name }}-v4-20(e.g.,cs-mirror-redhat-operators-lvms-v4-20)plugin.catalog | default('redhat') == 'redhat'conditionTest plan
References
🤖 Generated with Claude Code
Summary by CodeRabbit