fix(core): keep continuous children alive when nx:noop orchestrator completes#35388
Merged
AgentEnder merged 1 commit intomasterfrom Apr 28, 2026
Merged
fix(core): keep continuous children alive when nx:noop orchestrator completes#35388AgentEnder merged 1 commit intomasterfrom
AgentEnder merged 1 commit intomasterfrom
Conversation
…ompletes A target with `executor: nx:noop` and `dependsOn` pointing at continuous tasks was unusable as a top-level orchestrator: the noop fast-path exits instantly, `cleanUpUnneededContinuousTasks` then sees no incomplete task needing the continuous children, and SIGKILLs them. Expand initiating task ids through `nx:noop` tasks when seeding the orchestrator's keep-alive anchor set so the real tasks beneath a noop become the anchors. Preserves `initiatingTasks` itself, so TUI output, atomized `e2e-ci` coordinator semantics, hashing, and caching are unchanged. - Add `expandInitiatingTasksThroughNoop` helper in tasks-runner/utils - Wire it into `TaskOrchestrator.initializingTaskIds` - Cover passthrough, continuous/non-continuous expansion, nested noops, empty-deps, cycles, and mixed initiators
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit d4551bd
☁️ Nx Cloud last updated this comment at |
FrozenPandaz
approved these changes
Apr 23, 2026
| taskGraph: TaskGraph, | ||
| projectGraph: ProjectGraph | ||
| ): Set<string> { | ||
| const expanded = new Set<string>(); |
Contributor
There was a problem hiding this comment.
I believe we have a util for this somewhere.
58cb2a7 to
33b38bf
Compare
FrozenPandaz
pushed a commit
that referenced
this pull request
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
A target with
executor: nx:noopanddependsOnpointing at continuous tasks is unusable as a top-level orchestrator.Given a config like:
where
serveandwatch-cssare continuous, runningnx run app:dev:serveandwatch-cssstart and become ready.nx:noopfast-path (task-orchestrator.ts:1128) exitsdevinstantly with success.cleanUpUnneededContinuousTasks(task-orchestrator.ts:1785-1809) runs on every completion. Its predicate keeps a continuous task alive only if it's ininitializingTaskIdsand still incomplete, OR it's acontinuousDependenciesentry of some incomplete task.dev) just completed, and the continuous children aren't directly ininitializingTaskIds— they're only deps of the now-complete noop.SIGKILL'd immediately.Expected Behavior
Running a top-level
nx:nooporchestrator should keep its continuousdependsOnchildren alive. The orchestrator process stays running until the continuous children exit (e.g. user Ctrl+C), matching the ergonomics ofnx run-many -t serve,watch-css.Fix
Expand
initializingTaskIdsinside the orchestrator throughnx:nooptasks when seeding the keep-alive anchor set. The real tasks beneath a noop become the anchors so they survive the noop's instant completion.expandInitiatingTasksThroughNoopinpackages/nx/src/tasks-runner/utils.ts: BFS that drops anynx:noopfrom the anchor set and enqueues itsdependencies+continuousDependencies, recursing through nested noops; cycle-safe via avisitedset.TaskOrchestrator.initializingTaskIdsattask-orchestrator.ts:101.initiatingTasksarray is left untouched, so TUI output (tui-summary-life-cycle.ts), atomizede2e-cicoordinator semantics, hashing, and caching are unchanged. For atomized chunk patterns the expansion has no visible effect because children aren't continuous.Related Issue(s)
Fixes #