fix(build): Prevent concurrent executions of core-build (fixes #2376).#2377
fix(build): Prevent concurrent executions of core-build (fixes #2376).#2377Nathan903 wants to merge 9 commits into
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe core task flow now uses explicit task dependencies instead of inline commands, with once-only execution applied to the core task declarations. ChangesTask dependency graph
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
✅ Action performedFull review finished. Your plan includes PR reviews subject to rate limits. More reviews will be available in 22 minutes. |
quinntaylormitchell
left a comment
There was a problem hiding this comment.
I think that a simpler way to fix this is to change might be to change line 8 of taskfiles/tests/integration.yaml from deps: to cmds:. iirc, dependencies run concurrently, and commands run sequentially.
@junhaoliao you will probably know which approach is best!
This reverts commit f0be5de.
thx for the review. Yes, I just tested this much simpler fix (just 1 line change) tasks:
default:
- deps:
+ cmds:
- task: "clp-py-project-imports"
- task: "core"
- task: "package"
and this fix works. However, removing parallelism makes building slower. I tested both version of the fixes and this simpler fix adds 35 seconds to the build time of What do you guys think about this tradeoff of speed and simplicity |
Description
Fixes race condition of
task tests:integrationsporadically fails with linker errors (likeundefined reference to 'main').The
coretask previously invokedcore-buildusingcmdsinstead ofdeps. Because of this,go-taskcould not deduplicate the build when multiple parallel test targets triggered thecoretask at the same time. This caused two parallelcmake --buildprocesses to run simultaneously and corrupt each other's object files.This PR
coretask to usedepsinstead ofcmdsso the task runner can track it natively.core-generateas a dependency ofcore-buildto maintain strict ordering.run: oncetocore-generateandcore-buildintaskfile.yaml, and to thecoredependency task intaskfiles/deps/main.yaml, to guarantee they evaluate only once globally, regardless of differing environment configurations passed down by the parallel test wrappers.Checklist
breaking change.
Validation performed
Task now deduplicates the build step.
Previously:
gives
Now
gives
End to end test:
gives
1(cmake --buildonly invoked once)Summary by CodeRabbit
Summary by CodeRabbit