Skip to content

ROSAENG-8224: refactor(ho): improve --hcp-egress-block-cidrs validation - #8763

Open
Ajpantuso wants to merge 1 commit into
openshift:mainfrom
Ajpantuso:apantuso/rosaeng-8224_pt2
Open

ROSAENG-8224: refactor(ho): improve --hcp-egress-block-cidrs validation#8763
Ajpantuso wants to merge 1 commit into
openshift:mainfrom
Ajpantuso:apantuso/rosaeng-8224_pt2

Conversation

@Ajpantuso

@Ajpantuso Ajpantuso commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Improves validation of the --hcp-egress-block-cidrs flag introduced in #8689:

  • Moves CIDR validation from the cmd.Run closure (which called os.Exit) into
    validateStartOptions, where it returns errors consistently with other startup checks.
  • Rejects IPv6 CIDRs, since the values are used exclusively in IPv4 NetworkPolicy
    IPBlock.Except rules.
  • Logs configured CIDRs at startup for operational visibility.
  • Applies the same IPv6 rejection to the install command's validateHCPEgressBlockCIDRs.
  • Updates flag help text in both entry points to document the IPv4 constraint.

Which issue(s) this PR fixes:

Fixes ROSAENG-8224

Special notes for your reviewer:

Follow-up to #8689. The validation logic is functionally equivalent for valid IPv4 inputs —
this PR moves it to a better location, adds the IPv6 guard, and adds test coverage that
did not previously exist for validateStartOptions.

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Summary by CodeRabbit

  • Bug Fixes

    • Improved validation error messages for HCP egress block CIDR configuration.
  • Documentation

    • Clarified that --hcp-egress-block-cidrs flag only accepts IPv4 CIDRs.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 17, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 17, 2026

Copy link
Copy Markdown

@Ajpantuso: This pull request references ROSAENG-8224 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Improves validation of the --hcp-egress-block-cidrs flag introduced in #8689:

  • Moves CIDR validation from the cmd.Run closure (which called os.Exit) into
    validateStartOptions, where it returns errors consistently with other startup checks.
  • Rejects IPv6 CIDRs, since the values are used exclusively in IPv4 NetworkPolicy
    IPBlock.Except rules.
  • Logs configured CIDRs at startup for operational visibility.
  • Applies the same IPv6 rejection to the install command's validateHCPEgressBlockCIDRs.
  • Updates flag help text in both entry points to document the IPv4 constraint.

Which issue(s) this PR fixes:

Fixes ROSAENG-8224

Special notes for your reviewer:

Follow-up to #8689. The validation logic is functionally equivalent for valid IPv4 inputs —
this PR moves it to a better location, adds the IPv6 guard, and adds test coverage that
did not previously exist for validateStartOptions.

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 17, 2026
@openshift-ci

openshift-ci Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

A new exported helper ValidateIPv4CIDRs(cidrs []string) error is added to cmd/util/util.go. It parses each CIDR with net.ParseCIDR, rejects non-IPv4 entries via To4() == nil, and returns a single joined error string. Both cmd/install/install.go and hypershift-operator/main.go are updated to delegate --hcp-egress-block-cidrs validation to this helper, removing their respective inline parsing loops. The operator's early os.Exit(1) validation at command setup time is replaced by a proper error return from validateStartOptions. Flag help text in both files is updated to note that only IPv4 CIDRs are supported.

Possibly related PRs

  • openshift/hypershift#8689: Introduces the --hcp-egress-block-cidrs flag end-to-end, which this PR directly modifies by centralizing its validation logic and tightening its error handling.

Suggested reviewers

  • clebs
🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: refactoring and improving validation of the --hcp-egress-block-cidrs flag by relocating validation logic and adding IPv6 rejection constraints.
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 PR contains only standard Go tests (not Ginkgo), with static, deterministic test names that contain no dynamic information, timestamps, UUIDs, or values that change between runs.
Test Structure And Quality ✅ Passed The PR adds standard Go unit tests (not Ginkgo tests). The custom check targets "Ginkgo test code" (It blocks, BeforeEach/AfterEach, Eventually/Consistently), none of which are used in this PR. The...
Topology-Aware Scheduling Compatibility ✅ Passed This PR is about CIDR validation for network policies, not about pod scheduling constraints. No affinity, topology spread, node selectors, tolerations, PDBs, or replica scaling logic were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR does not add any Ginkgo e2e tests. It only adds a standard Go unit test (cmd/util/util_test.go) using the testing package, which is outside the scope of this IPv6/disconnected network compa...
No-Weak-Crypto ✅ Passed PR contains no weak crypto usage: no MD5, SHA1, DES, RC4, 3DES, Blowfish, or ECB mode implementations; no custom crypto implementations; no non-constant-time secret comparisons. The PR refactors CI...
Container-Privileges ✅ Passed PR modifies only Go source files (cmd/install/install.go, hypershift-operator/main.go, cmd/util/util.go, cmd/util/util_test.go) for CIDR validation logic. No Kubernetes/container manifests with pri...
No-Sensitive-Data-In-Logs ✅ Passed The logging added logs IP CIDR blocks (e.g., "10.0.0.0/16") which are configuration values, not passwords, tokens, API keys, PII, or session IDs. This operational logging is intentional for visibil...

✏️ 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.

@openshift-ci

openshift-ci Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Ajpantuso
Once this PR has been reviewed and has the lgtm label, please assign sjenning for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@Ajpantuso
Ajpantuso force-pushed the apantuso/rosaeng-8224_pt2 branch from ba66b85 to 72d94c6 Compare June 17, 2026 17:39
@openshift-ci openshift-ci Bot added area/cli Indicates the PR includes changes for CLI area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release and removed do-not-merge/needs-area labels Jun 17, 2026

@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

🤖 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 `@hypershift-operator/main.go`:
- Around line 366-368: The log statement in the HCP egress block CIDRs check is
logging the full list of `opts.HCPEgressBlockCIDRs`, which exposes sensitive
customer network ranges in centralized logs. Instead of logging the actual CIDR
values, modify the log statement to only log the count of configured CIDRs
(using len(opts.HCPEgressBlockCIDRs)) to maintain visibility into the
configuration while protecting sensitive network information.
🪄 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 YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: cc17f3a9-1fb9-447d-80f4-679b4945903c

📥 Commits

Reviewing files that changed from the base of the PR and between fabde37 and ba66b85.

📒 Files selected for processing (4)
  • cmd/install/install.go
  • cmd/install/install_test.go
  • hypershift-operator/main.go
  • hypershift-operator/main_validate_test.go

Comment on lines +366 to +368
if len(opts.HCPEgressBlockCIDRs) > 0 {
log.Info("Static HCP egress block CIDRs configured", "cidrs", opts.HCPEgressBlockCIDRs)
}

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

Avoid logging raw HCP egress CIDR values.

Line 367 logs the full HCPEgressBlockCIDRs list, which can leak internal/customer network ranges into centralized logs. Prefer logging only count (or redacted values).

Suggested change
 	if len(opts.HCPEgressBlockCIDRs) > 0 {
-		log.Info("Static HCP egress block CIDRs configured", "cidrs", opts.HCPEgressBlockCIDRs)
+		log.Info("Static HCP egress block CIDRs configured", "count", len(opts.HCPEgressBlockCIDRs))
 	}

