-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Dependency chains are not respected in moon ci
#1624
Comments
@kikones34 This is by design at the moment. The "run dependents" logic only applies to direct dependents of affected tasks, and not the entire tree. It was built this way as a simple regression testing mechanism and ensuring a change in a project didn't affect it's immediate consumers. However, we can probably add an option to control the depth. |
@milesj Oh, I see. The problem is that this breaks the way we're managing inter-project dependencies. In the real-world use case, what we actually have is:
This has worked perfectly as far as caching goes, but I'm finding it impossible to replicate with the CI feature. |
@kikones34 Yah that makes sense. Are you able to use |
Yeah for now we're using |
I'll look into supporting deep dependents in the next release. |
I've made some changes in v1.29, can you give that a shot? |
I've been checking out the new tracker logs and CLI options |
Yeah |
@milesj can you please elaborate on why this is the intended behavior of moon ci? We could put the outputs of a dependency as an inputs for the task like so: # app1
tasks
build:
command: build
inputs:
- 'src/**/*`
outputs:
- bin/main # app2
tasks
build:
deps:
- app1:build
command: build
inputs:
- 'src/**/*`
- /app1/bin/main # app3
tasks
build:
deps:
- app2:build
command: build
inputs:
- 'src/**/*`
- /app2/bin/main However, moon generates the graph before the outputs are generated so this doesn't work. So it seems that at the current state |
Describe the bug
If you have a dependency chain task1 -> task2 -> task3, when task1 is touched,
moon ci
will only execute task2 and it will not propagate to task3.Steps to reproduce
Configure three tasks as follows:
Commit everything to the default git branch.
moon ci
shouldn't execute anything.Now, modify the file
dependency-input.txt
and executemoon ci
. Thedependency-checker
task is run, but thedependent
is not:Expected behavior
The task
dependent
should also be executed since it depends ondependency-checker
.Additional context
Note that these dependency chains behave correctly regarding the cache logic (so if
dependency
is dirty, it will propagate the dirty state up todependent
). The issue only occurs inmoon ci
.The text was updated successfully, but these errors were encountered: