[release-4.18] OCPBUGS-78550: fix wavelength zone name regex#10409
[release-4.18] OCPBUGS-78550: fix wavelength zone name regex#10409openshift-merge-bot[bot] merged 2 commits intoopenshift:release-4.18from
Conversation
The correct regex should check for segment "-wlz", which is common for all "known" wavelength zones. One example where the old regex "wl\d\-.*$" would fail is us-east-1-foe-wlz-1a.
Add comprehensive test coverage for OCPBUGS-77355 fix that updates the Wavelength Zone detection regex from 'wl\d\-.*$' to '-wlz.*$'. Test cases added: - Test traditional format WL zones (us-west-2-wl1-sea-wlz-1) - Test new format WL zones (us-east-1-foe-wlz-1a) - PRIMARY FIX - Test mixed traditional and new format zones - Test only new format zones The new regex correctly identifies all Wavelength Zone formats that contain the '-wlz' segment, including the new format zones that were previously not recognized by the old 'wl\d\-' pattern. Co-authored-by: Wei Nan Li <weli@redhat.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
|
@tthvo: This pull request references Jira Issue OCPBUGS-77355, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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. |
|
/retitle [release-4.18] OCPBUGS-78550: fix wavelength zone name regex |
|
@tthvo: This pull request references Jira Issue OCPBUGS-78550, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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. |
|
/jira refresh |
|
@tthvo: This pull request references Jira Issue OCPBUGS-78550, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
Requesting review from QA contact: 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. |
|
@tthvo: 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. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: patrickdillon 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 |
|
I'll verify it today. |
OCPBUGS-78550 Verification Report: PR #10409 (4.18 Backport)Test Date: 2026-03-19 Test EnvironmentInstaller Version: $ ./bin/openshift-install version
./bin/openshift-install unreleased-master-11485-g015d1ef0cb80859dfa4c24a518b5bdb88b0b6704
built from commit 015d1ef0cb80859dfa4c24a518b5bdb88b0b6704
release image registry.ci.openshift.org/origin/release:4.18Branch: Test Procedure1. Build Installergit fetch origin pull/10409/head:pr-10409-4.18
git checkout pr-10409-4.18
SKIP_TERRAFORM=y hack/build.sh✅ Build completed successfully 2. Run Unit Tests$ go test -v ./pkg/asset/installconfig/aws -run TestIncludesWavelengthZones
=== RUN TestIncludesWavelengthZones
=== RUN TestIncludesWavelengthZones/Should_be_true_when_edge_compute_specified_with_WL_zones
=== RUN TestIncludesWavelengthZones/Should_be_true_when_edge_compute_specified_with_WL_zones/with_common_wavelength_zone_format
=== RUN TestIncludesWavelengthZones/Should_be_true_when_edge_compute_specified_with_WL_zones/with_irregular_wavelength_zone_format
=== RUN TestIncludesWavelengthZones/Should_be_false_when
=== RUN TestIncludesWavelengthZones/Should_be_false_when/edge_compute_specified_without_WL_zones
=== RUN TestIncludesWavelengthZones/Should_be_false_when/edge_compute_not_specified
--- PASS: TestIncludesWavelengthZones (0.00s)
PASS
ok github.com/openshift/installer/pkg/asset/installconfig/aws 0.798s✅ All unit tests passed 3. Generate Permissions Policy with New WL Zone FormatInstall config (using new WL Zone format compute:
- name: edge
platform:
aws:
zones:
- us-east-1-foe-wlz-1a # New formatCommand: ./bin/openshift-install create permissions-policy --dir /tmp/test-pr-10409/new-wlzOutput: 4. Verify Carrier Gateway Permissions$ jq '.Statement[] | select(.Sid == "PermissionCreateCarrierGateway")' \
/tmp/test-pr-10409/new-wlz/aws-permissions-policy-creds.jsonResult: {
"Sid": "PermissionCreateCarrierGateway",
"Effect": "Allow",
"Action": [
"ec2:DescribeCarrierGateways",
"ec2:CreateCarrierGateway",
"ec2:DeleteCarrierGateway"
],
"Resource": [
"*"
]
}✅ Carrier Gateway permissions present in generated policy $ jq '.Statement | length' /tmp/test-pr-10409/new-wlz/aws-permissions-policy-creds.json
125. Verify Backward Compatibility (Traditional WL Zone)Install config (using traditional format compute:
- name: edge
platform:
aws:
zones:
- us-west-2-wl1-sea-wlz-1 # Traditional formatResult: {
"Sid": "PermissionCreateCarrierGateway",
"Effect": "Allow",
"Action": [
"ec2:DescribeCarrierGateways",
"ec2:CreateCarrierGateway",
"ec2:DeleteCarrierGateway"
],
"Resource": ["*"]
}✅ Traditional format still works correctly Test Results
Conclusion✅ PR #10409 successfully backports the Wavelength Zone fix to 4.18
Verified by: @liweinan
|
|
/verified by liweinan |
|
@liweinan: This PR has been marked as verified by 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. |
488926d
into
openshift:release-4.18
|
@tthvo: Jira Issue Verification Checks: Jira Issue OCPBUGS-78550 Jira Issue OCPBUGS-78550 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 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. |
This is a manual cherry-pick of #10391 due to git conflicts.