As per coding guidelines, "Flag logging that may expose passwords, tokens, API keys, PII (email, SSN, credit card), session IDs, internal hostnames, or customer data".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if len(opts.HCPEgressBlockCIDRs) > 0 {
log.Info("Static HCP egress block CIDRs configured", "cidrs", opts.HCPEgressBlockCIDRs)
}
if len(opts.HCPEgressBlockCIDRs) > 0 {
log.Info("Static HCP egress block CIDRs configured", "count", len(opts.HCPEgressBlockCIDRs))
}
🤖 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 `@hypershift-operator/main.go` around lines 366 - 368, The log statement in the
HCP egress block CIDRs check is logging the full list of
`opts.HCPEgressBlockCIDRs`, which exposes sensitive customer network ranges in
centralized logs. Instead of logging the actual CIDR values, modify the log
statement to only log the count of configured CIDRs (using
len(opts.HCPEgressBlockCIDRs)) to maintain visibility into the configuration
while protecting sensitive network information.

Source: Coding guidelines

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.80%. Comparing base (8ea96d7) to head (e8bca61).
⚠️ Report is 696 commits behind head on main.

Files with missing lines Patch % Lines
hypershift-operator/main.go 0.00% 7 Missing ⚠️
cmd/install/install.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8763      +/-   ##
==========================================
+ Coverage   43.78%   43.80%   +0.01%     
==========================================
  Files         772      772              
  Lines       96000    96050      +50     
==========================================
+ Hits        42033    42074      +41     
- Misses      51055    51061       +6     
- Partials     2912     2915       +3     
Files with missing lines Coverage Δ
cmd/util/util.go 34.14% <100.00%> (+34.14%) ⬆️
cmd/install/install.go 68.92% <66.66%> (+0.02%) ⬆️
hypershift-operator/main.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

Flag Coverage Δ
cmd-support 37.46% <90.00%> (+0.02%) ⬆️
cpo-hostedcontrolplane 45.91% <ø> (ø)
cpo-other 45.11% <ø> (ø)
hypershift-operator 54.06% <0.00%> (+0.02%) ⬆️
other 32.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Ajpantuso
Ajpantuso marked this pull request as ready for review June 17, 2026 18:05
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 17, 2026
@openshift-ci
openshift-ci Bot requested review from clebs and sdminonne June 17, 2026 18:05
@Ajpantuso
Ajpantuso force-pushed the apantuso/rosaeng-8224_pt2 branch from 72d94c6 to f4da3ac Compare June 18, 2026 13:54

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

♻️ Duplicate comments (1)
hypershift-operator/main.go (1)

360-362: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid logging raw HCP egress CIDRs.

Line 361 logs full HCPEgressBlockCIDRs, which can expose customer/internal network ranges in centralized logs. Log only count (or redact values).

As per coding guidelines, "Flag logging that may expose passwords, tokens, API keys, PII (email, SSN, credit card), session IDs, internal hostnames, or customer data".

Suggested change
 if len(opts.HCPEgressBlockCIDRs) > 0 {
-	log.Info("Static HCP egress block CIDRs configured", "cidrs", opts.HCPEgressBlockCIDRs)
+	log.Info("Static HCP egress block CIDRs configured", "count", len(opts.HCPEgressBlockCIDRs))
 }
🤖 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 `@hypershift-operator/main.go` around lines 360 - 362, The log statement in the
block that checks `if len(opts.HCPEgressBlockCIDRs) > 0` is logging the full
CIDR values from `opts.HCPEgressBlockCIDRs`, which can expose internal network
ranges in centralized logs. Instead of logging the raw CIDR values, modify the
log.Info call to log only the count of configured CIDRs by using
`len(opts.HCPEgressBlockCIDRs)` as the value, removing the direct reference to
the CIDR slice itself.

Source: Coding guidelines

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

Duplicate comments:
In `@hypershift-operator/main.go`:
- Around line 360-362: The log statement in the block that checks `if
len(opts.HCPEgressBlockCIDRs) > 0` is logging the full CIDR values from
`opts.HCPEgressBlockCIDRs`, which can expose internal network ranges in
centralized logs. Instead of logging the raw CIDR values, modify the log.Info
call to log only the count of configured CIDRs by using
`len(opts.HCPEgressBlockCIDRs)` as the value, removing the direct reference to
the CIDR slice itself.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 6d3277d6-f447-4723-8417-40697b1ec0e0

