feat(cli): add --mode flag to dora build for parallel/sequential builds#1573
feat(cli): add --mode flag to dora build for parallel/sequential builds#1573swar09 wants to merge 4 commits into
--mode flag to dora build for parallel/sequential builds#1573Conversation
|
I have figured out the issue which cause CI failure i will update soon . |
phil-opp
left a comment
There was a problem hiding this comment.
Thanks for the PR! This seems like a good idea.
We had parallel builds as default in the past, but this led to some issues with some build systems, so we chose the safer sequential build order instead. But making this configurable is even better.
| // Run build on local machine | ||
| #[clap(long, action)] | ||
| local: bool, | ||
| /// Build mode sequential or parallel. Defaults to sequential |
There was a problem hiding this comment.
We should note here that parallel builds should only be used when the build commands support this.
| tracing::info!("Building locally, as requested through `--force-local`"); | ||
| log::info!("Building locally, as requested through `--force-local`"); |
There was a problem hiding this comment.
Why the change from tracing to log? (same below)
|
Thanks for this PR @swar09, and especially for filing the underlying issue #1570 — your diagnosis was exactly right: building nodes one at a time wastes wall-clock time on capable dev machines, and the user needed a way to opt into parallel execution. Closing this PR because the feature has already shipped in main as part of the dora 1.0 consolidation (commit dora build --parallel dataflow.ymlQuick comparison so you can see where the in-tree version differs from your design:
The main differences are:
None of those design choices invalidate your approach — both implementations solve the same problem with the same trade-offs around the user's machine capability. The 1.0 consolidation just happened to land a parallel scheduler concurrent with your work. What carries forward from this PR:
Thanks again — this kind of "obvious-once-you-think-about-it" usability win is great to get reports on. Apologies for the slow turn-around; if you have more proposals like this, please keep them coming, ideally in a fresh PR against the current main since the build subsystem has changed substantially since March. 🤖 Closing comment from Claude on behalf of the maintainers as part of the backlog triage pass. |
Summary
Closes #1570
As of now,
dora build dataflow.ymlbuilds nodes one at a time. This is safe for low-spec hardware but wastes time on capable development machines. This PR adds a--modeflag todora buildso users can opt into parallel building.Usage
Note
The feature is most valuable for use cases like dataflows with Python, Rust, and C/C++ nodes from separate projects.
Works for Any combination of independent build commands.
For a pure Rust workspace with all nodes inside it, the gain is minimal because Cargo itself serializes via locks.