Skip to content

maintenance-rewrite-kernel-patches: enable parallel patch rewriting - #10308

Open
igorpecovnik wants to merge 1 commit into
mainfrom
rewrite-patches-parallel
Open

maintenance-rewrite-kernel-patches: enable parallel patch rewriting#10308
igorpecovnik wants to merge 1 commit into
mainfrom
rewrite-patches-parallel

Conversation

@igorpecovnik

@igorpecovnik igorpecovnik commented Jul 30, 2026

Copy link
Copy Markdown
Member

Wires the recently added parallel patch rewriting feature (lib/tools/common/patching_parallel.py, introduced in 205a36f2) into the rewrite-patches maintenance workflow.

Change

  • New dispatch toggle parallel_patches (choice, default yes, with no as an escape hatch if a board misbehaves).
  • Passed through as PARALLEL_PATCHES to ./compile.sh … rewrite-kernel-patches|rewrite-uboot-patches. PARALLEL_WORKERS is left unset so the worker count auto-calculates.

Why here, not the configs workflow

You pointed at maintenance-rewrite-kernel-configs.yml, but the feature can't work there. The gate in lib/tools/patching.py is:

parallel_patches = rewrite_patches_in_place and (PARALLEL_PATCHES == "yes")

rewrite_patches_in_place is only true when REWRITE_PATCHES=yes — i.e. the rewrite-kernel-patches / rewrite-uboot-patches commands, which live in this workflow. rewrite-kernel-config never sets it, so PARALLEL_PATCHES would be a no-op in the configs workflow. Both whattodo options here set REWRITE_PATCHES=yes, so the toggle applies to kernel and u-boot patch rewrites alike.

Summary by CodeRabbit

  • New Features
    • Added a configurable option to enable parallel patch rewriting during maintenance builds.
    • Maintenance builds can now process eligible patch rewrites concurrently, potentially reducing execution time.
    • Parallel processing applies specifically when patch rewriting is enabled and can be controlled through the workflow configuration.

Wire the parallel patch rewriting feature (lib/tools/common/patching_parallel.py,
introduced in 205a36f) into the rewrite-patches workflow: pass PARALLEL_PATCHES
to compile.sh, exposed as a dispatch toggle defaulting to yes with an escape
hatch. It only takes effect for the rewrite-* commands this workflow runs
(patching.py gates parallel on REWRITE_PATCHES=yes), and the worker count
auto-calculates.

Note: this belongs here, not in maintenance-rewrite-kernel-configs.yml —
rewrite-kernel-config does not rewrite patches, so PARALLEL_PATCHES is a no-op
there.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The maintenance workflow adds a parallel_patches dispatch choice and passes its value as PARALLEL_PATCHES to ./compile.sh during kernel patch rewriting.

Changes

Parallel patch rewrite workflow

Layer / File(s) Summary
Workflow input and compile wiring
.github/workflows/maintenance-rewrite-kernel-patches.yml
Adds a yes/no parallel_patches input, defaults it to yes, and passes the selected value to ./compile.sh for rewrite-* commands when REWRITE_PATCHES=yes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • armbian/build#10163: Implements parallel patch rewriting using PARALLEL_PATCHES and worker handling.

Suggested labels: Framework

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: enabling parallel patch rewriting in the maintenance workflow.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rewrite-patches-parallel

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.

@github-actions github-actions Bot added Needs review Seeking for review GitHub Actions GitHub Actions code size/small PR with less then 50 lines 08 Milestone: Third quarter release labels Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

08 Milestone: Third quarter release GitHub Actions GitHub Actions code Needs review Seeking for review size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

1 participant