chore: remove AWSServiceLBNetworkSecurityGroup feature gate references - #500
Conversation
The AWSServiceLBNetworkSecurityGroup feature gate has been promoted to GA and is always enabled. Remove the feature gate check from the AWS cloud config transformer so NLBSecurityGroupMode=Managed is set unconditionally, and clean up related tests and docs. Test names containing the feature gate are preserved for component readiness reporting stability.
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
WalkthroughManaged NLB security groups are now always configured in ChangesManaged NLB security groups
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (13 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/hold |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pkg/cloud/aws/aws_config_transformer_test.go (1)
53-54: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd coverage for an existing non-Managed mode.
All current inputs omit
NLBSecurityGroupMode, so these cases exercise only the empty-value path. Add a fixture with a non-Managed value and assert that the serialized output isNLBSecurityGroupMode = Managed.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/cloud/aws/aws_config_transformer_test.go` around lines 53 - 54, Extend the AWS CloudConfig transformation test fixtures to include an explicit non-Managed NLBSecurityGroupMode input, and assert that serialization outputs NLBSecurityGroupMode = Managed. Preserve the existing empty-value cases while adding coverage for this normalization behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@openshift-tests/ccm-aws-tests/e2e/aws/loadbalancer.go`:
- Around line 48-51: Update the assertion description for the
NLBSecurityGroupMode test to remove the outdated feature-gate condition and
state only that NLBSecurityGroupMode must be set to “Managed” in cloud-config.
Keep the test behavior unchanged.
---
Nitpick comments:
In `@pkg/cloud/aws/aws_config_transformer_test.go`:
- Around line 53-54: Extend the AWS CloudConfig transformation test fixtures to
include an explicit non-Managed NLBSecurityGroupMode input, and assert that
serialization outputs NLBSecurityGroupMode = Managed. Preserve the existing
empty-value cases while adding coverage for this normalization behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 6acfa20b-1be5-4ea8-b293-308346418160
📒 Files selected for processing (8)
docs/dev/e2e-ote-ccm-aws.mdopenshift-tests/README.mdopenshift-tests/ccm-aws-tests/e2e/aws/helper.goopenshift-tests/ccm-aws-tests/e2e/aws/loadbalancer.goopenshift-tests/ccm-aws-tests/e2e/common/helper.gopkg/cloud/aws/aws_config_transformer.gopkg/cloud/aws/aws_config_transformer_test.gopkg/controllers/cloud_config_sync_controller_test.go
💤 Files with no reviewable changes (2)
- openshift-tests/README.md
- openshift-tests/ccm-aws-tests/e2e/aws/helper.go
| // Test: [cloud-provider-aws-e2e-openshift] loadbalancer NLB [OCPFeatureGate:AWSServiceLBNetworkSecurityGroup] should have NLBSecurityGroupMode with 'Managed' value in cloud-config | ||
| // | ||
| // Validates that the cloud controller manager's configuration contains the proper NLBSecurityGroupMode setting | ||
| // when the AWSServiceLBNetworkSecurityGroup feature gate is enabled. | ||
| // | ||
| // Prerequisites: | ||
| // - AWSServiceLBNetworkSecurityGroup feature gate is enabled | ||
| // | ||
| // Expected Results: | ||
| // - ConfigMap exists and contains cloud.conf key | ||
| // - Configuration includes: NLBSecurityGroupMode set to 'Managed' | ||
| // - The test must fail if the feature gate is enabled and the configuration does not include NLBSecurityGroupMode set to 'Managed' | ||
| // - The test must skip if the feature gate is not enabled | ||
| // Validates that the cloud controller manager's configuration contains NLBSecurityGroupMode set to 'Managed'. | ||
| It("should have NLBSecurityGroupMode with 'Managed value in cloud-config", func(ctx context.Context) { |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Update the assertion message for unconditional behavior.
The test no longer checks AWSServiceLBNetworkSecurityGroup. The assertion at Line 62 still says when feature gate is enabled. Change it to state that NLBSecurityGroupMode must be Managed in cloud-config.
Proposed wording
- "NLBSecurityGroupMode must be set to 'Managed' in cloud-config when feature gate is enabled")
+ "NLBSecurityGroupMode must be set to 'Managed' in cloud-config")🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@openshift-tests/ccm-aws-tests/e2e/aws/loadbalancer.go` around lines 48 - 51,
Update the assertion description for the NLBSecurityGroupMode test to remove the
outdated feature-gate condition and state only that NLBSecurityGroupMode must be
set to “Managed” in cloud-config. Keep the test behavior unchanged.
|
@damdo: The following test failed, say
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. |
Summary
AWSServiceLBNetworkSecurityGroupfeature gate check from the AWS cloud config transformer —NLBSecurityGroupMode=Managedis now set unconditionallyisFeatureGateEnabledhelper function (no longer used)[OCPFeatureGate:AWSServiceLBNetworkSecurityGroup]are preserved for component readiness reporting stabilityTest plan
go test ./pkg/cloud/aws/...passesgo build ./pkg/...compiles successfullyAWSServiceLBNetworkSecurityGroupremain (only test names and their constant)Related
Summary by CodeRabbit
New Features
Bug Fixes
Documentation