Fix feature gate filename parsing for major version segmentation#3291
Fix feature gate filename parsing for major version segmentation#3291openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughparseFeatureGateFilename was updated to accept both the old format ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.5.0)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Comment |
openshift/api#2637 introduced major version segmentation for feature gates, changing filenames from featureGate-{topology}-{featureSet}.yaml to featureGate-{majorStart}-{majorEnd}-{topology}-{featureSet}.yaml. The parser was extracting the version range components as topology/featureSet, causing all 4.22 files to collide on the same composite key and fail with "ON CONFLICT DO UPDATE command cannot affect row a second time". Fix by taking the last two dash-separated segments as topology and featureSet, which works for both old and new filename formats. Note: the new files include annotations that could be used instead of filename parsing: release.openshift.io/feature-set for the feature set, include.release.openshift.io/* for the topology (e.g. ibm-cloud-managed maps to Hypershift, self-managed-high-availability maps to SelfManagedHA). The old format (4.21 and earlier) lacks the feature-set annotation but does have the topology include annotation. A future improvement could switch to annotation-based parsing for better reliability, but for now this unbreaks the loader. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Scheduling required tests: |
|
@stbenjam: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: neisw, stbenjam The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
openshift/api#2637 introduced major version segmentation for feature
gates, changing filenames from featureGate-{topology}-{featureSet}.yaml
to featureGate-{majorStart}-{majorEnd}-{topology}-{featureSet}.yaml.
The parser was extracting the version range components as
topology/featureSet, causing all 4.22 files to collide on the same
composite key and fail with "ON CONFLICT DO UPDATE command cannot
affect row a second time".
Fix by taking the last two dash-separated segments as topology and
featureSet, which works for both old and new filename formats.
Note: the new files include annotations that could be used instead of
filename parsing: release.openshift.io/feature-set for the feature set,
include.release.openshift.io/* for the topology (e.g. ibm-cloud-managed
maps to Hypershift, self-managed-high-availability maps to
SelfManagedHA). The old format (4.21 and earlier) lacks the feature-set
annotation but does have the topology include annotation. A future
improvement could switch to annotation-based parsing for better
reliability, but for now this unbreaks the loader.
Summary by CodeRabbit
New Features
Tests