Repository navigation
fix(tasks): don't chain tasks expanded from one glob dependency - #379
Conversation
9e93395 to
d485ee4
Compare
✅ Deploy Preview for yarn-v6 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
⏱️ Benchmark Resultsgatsby install-full-cold
📊 Raw benchmark data (gatsby install-full-cold)Base times: 4.376s, 4.363s, 4.359s, 4.381s, 4.464s, 4.302s, 4.270s, 4.347s, 4.370s, 4.309s, 4.323s, 4.342s, 4.275s, 4.359s, 4.395s, 4.368s, 4.374s, 4.310s, 4.386s, 4.312s, 4.346s, 4.366s, 4.410s, 4.462s, 4.417s, 4.395s, 4.319s, 4.385s, 4.467s, 4.473s Head times: 4.332s, 4.341s, 4.304s, 4.355s, 4.305s, 4.342s, 4.374s, 4.261s, 4.331s, 4.432s, 4.352s, 4.377s, 4.440s, 4.329s, 4.415s, 4.263s, 4.385s, 4.389s, 4.285s, 4.283s, 4.341s, 4.305s, 4.274s, 4.314s, 4.431s, 4.457s, 4.380s, 4.317s, 4.363s, 4.315s gatsby install-cache-only
📊 Raw benchmark data (gatsby install-cache-only)Base times: 1.323s, 1.317s, 1.333s, 1.354s, 1.340s, 1.342s, 1.342s, 1.332s, 1.352s, 1.324s, 1.351s, 1.339s, 1.337s, 1.338s, 1.335s, 1.333s, 1.328s, 1.340s, 1.591s, 1.340s, 1.332s, 1.353s, 1.335s, 1.320s, 1.325s, 1.322s, 1.339s, 1.343s, 1.334s, 1.343s Head times: 1.318s, 1.310s, 1.324s, 1.329s, 1.313s, 1.347s, 1.348s, 1.316s, 1.319s, 1.322s, 1.334s, 1.334s, 1.329s, 1.318s, 1.327s, 1.333s, 1.324s, 1.311s, 1.750s, 1.311s, 1.313s, 1.320s, 1.321s, 1.327s, 1.312s, 1.333s, 1.308s, 1.333s, 1.321s, 1.324s gatsby install-cache-and-lock (warm, with lockfile)
📊 Raw benchmark data (gatsby install-cache-and-lock (warm, with lockfile))Base times: 0.365s, 0.371s, 0.367s, 0.367s, 0.365s, 0.366s, 0.367s, 0.370s, 0.367s, 0.368s, 0.373s, 0.369s, 0.369s, 0.369s, 0.368s, 0.367s, 0.371s, 0.370s, 0.368s, 0.370s, 0.367s, 0.367s, 0.363s, 0.370s, 0.367s, 0.370s, 0.369s, 0.379s, 0.377s, 0.372s Head times: 0.368s, 0.369s, 0.390s, 0.364s, 0.363s, 0.365s, 0.553s, 0.363s, 0.372s, 0.369s, 0.365s, 0.373s, 0.370s, 0.372s, 0.369s, 0.366s, 0.372s, 0.365s, 0.365s, 0.366s, 0.365s, 0.368s, 0.368s, 0.368s, 0.370s, 0.369s, 0.370s, 0.371s, 0.370s, 0.369s |
With `top` depending on `mid` and `base`, `mid` depending on `base`, and `build: *:build` everywhere, `yarn tasks run` hung forever. A dependency expanding to several workspaces was pushed as one sequential phase per workspace, in alphabetical order. That chain then applied to every task, so `mid:build` ended up depending on itself. All tasks expanded from the same dependency now go in a single phase. The sequential/parallel semantics between distinct dependencies don't change. Also disables commit signing in the `--since` test fixture so it doesn't depend on the user's git config.
d485ee4 to
b50e42b
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 4db14b3e-7a3f-4752-a46c-a446ec0ef34e) |
Issue: with
top → mid → base,top → baseandbuild: ^buildeverywhere,yarn tasks runhung forever. A dependency expanding to several workspaces became one sequential phase per workspace in alphabetical order, and that chain applied to every task:mid:buildended up depending on itself.Fix: all tasks expanded from one dependency go in a single phase. Ordering between distinct dependencies is unchanged. Covered by acceptance tests.
Stacked on #378.
Note
Medium Risk
Changes core task-graph ordering for glob-expanded dependencies; behavior fix with targeted tests but affects how all multi-workspace
*:…runs are scheduled.Overview
Fixes infinite hangs when
yarn tasks runresolves*:build(and similar globs) over workspaces whose real package dependencies form a diamond.The task resolver used to put each workspace expanded from one glob dependency into its own sequential phase, which imposed arbitrary ordering between siblings and could make a task (e.g.
mid:build) wait on itself. Dependency entries now carry a group id;build_dependency_phaseskeeps sequential siblings from the same source dependency in one phase so only true workspace edges order them. Ordering between distinct dependency clauses is unchanged.Adds a diamond monorepo acceptance test, a unit test for grouped sequential siblings, and disables GPG signing on git commits in the
--sincetest for CI stability.Reviewed by Cursor Bugbot for commit b50e42b. Bugbot is set up for automated code reviews on this repo. Configure here.