Skip to content

[DNM] Fix Local Zone subnet validation in cucushift-installer-check-aws-custom-vpc#80456

Open
MrSanketkumar wants to merge 1 commit into
openshift:mainfrom
MrSanketkumar:fix-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive-4.14
Open

[DNM] Fix Local Zone subnet validation in cucushift-installer-check-aws-custom-vpc#80456
MrSanketkumar wants to merge 1 commit into
openshift:mainfrom
MrSanketkumar:fix-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive-4.14

Conversation

@MrSanketkumar

@MrSanketkumar MrSanketkumar commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Problem:
The validation step cucushift-installer-check-aws-custom-vpc fails for Local Zone configurations because it expects ALL subnets to have the kubernetes.io/cluster/:shared tag, but Local Zone subnets are correctly tagged as kubernetes.io/cluster/unmanaged:true instead.

Failed Job:
periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive

Error:
FAIL: check tag [kubernetes.io/cluster/ci-op-ghrnctn8-00fbe-l6scc:shared], found 6, but expect 7

Root Cause Analysis:
The script validates ALL subnets from install-config must have the 'shared' tag (lines 73-74), but doesn't account for Edge/Local Zone subnets that are intentionally tagged as 'unmanaged'. The ENABLE_AWS_EDGE_ZONE parameter exists but is only used for EdgeNode validation later (line 193), after the main tag check has already failed.

When the provision chain sets ENABLE_AWS_EDGE_ZONE=yes:

  • 7 total subnets (6 regular + 1 Local Zone)
  • 6 subnets have 'shared' tag (correct)
  • 1 Local Zone subnet has 'unmanaged' tag (correct)
  • Script expects 7 with 'shared' tag (incorrect)

Solution:
Updated the tag count logic to exclude subnets tagged as 'unmanaged' when ENABLE_AWS_EDGE_ZONE=yes. This allows Local Zone subnets to be properly excluded from the managed subnet count while still validating that all managed subnets have the required cluster tag.

Changes:

  • Added conditional logic to check ENABLE_AWS_EDGE_ZONE parameter
  • Count unmanaged subnets when Edge Zone is enabled
  • Subtract unmanaged count from expected managed subnet count
  • Added INFO logging for Edge Zone subnet count calculation

Testing:
/test rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive

Expected output after fix:
INFO: Edge Zone enabled - total subnets=7, unmanaged subnets=1, expecting managed subnets=6 PASS: check tag [kubernetes.io/cluster/:shared]

Summary by CodeRabbit

Bug Fixes

  • Enhanced subnet count validation for AWS custom VPC configurations in CI/CD to properly account for edge zone deployments by adjusting expected managed subnet counts and filtering unmanaged subnets from calculations.

…tom-vpc

Problem:
The validation step cucushift-installer-check-aws-custom-vpc fails for
Local Zone configurations because it expects ALL subnets to have the
kubernetes.io/cluster/<infra-id>:shared tag, but Local Zone subnets
are correctly tagged as kubernetes.io/cluster/unmanaged:true instead.

Failed Job:
periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive

Error:
FAIL: check tag [kubernetes.io/cluster/ci-op-ghrnctn8-00fbe-l6scc:shared], found 6, but expect 7

Root Cause Analysis:
The script validates ALL subnets from install-config must have the 'shared'
tag (lines 73-74), but doesn't account for Edge/Local Zone subnets that are
intentionally tagged as 'unmanaged'. The ENABLE_AWS_EDGE_ZONE parameter
exists but is only used for EdgeNode validation later (line 193), after
the main tag check has already failed.

When the provision chain sets ENABLE_AWS_EDGE_ZONE=yes:
- 7 total subnets (6 regular + 1 Local Zone)
- 6 subnets have 'shared' tag (correct)
- 1 Local Zone subnet has 'unmanaged' tag (correct)
- Script expects 7 with 'shared' tag (incorrect)

Solution:
Updated the tag count logic to exclude subnets tagged as 'unmanaged'
when ENABLE_AWS_EDGE_ZONE=yes. This allows Local Zone subnets to be
properly excluded from the managed subnet count while still validating
that all managed subnets have the required cluster tag.

Changes:
- Added conditional logic to check ENABLE_AWS_EDGE_ZONE parameter
- Count unmanaged subnets when Edge Zone is enabled
- Subtract unmanaged count from expected managed subnet count
- Added INFO logging for Edge Zone subnet count calculation

Testing:
/test rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive

Expected output after fix:
INFO: Edge Zone enabled - total subnets=7, unmanaged subnets=1, expecting managed subnets=6
PASS: check tag [kubernetes.io/cluster/<infra-id>:shared]
@MrSanketkumar

Copy link
Copy Markdown
Contributor Author

/DNM

@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@MrSanketkumar: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test boskos-config
/test boskos-config-generation
/test check-gh-automation
/test check-gh-automation-tide
/test check-trigger-trusted-apps
/test ci-operator-config
/test ci-operator-config-metadata
/test ci-operator-registry
/test ci-secret-bootstrap-config-validation
/test ci-testgrid-allow-list
/test clusterimageset-validate
/test config
/test core-valid
/test generated-config
/test generated-dashboards
/test hyperfleet-risk-scorer-test
/test image-mirroring-config-validation
/test jira-lifecycle-config
/test labels
/test openshift-image-mirror-mappings
/test ordered-prow-config
/test owners
/test pr-reminder-config
/test prow-config
/test prow-config-filenames
/test prow-config-semantics
/test pylint
/test release-config
/test release-controller-config
/test rover-groups-config-validation
/test secret-generator-config-valid
/test services-valid
/test stackrox-stackrox-stackrox-stackrox-check
/test step-registry-metadata
/test step-registry-shellcheck
/test sync-rover-groups
/test verified-config
/test yamllint

The following commands are available to trigger optional jobs:

/test check-cluster-profiles-config

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-release-main-ci-operator-config
pull-ci-openshift-release-main-ci-operator-registry
pull-ci-openshift-release-main-core-valid
pull-ci-openshift-release-main-owners
pull-ci-openshift-release-main-release-controller-config
pull-ci-openshift-release-main-step-registry-metadata
pull-ci-openshift-release-main-step-registry-shellcheck
pull-ci-openshift-release-openshift-image-mirror-mappings
Details

In response to this:

Problem:
The validation step cucushift-installer-check-aws-custom-vpc fails for Local Zone configurations because it expects ALL subnets to have the kubernetes.io/cluster/:shared tag, but Local Zone subnets are correctly tagged as kubernetes.io/cluster/unmanaged:true instead.

Failed Job:
periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive

Error:
FAIL: check tag [kubernetes.io/cluster/ci-op-ghrnctn8-00fbe-l6scc:shared], found 6, but expect 7

Root Cause Analysis:
The script validates ALL subnets from install-config must have the 'shared' tag (lines 73-74), but doesn't account for Edge/Local Zone subnets that are intentionally tagged as 'unmanaged'. The ENABLE_AWS_EDGE_ZONE parameter exists but is only used for EdgeNode validation later (line 193), after the main tag check has already failed.

When the provision chain sets ENABLE_AWS_EDGE_ZONE=yes:

  • 7 total subnets (6 regular + 1 Local Zone)
  • 6 subnets have 'shared' tag (correct)
  • 1 Local Zone subnet has 'unmanaged' tag (correct)
  • Script expects 7 with 'shared' tag (incorrect)

Solution:
Updated the tag count logic to exclude subnets tagged as 'unmanaged' when ENABLE_AWS_EDGE_ZONE=yes. This allows Local Zone subnets to be properly excluded from the managed subnet count while still validating that all managed subnets have the required cluster tag.

Changes:

  • Added conditional logic to check ENABLE_AWS_EDGE_ZONE parameter
  • Count unmanaged subnets when Edge Zone is enabled
  • Subtract unmanaged count from expected managed subnet count
  • Added INFO logging for Edge Zone subnet count calculation

Testing:
/test rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive

Expected output after fix:
INFO: Edge Zone enabled - total subnets=7, unmanaged subnets=1, expecting managed subnets=6 PASS: check tag [kubernetes.io/cluster/:shared]

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.

@MrSanketkumar

Copy link
Copy Markdown
Contributor Author

/hold

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This PR updates a CI step script to conditionally adjust expected subnet count validation based on AWS edge zone configuration. When edge zones are enabled, the expected count subtracts unmanaged subnets from the total; otherwise it uses the original total-subnet value.

Changes

Edge-zone-aware subnet count validation

Layer / File(s) Summary
Edge-zone-aware subnet count calculation
ci-operator/step-registry/cucushift/installer/check/aws/custom-vpc/cucushift-installer-check-aws-custom-vpc-commands.sh
When ENABLE_AWS_EDGE_ZONE=yes, expected managed-subnet count is calculated by subtracting unmanaged-tagged subnets from total BYO subnets, with logging of the derived counts; otherwise the original total-subnet expectation is preserved. The failure comparison logic remains unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Single Node Openshift (Sno) Test Compatibility ❓ Inconclusive Custom check execution failed before a final verdict was produced. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: fixing Local Zone subnet validation in the aws-custom-vpc check script by adjusting expected subnet counts for edge zones.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Repo has no Go Ginkgo tests (no “ginkgo”, “It(”, “Describe(”, “Context(”, “When(” in *.go), and the PR only touches a bash script, so no dynamic test titles were introduced.
Test Structure And Quality ✅ Passed PR #80456 changes only ci-operator step-registry shell script (1 file); no Ginkgo test code was modified, so the test-structure quality checks are not applicable.
Microshift Test Compatibility ✅ Passed PR #80456 only changes the aws custom-vpc installer-check shell script; no Ginkgo e2e tests (It/Describe/etc.) are present in that file.
Topology-Aware Scheduling Compatibility ✅ Passed The PR updates an AWS subnet-tag validation shell script (ENABLE_AWS_EDGE_ZONE logic) and does not add/modify any scheduling constraints, affinity, topology spread, or control-plane/worker targeting.
Ote Binary Stdout Contract ✅ Passed PR #80456 only changes cucushift-installer-check-aws-custom-vpc-commands.sh; git diff shows 0 .go changes, so no OTE Go main/stdout contract violations were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR only updates a bash installer check script (tag-count logic); it contains no Ginkgo e2e tests and no IPv4-only networking literals/CIDRs or public download/connectivity code.
No-Weak-Crypto ✅ Passed Scanned cucushift-installer-check-aws-custom-vpc-commands.sh: no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB terms and no crypto/token/secret comparisons—only subnet tag-count logic (jq tag equality/counting).
Container-Privileges ✅ Passed PR modifies only a bash script; the related container definition (ref.yaml) has no privileged settings, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation.
No-Sensitive-Data-In-Logs ✅ Passed Inspected cucushift-installer-check-aws-custom-vpc-commands.sh: added INFO log only prints subnet counts; no echoes/prints of passwords, tokens, API keys, PII, or hostnames/DNSName.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 12, 2026
@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MrSanketkumar

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 Jun 12, 2026
@openshift-ci openshift-ci Bot requested review from smg247 and xueqzhan June 12, 2026 06:23
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@MrSanketkumar: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-priv-openshift-tests-private-main-debug-disasterrecovery-aws-ipi openshift-priv/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-priv-openshift-tests-private-release-5.1-debug-disasterrecovery-aws-ipi openshift-priv/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-priv-openshift-tests-private-release-5.0-debug-disasterrecovery-aws-ipi openshift-priv/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-priv-openshift-tests-private-release-4.23-debug-disasterrecovery-aws-ipi openshift-priv/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-priv-openshift-tests-private-release-4.22-debug-disasterrecovery-aws-ipi openshift-priv/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-priv-openshift-tests-private-release-4.21-debug-disasterrecovery-aws-ipi openshift-priv/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-priv-openshift-tests-private-release-4.20-debug-disasterrecovery-aws-ipi openshift-priv/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-priv-openshift-tests-private-release-4.11-debug-disasterrecovery-aws-ipi openshift-priv/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-priv-openshift-tests-private-release-4.10-debug-disasterrecovery-aws-ipi openshift-priv/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-main-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-5.1-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-5.0-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.23-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.22-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.21-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.20-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.19-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.18-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.17-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.16-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.15-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.14-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.13-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.12-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed
pull-ci-openshift-openshift-tests-private-release-4.11-debug-disasterrecovery-aws-ipi openshift/openshift-tests-private presubmit Registry content changed

A total of 1539 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs.

A full list of affected jobs can be found here
Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
ci-operator/step-registry/cucushift/installer/check/aws/custom-vpc/cucushift-installer-check-aws-custom-vpc-commands.sh (1)

78-80: ⚡ Quick win

Consider validating numeric values before arithmetic.

The edge-zone branch performs arithmetic (total_subnets - unmanaged_cnt) without validating that the jq query succeeded or that unmanaged_cnt is numeric. If the jq filter fails silently or returns non-numeric output, the arithmetic could produce an incorrect or negative expect_cnt, leading to a confusing failure message at line 87.

🛡️ Proposed validation
   # For Edge Zone scenarios, exclude subnets tagged as 'kubernetes.io/cluster/unmanaged:true'
-  unmanaged_cnt=$(jq -r '[.Subnets[] | select(any(.Tags[]; .Key == "kubernetes.io/cluster/unmanaged" and .Value == "true"))] | length' "$out")
+  unmanaged_cnt=$(jq -r '[.Subnets[] | select(any(.Tags[]; .Key == "kubernetes.io/cluster/unmanaged" and .Value == "true"))] | length' "$out" || echo "0")
+  if ! [[ "$unmanaged_cnt" =~ ^[0-9]+$ ]]; then
+    echo "ERROR: Failed to count unmanaged subnets"
+    exit 1
+  fi
   total_subnets=$(echo "${ic_subnets}" | wc -w)
   expect_cnt=$((total_subnets - unmanaged_cnt))
+  if ((expect_cnt < 0)); then
+    echo "ERROR: Unmanaged subnet count ($unmanaged_cnt) exceeds total subnets ($total_subnets)"
+    exit 1
+  fi
   echo "INFO: Edge Zone enabled - total subnets=${total_subnets}, unmanaged subnets=${unmanaged_cnt}, expecting managed subnets=${expect_cnt}"
🤖 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
`@ci-operator/step-registry/cucushift/installer/check/aws/custom-vpc/cucushift-installer-check-aws-custom-vpc-commands.sh`
around lines 78 - 80, Validate that the jq call produced a numeric unmanaged_cnt
and that total_subnets is numeric before computing expect_cnt: check jq's exit
status and/or test unmanaged_cnt with a numeric regex (e.g., ^[0-9]+$) and treat
non-numeric or failed jq results as an error or default to 0, likewise validate
total_subnets derived from ic_subnets, then compute expect_cnt only after both
are sanitized so subtraction cannot produce unexpected negative or non-numeric
values; update the variables mentioned (unmanaged_cnt, total_subnets,
expect_cnt) and add a clear error/log path if validation fails.
🤖 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
`@ci-operator/step-registry/cucushift/installer/check/aws/custom-vpc/cucushift-installer-check-aws-custom-vpc-commands.sh`:
- Line 78: The jq invocations use unquoted variable expansions which can cause
word-splitting/globbing (SC2086); update the commands that compute unmanaged_cnt
and the similar expressions on lines 79 and 83 to quote the file/path variable
(e.g., change occurrences of $out to "$out") so the jq arguments are passed as a
single token; locate the three jq calls that reference the shell variable $out
(the one setting unmanaged_cnt and the other two nearby jq uses) and wrap the
expansions in double quotes.

---

Nitpick comments:
In
`@ci-operator/step-registry/cucushift/installer/check/aws/custom-vpc/cucushift-installer-check-aws-custom-vpc-commands.sh`:
- Around line 78-80: Validate that the jq call produced a numeric unmanaged_cnt
and that total_subnets is numeric before computing expect_cnt: check jq's exit
status and/or test unmanaged_cnt with a numeric regex (e.g., ^[0-9]+$) and treat
non-numeric or failed jq results as an error or default to 0, likewise validate
total_subnets derived from ic_subnets, then compute expect_cnt only after both
are sanitized so subtraction cannot produce unexpected negative or non-numeric
values; update the variables mentioned (unmanaged_cnt, total_subnets,
expect_cnt) and add a clear error/log path if validation fails.
🪄 Autofix (Beta)

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: 26a9aede-c88c-4ef0-a3c4-f8036a026c62

📥 Commits

Reviewing files that changed from the base of the PR and between 9cc3a79 and 79900f5.

📒 Files selected for processing (1)
  • ci-operator/step-registry/cucushift/installer/check/aws/custom-vpc/cucushift-installer-check-aws-custom-vpc-commands.sh

# Calculate expected count based on whether Edge Zones are enabled
if [[ ${ENABLE_AWS_EDGE_ZONE:-no} == "yes" ]]; then
# For Edge Zone scenarios, exclude subnets tagged as 'kubernetes.io/cluster/unmanaged:true'
unmanaged_cnt=$(jq -r '[.Subnets[] | select(any(.Tags[]; .Key == "kubernetes.io/cluster/unmanaged" and .Value == "true"))] | length' $out)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Quote variable expansions to prevent word splitting.

Lines 78, 79, and 83 use unquoted variable expansions that could cause word splitting or globbing issues, flagged by Shellcheck SC2086. While unlikely to cause issues in practice (file paths and AWS subnet IDs don't typically contain spaces), quoting is a shell best practice.

🛡️ Proposed fix
-  unmanaged_cnt=$(jq -r '[.Subnets[] | select(any(.Tags[]; .Key == "kubernetes.io/cluster/unmanaged" and .Value == "true"))] | length' $out)
-  total_subnets=$(echo ${ic_subnets} | wc -w)
+  unmanaged_cnt=$(jq -r '[.Subnets[] | select(any(.Tags[]; .Key == "kubernetes.io/cluster/unmanaged" and .Value == "true"))] | length' "$out")
+  total_subnets=$(echo "${ic_subnets}" | wc -w)
   expect_cnt=$((total_subnets - unmanaged_cnt))
   echo "INFO: Edge Zone enabled - total subnets=${total_subnets}, unmanaged subnets=${unmanaged_cnt}, expecting managed subnets=${expect_cnt}"
 else
-  expect_cnt=$(echo ${ic_subnets} | wc -w)
+  expect_cnt=$(echo "${ic_subnets}" | wc -w)
 fi

Also applies to: 79-79, 83-83

🧰 Tools
🪛 Shellcheck (0.11.0)

[info] 78-78: Double quote to prevent globbing and word splitting.

(SC2086)

🤖 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
`@ci-operator/step-registry/cucushift/installer/check/aws/custom-vpc/cucushift-installer-check-aws-custom-vpc-commands.sh`
at line 78, The jq invocations use unquoted variable expansions which can cause
word-splitting/globbing (SC2086); update the commands that compute unmanaged_cnt
and the similar expressions on lines 79 and 83 to quote the file/path variable
(e.g., change occurrences of $out to "$out") so the jq arguments are passed as a
single token; locate the three jq calls that reference the shell variable $out
(the one setting unmanaged_cnt and the other two nearby jq uses) and wrap the
expansions in double quotes.

Source: Linters/SAST tools

@MrSanketkumar

Copy link
Copy Markdown
Contributor Author

/test rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive

@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@MrSanketkumar: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test boskos-config
/test boskos-config-generation
/test check-gh-automation
/test check-gh-automation-tide
/test check-trigger-trusted-apps
/test ci-operator-config
/test ci-operator-config-metadata
/test ci-operator-registry
/test ci-secret-bootstrap-config-validation
/test ci-testgrid-allow-list
/test clusterimageset-validate
/test config
/test core-valid
/test generated-config
/test generated-dashboards
/test hyperfleet-risk-scorer-test
/test image-mirroring-config-validation
/test jira-lifecycle-config
/test labels
/test openshift-image-mirror-mappings
/test ordered-prow-config
/test owners
/test pr-reminder-config
/test prow-config
/test prow-config-filenames
/test prow-config-semantics
/test pylint
/test release-config
/test release-controller-config
/test rover-groups-config-validation
/test secret-generator-config-valid
/test services-valid
/test stackrox-stackrox-stackrox-stackrox-check
/test step-registry-metadata
/test step-registry-shellcheck
/test sync-rover-groups
/test verified-config
/test yamllint

The following commands are available to trigger optional jobs:

/test check-cluster-profiles-config

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-release-main-ci-operator-config
pull-ci-openshift-release-main-ci-operator-registry
pull-ci-openshift-release-main-core-valid
pull-ci-openshift-release-main-owners
pull-ci-openshift-release-main-release-controller-config
pull-ci-openshift-release-main-step-registry-metadata
pull-ci-openshift-release-main-step-registry-shellcheck
pull-ci-openshift-release-openshift-image-mirror-mappings
Details

In response to this:

/test rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive

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.

@MrSanketkumar

Copy link
Copy Markdown
Contributor Author

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@MrSanketkumar: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@MrSanketkumar

Copy link
Copy Markdown
Contributor Author

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@MrSanketkumar: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@MrSanketkumar: 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/rehearse/periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive 79900f5 link unknown /pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-aws-ipi-localzone-byo-subnet-sdn-f60-destructive

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.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant