Reinstate parallelism for local builds#7728
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR updates build.gradle to set per-fork parallelism for Gradle Test tasks unless running under CI. If any of TF_BUILD, CIRCLECI, GITHUB_ACTIONS, or CI env vars are present, all Test tasks use maxParallelForks = 1 and forkEvery = 25; otherwise maxParallelForks is set to the available processor count (fallback 1). Possibly related issues
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 `@build.gradle`:
- Around line 997-1000: The environment check in the if-condition that reads
System.getenv("GITHUB_ACTION") should be changed to the documented boolean
variable System.getenv("GITHUB_ACTIONS"); update the conditional that contains
System.getenv("TF_BUILD"), System.getenv("CIRCLECI"),
System.getenv("GITHUB_ACTION") and System.getenv("CI") to use "GITHUB_ACTIONS"
instead of "GITHUB_ACTION" so the CI detection in build.gradle correctly detects
GitHub Actions.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 51c52439-8e28-4cef-8631-e703357bb153
📒 Files selected for processing (1)
build.gradle
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@build.gradle`:
- Line 1013: The maxParallelForks assignment uses a non-existent Runtime.runtime
API; update the expression that sets maxParallelForks to call
Runtime.getRuntime().availableProcessors() and fall back to 1 if needed (i.e.,
replace the Runtime.runtime.availableProcessors() usage with
Runtime.getRuntime().availableProcessors() in the maxParallelForks assignment).
- Around line 1008-1010: Inside the existing tasks.withType(Test) configuration
remove the nested tasks.withType(Test) block and set forkEvery = 25 directly in
the outer tasks.withType(Test) scope (i.e., update the configuration that
currently contains forkEvery inside another tasks.withType(Test)); also replace
the incorrect Runtime.runtime.availableProcessors() call with
Runtime.getRuntime().availableProcessors() so the code uses the static
getRuntime() method to obtain the Runtime instance.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: b43372ce-6854-4d10-9ef8-74be74bea949
📒 Files selected for processing (1)
build.gradle
No description provided.