Open dudicoco opened 15 hours ago
@dudicoco We don't run dependents for the dependencies of a task. The logic is here: https://github.com/moonrepo/moon/blob/master/crates/action-graph/src/action_graph_builder.rs#L392
We create a new RunRequirements
struct with default values, which sets the dependents
field to false.
I think something else may be going on, can you paste the --log trace
output? Can you also paste the output of moon task-graph app-01:install --dot
?
Describe the bug
The behavior of
moon ci
triggering of affected targets was changed in v1.30.0.There are two issues here:
Steps to reproduce
Full reproduction is available in this branch
moon ci --base HEAD~1
:$ moon ci --base HEAD~1 ▪▪▪▪ Gathering touched files apps/backend/app-01/package.json ▪▪▪▪ Gathering potential targets app-01:install app-02:install ▪▪▪▪ Generating action graph Target count: 2 Action count: 6 ▪▪▪▪ Running tasks installing ▪▪▪▪ root:install ▪▪▪▪ root:install (11ms) app-01:install | test ▪▪▪▪ app-01:install (cached, 5aba2e13)
SUMMARY
pass SyncWorkspace (46ms) skip SetupToolchain(system) (skipped, 5ms) pass SyncProject(system, root) (5ms) pass SyncProject(system, app-01) (5ms) pass RunTask(root:install) (15ms) pass RunTask(app-01:install) (cached, 40ms, 5aba2e13)
STATS
Actions: 5 completed (1 cached), 1 skipped Time: 113ms
As you can see in the second run with moon v1.30.0, the
root:install
task which was triggered because it's a dependency of theapp-01:install
task, triggered its own dependents -app-02:install
.Expected behavior
I would want a way to control if a dependency triggered by upstream tasks wii trigger its own dependents.