📥 Commits

Reviewing files that changed from the base of the PR and between 72d94c6 and f4da3ac.

📒 Files selected for processing (6)
  • cmd/install/install.go
  • cmd/install/install_test.go
  • cmd/util/util.go
  • cmd/util/util_test.go
  • hypershift-operator/main.go
  • hypershift-operator/main_validate_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • hypershift-operator/main_validate_test.go
  • cmd/install/install_test.go

@Ajpantuso
Ajpantuso force-pushed the apantuso/rosaeng-8224_pt2 branch 2 times, most recently from e5fd053 to daa328e Compare June 18, 2026 18:01
@clebs

clebs commented Jun 30, 2026

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 30, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks-4-22
/test e2e-aws-4-22
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-v2-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws
/test e2e-v2-gke

@Ajpantuso

Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 2, 2026
@Ajpantuso
Ajpantuso force-pushed the apantuso/rosaeng-8224_pt2 branch from daa328e to 82ebe51 Compare July 2, 2026 18:25
@openshift-ci openshift-ci Bot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 2, 2026
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 10, 2026
@Ajpantuso
Ajpantuso force-pushed the apantuso/rosaeng-8224_pt2 branch from 82ebe51 to 8571cce Compare July 13, 2026 12:32
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 13, 2026
Move CIDR validation from the cmd.Run closure (which used os.Exit) into
validateStartOptions, where it returns errors consistently with other
startup checks. Add IPv6 rejection since the CIDRs are used in IPv4-only
NetworkPolicy IPBlock.Except rules, and log configured CIDRs at startup.

Apply the same IPv6 rejection to the install command's
validateHCPEgressBlockCIDRs. Update flag help text in both entry points
to document the IPv4 constraint.

Add unit tests for validateStartOptions (new file) and
validateHCPEgressBlockCIDRs (appended to existing install_test.go).

Jira: ROSAENG-8224
Signed-off-by: Andrew Pantuso <apantuso@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
@Ajpantuso
Ajpantuso force-pushed the apantuso/rosaeng-8224_pt2 branch from 8571cce to e8bca61 Compare July 13, 2026 13:04
@hypershift-jira-solve-ci

hypershift-jira-solve-ci Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Now I have all the evidence. The codecov.yml has no explicit coverage: section with patch targets, so Codecov is using its default behavior (patch coverage target = project coverage = 43.78%). The failure is because hypershift-operator/main.go has 0% overall file coverage and the 7 new executable lines in validateStartOptions() are not covered by any unit test.

Test Failure Analysis Complete

Job Information

  • Prow Job: codecov/patch
  • Build ID: 86825497325
  • PR: #8763ROSAENG-8224: refactor(ho): improve --hcp-egress-block-cidrs validation
  • Target: patch coverage gate on openshift/hypershift

Test Failure Analysis

Error

Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
0.00% of diff hit (target 43.78%)

Summary

The codecov/patch check failed because all 7 new executable lines added to hypershift-operator/main.go have zero test coverage. The PR refactored CIDR validation into a shared ValidateIPv4CIDRs() utility in cmd/util/util.go (which is tested by the new cmd/util/util_test.go) but also added new call-site code in the validateStartOptions() function of hypershift-operator/main.go. That file has 0% coverage overall — there are no unit tests for validateStartOptions() — so the 7 new lines contribute 0% patch coverage, failing Codecov's default patch target of 43.78% (derived from project-level coverage).

Root Cause

The PR introduces two code changes:

  1. cmd/util/util.go — A new ValidateIPv4CIDRs() function with full test coverage via cmd/util/util_test.go. Codecov reports this file's patch contribution as ø (neutral), meaning the tests cover the new function but the file's overall coverage was already 0% due to the cmd-support flag's carry-forward behavior. The tests exist and pass, but coverage data may not be attributed to this flag.

  2. hypershift-operator/main.go — 7 new executable lines added in validateStartOptions():

    • if err := cmdutil.ValidateIPv4CIDRs(opts.HCPEgressBlockCIDRs); err != nil { (line ~369)
    • return fmt.Errorf("invalid --hcp-egress-block-cidrs: %w", err) (line ~370)
    • } (line ~371)
    • if len(opts.HCPEgressBlockCIDRs) > 0 { (line ~372)
    • log.Info("Static HCP egress block CIDRs configured", "cidrs", opts.HCPEgressBlockCIDRs) (line ~373)
    • } (line ~374)
    • Plus the import line for cmdutil

    The hypershift-operator/main.go file has 0% coverage overall — there is no main_test.go and the validateStartOptions() function is not unit-tested. The file only has init_test.go and metrics_test.go, neither of which exercise validateStartOptions().

Since all 7 diff-touched executable lines are in a file with no test coverage, the patch coverage is 0%, which fails the default Codecov patch gate (target: 43.78%, the project average).

The codecov.yml has no explicit coverage: section defining patch thresholds, so Codecov uses its default: the patch target equals the project's overall coverage (43.78%).

Recommendations
  1. Add unit tests for validateStartOptions() in hypershift-operator/ — Create or extend a test file (e.g., hypershift-operator/main_test.go or hypershift-operator/validate_test.go) that calls validateStartOptions() with test cases covering the new CIDR validation logic. This would directly cover the 7 missing lines.

  2. Alternative: Add a coverage: section to codecov.yml — If testing main.go is impractical (since the function requires a logr.Logger and StartOptions struct), the team could configure an explicit patch coverage threshold lower than 43.78%, or set patch: off if patch coverage gating is not desired. Example:

    coverage:
      status:
        patch:
          default:
            target: auto
            threshold: 5%
  3. Shortest path to green — The simplest fix is adding a test for validateStartOptions() that exercises the HCPEgressBlockCIDRs path. The function signature validateStartOptions(opts *StartOptions, log logr.Logger) is straightforward to test — construct a StartOptions with valid/invalid CIDRs and assert the returned error.

Evidence
Evidence Detail
Check run conclusion failure — 0.00% of diff hit (target 43.78%)
Missing coverage file hypershift-operator/main.go — 7 lines, 0.00% patch coverage
Uncovered lines Lines in validateStartOptions(): cmdutil.ValidateIPv4CIDRs() call, error return, len() check, log.Info() call, and import
File overall coverage hypershift-operator/main.go has 0.00% coverage (no existing unit tests for this file's logic)
Tested code (not failing) cmd/util/util.goValidateIPv4CIDRs() is fully covered by cmd/util/util_test.go (7 test cases)
cmd/install/install.go Patch ø — refactored to call shared utility, no new untested lines
Codecov config codecov.yml has no explicit coverage: or patch: threshold — uses default (target = project coverage = 43.78%)
Project coverage 43.79% (+0.01% from base) — overall coverage actually improved slightly

@clebs

clebs commented Jul 22, 2026

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 22, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks-4-22
/test e2e-aws-4-22
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-v2-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws
/test e2e-v2-gke
/test unit
/test verify

@Ajpantuso

Copy link
Copy Markdown
Contributor Author

/retest-required

1 similar comment
@Ajpantuso

Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-ci

openshift-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Stale PRs are closed after 21d of inactivity.

If this PR is still relevant, comment to refresh it or remove the stale label.
Mark the PR as fresh by commenting /remove-lifecycle stale.

If this PR is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci Bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 4, 2026
@openshift-ci

openshift-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

@Ajpantuso: The following tests 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-azure-v2-self-managed e8bca61 link true /test e2e-azure-v2-self-managed
ci/prow/rosa-e2e-images e8bca61 link true /test rosa-e2e-images

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.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 9, 2026
@openshift-ci

openshift-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

PR needs rebase.

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.

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

Labels

area/cli Indicates the PR includes changes for CLI area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release 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. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants