You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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 thebuild
task of the parent package, then thebuild
task of the child2 package, and finally thetest
task of the child2 package. Since child1 does not have atest
package, it should not be built.Current Behavior
Running
npm run test
is runningbuild
for child1, even though it does not have atest
task. I see on the logskipped: 2
which I think is the number of packages that do not have atest
task.The text was updated successfully, but these errors were encountered: