Skip to content

CNTRLPLANE-3042: Parallelize make verify targets for faster local development#8051

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
PoornimaSingour:fix-verify-targets
Apr 2, 2026
Merged

CNTRLPLANE-3042: Parallelize make verify targets for faster local development#8051
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
PoornimaSingour:fix-verify-targets

Conversation

@PoornimaSingour
Copy link
Copy Markdown
Contributor

@PoornimaSingour PoornimaSingour commented Mar 24, 2026

What this PR does / why we need it:

Currently verify runs all targets sequentially:

Generate —-> update —-> staticcheck —-> fmt —-> vet —-> verify-codespell—-> lint—-> cpo-container-sync —-> run-gitlint.

This takes too much time. To fix this we introduced verify-parallel which execute fmt vet verify-codespell lint cpo-container-sync run-gitlint task parallelly and verify run generate & update task. Also we have created another section for git clean check which was being used twice in verify as well as in verify-cli.

Which issue(s) this PR fixes:

Fixes : https://redhat.atlassian.net/browse/CNTRLPLANE-3042

Special notes for your reviewer:

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

  • Chores
    • Verification checks now run in parallel for faster verification and reduced wait times.
    • Git working-tree cleanliness checks were split into a separate step to make failures clearer.
    • Verification flow simplified and CI verification updated to use the separated cleanliness check.

@openshift-ci-robot
Copy link
Copy Markdown

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 24, 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: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 3b150bfe-a047-46e6-b1cf-7682c0cb8fb0

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

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

Refactors Makefile verification flow: verify now depends on generate, runs $(MAKE) -j verify-parallel to execute verification tool targets in parallel, then runs $(MAKE) verify-git-clean to perform git working-tree cleanliness checks. Adds phony targets verify-parallel (prereqs: staticcheck, fmt, vet, verify-codespell, lint, cpo-container-sync, run-gitlint) and verify-git-clean (encapsulates previous git diff/index, diff-files, exit-code, and untracked-files checks). verify-ci now depends on verify-git-clean and no longer contains inline git checks.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Make as Make
participant Parallel as Verify-Parallel (tool targets)
participant Git as Verify-Git-Clean (git checks)

Make->>Parallel: $(MAKE) -j verify-parallel
Parallel-->>Make: tool targets complete (staticcheck, fmt, vet, ...)
Make->>Git: $(MAKE) verify-git-clean
Git-->>Make: git cleanliness OK / fail

Changes

Cohort / File(s) Summary
Makefile
Makefile
verify now depends on generate and its recipe runs $(MAKE) -j verify-parallel then $(MAKE) verify-git-clean; added phony target verify-parallel (prereqs: staticcheck, fmt, vet, verify-codespell, lint, cpo-container-sync, run-gitlint); added phony target verify-git-clean encapsulating git diff/index/diff-files/exit-code and untracked-files checks; updated verify-ci to depend on verify-git-clean and removed inline git cleanliness checks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci openshift-ci bot requested review from enxebre and jparrill March 24, 2026 07:33
@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 24, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 24, 2026

Hi @PoornimaSingour. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

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)
Makefile (1)

106-106: Consider limiting parallel job count.

Using $(MAKE) -j without a number spawns unlimited parallel jobs, which can exhaust system resources on machines with many cores.

Suggested fix to limit parallelism
 verify: generate update
-   $(MAKE) -j verify-parallel
+   $(MAKE) -j$$(nproc) verify-parallel
    $(MAKE) verify-git-clean

Alternatively, use a fixed reasonable limit like -j8 or let the user control it via an environment variable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` at line 106, The Makefile invokes "$(MAKE) -j verify-parallel"
which uses unlimited parallel jobs; change this invocation to bound parallelism
by using a configurable job count variable (e.g., use "$(MAKE) -j$(JOBS)
verify-parallel" or "$(MAKE) -j${PARALLEL:-8} verify-parallel"), add a default
value for JOBS/PARALLEL if not set, and document that users can override the
variable via the environment to control the parallel job limit.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Makefile`:
- Around line 106-107: The two Makefile recipe lines that invoke "$(MAKE) -j
verify-parallel" and "$(MAKE) verify-git-clean" are indented with spaces instead
of a tab; replace the leading spaces on those recipe lines with a single tab
character so make recognizes them as commands (ensure the lines starting with
"$(MAKE) -j verify-parallel" and "$(MAKE) verify-git-clean" begin with a tab,
not spaces).

---

Nitpick comments:
In `@Makefile`:
- Line 106: The Makefile invokes "$(MAKE) -j verify-parallel" which uses
unlimited parallel jobs; change this invocation to bound parallelism by using a
configurable job count variable (e.g., use "$(MAKE) -j$(JOBS) verify-parallel"
or "$(MAKE) -j${PARALLEL:-8} verify-parallel"), add a default value for
JOBS/PARALLEL if not set, and document that users can override the variable via
the environment to control the parallel job limit.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 29ef1339-49ce-4e0d-b045-07b572520420

📥 Commits

Reviewing files that changed from the base of the PR and between 78a8b2d and fc79a60.

📒 Files selected for processing (1)
  • Makefile

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
Makefile (1)

105-107: Consider --output-sync for cleaner parallel output.

As noted by a reviewer, when running verification tools in parallel, output from different targets may interleave, making failures harder to diagnose. Using $(MAKE) -j --output-sync=target verify-parallel would buffer each target's output and print it atomically.

Suggested change
 verify: generate update
-	$(MAKE) -j verify-parallel
+	$(MAKE) -j --output-sync=target verify-parallel
 	$(MAKE) verify-git-clean
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 105 - 107, The verify target currently invokes
parallel verification with "$(MAKE) -j verify-parallel" which can interleave
outputs; change the invocation in the verify recipe to include GNU make's output
syncing flag so each subtarget's output is buffered and printed atomically (use
"--output-sync=target" with the $(MAKE) call that runs verify-parallel). Update
the verify recipe where "$(MAKE) -j verify-parallel" is used to call "$(MAKE) -j
--output-sync=target verify-parallel" so parallel output is clean and failures
are easier to read.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Makefile`:
- Around line 105-107: The verify target currently invokes parallel verification
with "$(MAKE) -j verify-parallel" which can interleave outputs; change the
invocation in the verify recipe to include GNU make's output syncing flag so
each subtarget's output is buffered and printed atomically (use
"--output-sync=target" with the $(MAKE) call that runs verify-parallel). Update
the verify recipe where "$(MAKE) -j verify-parallel" is used to call "$(MAKE) -j
--output-sync=target verify-parallel" so parallel output is clean and failures
are easier to read.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 03d76fe6-4138-4482-84e1-b90b6f26b990

📥 Commits

Reviewing files that changed from the base of the PR and between fc79a60 and 5ec1376.

📒 Files selected for processing (1)
  • Makefile

@jparrill
Copy link
Copy Markdown
Contributor

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 24, 2026
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 26, 2026
@PoornimaSingour PoornimaSingour force-pushed the fix-verify-targets branch 2 times, most recently from 7b58c63 to 0891ec7 Compare March 26, 2026 08:54
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 26, 2026
@PoornimaSingour
Copy link
Copy Markdown
Contributor Author

/retest-required

@jparrill
Copy link
Copy Markdown
Contributor

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 27, 2026
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 27, 2026
@openshift-ci-robot
Copy link
Copy Markdown

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

@jparrill
Copy link
Copy Markdown
Contributor

/lgtm cancel

Letting the lgtm to @bryan-cox

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Mar 27, 2026

@PoornimaSingour: This pull request references CNTRLPLANE-3042 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 "4.22.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Currently verify runs all targets sequentially:

Generate —-> update —-> staticcheck —-> fmt —-> vet —-> verify-codespell—-> lint—-> cpo-container-sync —-> run-gitlint.

This takes too much time. To fix this we introduced verify-parallel which execute fmt vet verify-codespell lint cpo-container-sync run-gitlint task parallelly and verify run generate & update task. Also we have created another section for git clean check which was being used twice in verify as well as in verify-cli.

Which issue(s) this PR fixes:

Fixes : https://redhat.atlassian.net/browse/CNTRLPLANE-3042

Special notes for your reviewer:

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

  • Chores
  • Verification checks now run in parallel for faster verification and reduced wait times.
  • Git working-tree cleanliness checks were split into a separate step to make failures clearer.
  • Verification flow simplified and CI verification updated to use the separated cleanliness check.

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.

@jparrill
Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Mar 27, 2026

@jparrill: This pull request references CNTRLPLANE-3042 which is a valid jira issue.

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.

@cwbotbot
Copy link
Copy Markdown

cwbotbot commented Mar 27, 2026

Test Results

e2e-aws

e2e-aks

Makefile Outdated
git diff --exit-code HEAD --
$(eval STATUS = $(shell git status -s))
$(if $(strip $(STATUS)),$(error untracked files detected: ${STATUS}))
verify-ci: generate update staticcheck fmt vet verify-git-clean
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be able to be dropped now.

Makefile Outdated
$(if $(strip $(STATUS)),$(error untracked files detected: ${STATUS}))

.PHONY: verify-parallel
verify-parallel: staticcheck fmt vet verify-codespell lint cpo-container-sync run-gitlint
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would suggest to run verify-codespell lint cpo-container-sync run-gitlint in parallel and stack staticcheck and fmt together with generate update. That is what we are doing in the GitHub actions now.

Restructure the Makefile verify targets to improve local development
workflow:

- Extract git cleanliness checks into verify-git-clean target
- Create verify-parallel target for independent verification tasks
  (verify-codespell, lint, cpo-container-sync, run-gitlint) that can
  run concurrently
- Run staticcheck, fmt, and vet sequentially before parallel tasks to
  ensure code generation completes first
- Remove verify-ci target (no longer needed - CI workflows run checks
  individually)

This enables faster local verification by parallelizing independent
tasks while maintaining proper dependency ordering.

Signed-off-by: Poornima Singour <PoornimaSingour@users.noreply.github.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
@jparrill
Copy link
Copy Markdown
Contributor

/verified by tests

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

@jparrill: This PR has been marked as verified by tests.

Details

In response to this:

/verified by 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.

@bryan-cox
Copy link
Copy Markdown
Member

/close

@openshift-ci openshift-ci bot closed this Mar 31, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

@bryan-cox: Closed this PR.

Details

In response to this:

/close

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.

@bryan-cox
Copy link
Copy Markdown
Member

/open

@bryan-cox
Copy link
Copy Markdown
Member

/reopen

@openshift-ci openshift-ci bot reopened this Mar 31, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

@bryan-cox: Reopened this PR.

Details

In response to this:

/reopen

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.

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Mar 31, 2026

@PoornimaSingour: This pull request references CNTRLPLANE-3042 which is a valid jira issue.

Details

In response to this:

What this PR does / why we need it:

Currently verify runs all targets sequentially:

Generate —-> update —-> staticcheck —-> fmt —-> vet —-> verify-codespell—-> lint—-> cpo-container-sync —-> run-gitlint.

This takes too much time. To fix this we introduced verify-parallel which execute fmt vet verify-codespell lint cpo-container-sync run-gitlint task parallelly and verify run generate & update task. Also we have created another section for git clean check which was being used twice in verify as well as in verify-cli.

Which issue(s) this PR fixes:

Fixes : https://redhat.atlassian.net/browse/CNTRLPLANE-3042

Special notes for your reviewer:

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

  • Chores
  • Verification checks now run in parallel for faster verification and reduced wait times.
  • Git working-tree cleanliness checks were split into a separate step to make failures clearer.
  • Verification flow simplified and CI verification updated to use the separated cleanliness check.

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.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@866e482). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8051   +/-   ##
=======================================
  Coverage        ?   26.83%           
=======================================
  Files           ?     1090           
  Lines           ?   105229           
  Branches        ?        0           
=======================================
  Hits            ?    28242           
  Misses          ?    74559           
  Partials        ?     2428           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@bryan-cox bryan-cox left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 2, 2026
@openshift-ci-robot
Copy link
Copy Markdown

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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 2, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox, jparrill, PoornimaSingour

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-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 5ed3475 and 2 for PR HEAD 952d9bd in total

@bryan-cox
Copy link
Copy Markdown
Member

/test e2e-aks

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD e087807 and 1 for PR HEAD 952d9bd in total

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD d0a4540 and 0 for PR HEAD 952d9bd in total

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 2, 2026

@PoornimaSingour: all tests passed!

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-merge-bot openshift-merge-bot bot merged commit a9b3373 into openshift:main Apr 2, 2026
38 of 39 checks passed
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. area/ci-tooling Indicates the PR includes changes for CI or tooling 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants