Skip to content

Forward SubSteps() through wrapper steps#5151

Open
mdbooth wants to merge 1 commit intoopenshift:mainfrom
openshift-cloud-team:substep-reporting
Open

Forward SubSteps() through wrapper steps#5151
mdbooth wants to merge 1 commit intoopenshift:mainfrom
openshift-cloud-team:substep-reporting

Conversation

@mdbooth
Copy link
Copy Markdown

@mdbooth mdbooth commented May 1, 2026

The purpose of this change is to add substep information to ci-operator-step-graph.json to enable much more efficient automated scraping of prow job artifacts.

The step graph outputs substeps for steps which implement SubStepReporter, but this is lost when the step is wrapped by LeaseStep, IPPoolStep, or ClusterClaimStep.

Summary by CodeRabbit

  • New Features

    • Improved hierarchical reporting so steps and sub-steps surface detailed test and step information across cluster claim, IP pool, and lease flows.
  • Tests

    • Added unit tests to verify forwarding of subtest and sub-step details through wrapper components, ensuring consistent reporting.

@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: automatic mode

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: fc4b0f54-c522-4e0f-8a19-c69821de9943

📥 Commits

Reviewing files that changed from the base of the PR and between 8377ef4 and 0085d9a.

📒 Files selected for processing (6)
  • pkg/steps/cluster_claim.go
  • pkg/steps/cluster_claim_test.go
  • pkg/steps/ip_pool.go
  • pkg/steps/ip_pool_test.go
  • pkg/steps/lease.go
  • pkg/steps/lease_test.go
🚧 Files skipped from review as they are similar to previous changes (4)
  • pkg/steps/lease.go
  • pkg/steps/lease_test.go
  • pkg/steps/cluster_claim_test.go
  • pkg/steps/cluster_claim.go

📝 Walkthrough

Walkthrough

Multiple CI operator step wrappers now expose SubTests() and/or SubSteps() methods that delegate to their wrapped steps when those implement the corresponding reporter interfaces; unit tests were added to verify the forwarding behavior.

Changes

Cohort / File(s) Summary
Cluster claim step
pkg/steps/cluster_claim.go, pkg/steps/cluster_claim_test.go
Added SubTests() and SubSteps() to clusterClaimStep that delegate to the wrapped step via SubtestReporter/SubStepReporter type assertions; added a test TestClusterClaimStepForward verifying forwarding.
IP pool step
pkg/steps/ip_pool.go, pkg/steps/ip_pool_test.go
Added SubSteps() to ipPoolStep that delegates via SubStepReporter; expanded test fixtures and added TestIPPoolStepForward to assert SubTests() and SubSteps() are forwarded.
Lease step
pkg/steps/lease.go, pkg/steps/lease_test.go
Added SubSteps() to leaseStep delegating via SubStepReporter; tests updated (TestLeaseStepForward) to include a "SubSteps" subtest asserting forwarding.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 13 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Forward SubSteps() through wrapper steps' directly and accurately describes the main change: adding SubSteps() method forwarding to LeaseStep, IPPoolStep, and ClusterClaimStep wrapper types.
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.
Go Error Handling ✅ Passed PR adds delegation methods (SubTests/SubSteps) to wrapper step types that safely type-assert wrapped steps and return results or nil. No unsafe error handling patterns introduced.
Test Coverage For New Features ✅ Passed All 4 new methods (clusterClaimStep.SubTests/SubSteps, ipPoolStep.SubSteps, leaseStep.SubSteps) have dedicated unit tests with proper interface forwarding validation.
Stable And Deterministic Test Names ✅ Passed PR uses standard Go testing with static test names; Ginkgo tests not present in changed files.
Test Structure And Quality ✅ Passed Custom check for Ginkgo test patterns is not applicable; PR uses standard Go testing with t.Run() subtests instead.
Microshift Test Compatibility ✅ Passed Pull request adds only standard Go unit tests, not Ginkgo e2e tests, so MicroShift compatibility requirements do not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR contains only standard Go unit tests in pkg/steps/, not Ginkgo e2e tests. Check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Pull request introduces only pure delegation methods that forward reporting information from wrapped steps with no scheduling constraints, affinity rules, or topology-dependent logic.
Ote Binary Stdout Contract ✅ Passed PR adds three simple delegation methods with type assertions and conditional delegation. No stdout writes, logging statements, or process-level code modifications present.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR contains only standard Go unit tests, not Ginkgo e2e tests with network assumptions.

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

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

Review rate limit: 8/10 reviews remaining, refill in 7 minutes and 8 seconds.

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

@openshift-ci openshift-ci Bot requested review from droslean and jmguzik May 1, 2026 14:15
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 1, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mdbooth
Once this PR has been reviewed and has the lgtm label, please assign deepsm007 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

The purpose of this change is to add substep information to
ci-operator-step-graph.json to enable much more efficient automated
scraping of prow job artifacts.

The step graph outputs substeps for steps which implement
SubStepReporter, but this is lost when the step is wrapped by LeaseStep,
IPPoolStep, or ClusterClaimStep.
@mdbooth mdbooth force-pushed the substep-reporting branch from 8377ef4 to 0085d9a Compare May 1, 2026 14:20
@mdbooth
Copy link
Copy Markdown
Author

mdbooth commented May 1, 2026

Flakes

/retest-required

@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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 1, 2026

@mdbooth: 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/breaking-changes 0085d9a link false /test breaking-changes

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant