Skip to content

[release-4.18] OCPBUGS-78550: fix wavelength zone name regex#10409

Merged
openshift-merge-bot[bot] merged 2 commits intoopenshift:release-4.18from
tthvo:OCPBUGS-78550
Mar 19, 2026
Merged

[release-4.18] OCPBUGS-78550: fix wavelength zone name regex#10409
openshift-merge-bot[bot] merged 2 commits intoopenshift:release-4.18from
tthvo:OCPBUGS-78550

Conversation

@tthvo
Copy link
Member

@tthvo tthvo commented Mar 18, 2026

This is a manual cherry-pick of #10391 due to git conflicts.

tthvo and others added 2 commits March 18, 2026 14:53
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>
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 18, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ad666ec2-ddfc-459f-b55b-c4ce090fc19a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci-robot
Copy link
Contributor

@tthvo: This pull request references Jira Issue OCPBUGS-77355, which is invalid:

  • expected the bug to target either version "4.18." or "openshift-4.18.", but it targets "4.22.0" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is Verified instead
  • expected Jira Issue OCPBUGS-77355 to depend on a bug targeting a version in 4.19.0, 4.19.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This is a manual cherry-pick of #10391 due to git conflicts.

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
Copy link
Member Author

tthvo commented Mar 18, 2026

/retitle [release-4.18] OCPBUGS-78550: fix wavelength zone name regex

@openshift-ci openshift-ci bot changed the title [release-4.18] OCPBUGS-77355: fix wavelength zone name regex [release-4.18] OCPBUGS-78550: fix wavelength zone name regex Mar 18, 2026
@openshift-ci-robot
Copy link
Contributor

@tthvo: This pull request references Jira Issue OCPBUGS-78550, which is invalid:

  • expected Jira Issue OCPBUGS-78550 to depend on a bug targeting a version in 4.19.0, 4.19.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This is a manual cherry-pick of #10391 due to git conflicts.

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.

@openshift-ci openshift-ci bot requested review from mtulio and patrickdillon March 18, 2026 22:05
@tthvo
Copy link
Member Author

tthvo commented Mar 18, 2026

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 18, 2026
@openshift-ci-robot
Copy link
Contributor

@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
  • bug is open, matching expected state (open)
  • bug target version (4.18.z) matches configured target version for branch (4.18.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-78496 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-78496 targets the "4.19.z" version, which is one of the valid target versions: 4.19.0, 4.19.z
  • bug has dependents

Requesting review from QA contact:
/cc @liweinan

Details

In response to this:

/jira refresh

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.

@openshift-ci openshift-ci bot requested a review from liweinan March 18, 2026 22:07
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 19, 2026

@tthvo: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-edge-zones 015d1ef link false /test e2e-aws-ovn-edge-zones

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@patrickdillon
Copy link
Contributor

/approve
/lgtm
/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Mar 19, 2026
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 19, 2026

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 19, 2026
@liweinan
Copy link
Contributor

I'll verify it today.

@liweinan
Copy link
Contributor

OCPBUGS-78550 Verification Report: PR #10409 (4.18 Backport)

Test Date: 2026-03-19
Test Method: Unit Tests + Permissions Policy Generation
Result: ✅ PASSED


Test Environment

Installer 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.18

Branch: OCPBUGS-78550


Test Procedure

1. Build Installer

git 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 Format

Install config (using new WL Zone format us-east-1-foe-wlz-1a):

compute:
- name: edge
  platform:
    aws:
      zones:
      - us-east-1-foe-wlz-1a  # New format

Command:

./bin/openshift-install create permissions-policy --dir /tmp/test-pr-10409/new-wlz

Output:

level=info msg=Credentials loaded from the "default" profile in file "/Users/weli/.aws/credentials"
level=info msg=Consuming Install Config from target directory
level=info msg=Permissions-Policy created in: /tmp/test-pr-10409/new-wlz

4. Verify Carrier Gateway Permissions

$ jq '.Statement[] | select(.Sid == "PermissionCreateCarrierGateway")' \
    /tmp/test-pr-10409/new-wlz/aws-permissions-policy-creds.json

Result:

{
  "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
12

5. Verify Backward Compatibility (Traditional WL Zone)

Install config (using traditional format us-west-2-wl1-sea-wlz-1):

compute:
- name: edge
  platform:
    aws:
      zones:
      - us-west-2-wl1-sea-wlz-1  # Traditional format

Result:

{
  "Sid": "PermissionCreateCarrierGateway",
  "Effect": "Allow",
  "Action": [
    "ec2:DescribeCarrierGateways",
    "ec2:CreateCarrierGateway",
    "ec2:DeleteCarrierGateway"
  ],
  "Resource": ["*"]
}

✅ Traditional format still works correctly


Test Results

Test Item Status Details
Installer Build ✅ PASS release 4.18
Unit tests ✅ PASS New format WL Zone correctly identified
Policy generation ✅ PASS Policy file created successfully
CAGW permissions ✅ PASS All 3 permissions included
Statement count ✅ PASS 12 statements
Backward compatibility ✅ PASS Traditional zones still work

Conclusion

PR #10409 successfully backports the Wavelength Zone fix to 4.18

  • New format Wavelength Zone (us-east-1-foe-wlz-1a) is correctly recognized
  • Generated IAM policy includes required Carrier Gateway permissions
  • Unit tests confirm regex pattern fix works as expected
  • Backward compatibility maintained for traditional WL zone formats

Verified by: @liweinan
Related PRs:

@liweinan
Copy link
Contributor

/verified by liweinan

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 19, 2026
@openshift-ci-robot
Copy link
Contributor

@liweinan: This PR has been marked as verified by liweinan.

Details

In response to this:

/verified by liweinan

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 488926d into openshift:release-4.18 Mar 19, 2026
26 of 27 checks passed
@openshift-ci-robot
Copy link
Contributor

@tthvo: Jira Issue Verification Checks: Jira Issue OCPBUGS-78550
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

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. 🕓

Details

In response to this:

This is a manual cherry-pick of #10391 due to git conflicts.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants