Skip to content
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

Lage scheduler adding "phantom" tasks to the graph. #592

Open
Philip-Scott opened this issue Mar 1, 2023 · 1 comment · May be fixed by #593
Open

Lage scheduler adding "phantom" tasks to the graph. #592

Philip-Scott opened this issue Mar 1, 2023 · 1 comment · May be fixed by #593

Comments

@Philip-Scott
Copy link
Member

Philip-Scott commented Mar 1, 2023

Describe the bug
Running a command with Lage acts as if the command exists across all packages rather than checking if a package actually has this script or not. This is a problem for pipelines trying to optimize build processes of subtasks as Lage is running more tasks than required.

For example, if we wanted to have a pipeline that just ran tests, we shouldn't need to run the full repo's build steps.

To Reproduce

  • git clone https://github.com/Philip-Scott/lage-tasks-min-repro.git
  • npm install
  • npm run test

Expected Behavior

On that min-repro repo, running npm run test should run the build task of the parent package, then the build task of the child2 package, and finally the test task of the child2 package. Since child1 does not have a test package, it should not be built.

$ npm run test:expected 
> [email protected] test:expected
> lage test --to child2 --no-cache
Lage running tasks with 15 workers
Summary
Slowest targets
  parent#build - 0.36s
  child2#test - 0.27s  
  child2#build - 0.27s
success: 3, skipped: 0, pending: 0, aborted: 0, failed: 0
Took a total of 0.93s to complete.

Current Behavior

Running npm run test is running build for child1, even though it does not have a test task. I see on the log skipped: 2 which I think is the number of packages that do not have a test task.

$ npm run test 
> [email protected] test
> lage test --no-cache
Lage running tasks with 15 workers
Summary
Slowest targets
  parent#build - 0.39s
  child2#test - 0.33s
  child2#build - 0.30s
  child1#build - 0.29s  # <- This should not be running. 
success: 4, skipped: 2, pending: 0, aborted: 0, failed: 0
Took a total of 1.05s to complete.
@JasonGore
Copy link
Member

Possible duplicate of #502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants