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

Provide more info to task-scheduler so it can generate more accurate package-task graphs #104

Open
kenotron opened this issue Oct 29, 2020 · 1 comment

Comments

@kenotron
Copy link
Member

kenotron commented Oct 29, 2020

Currently lage only gives a package graph and task graph separately, so task-scheduler doesn't know when some packages do not contain the tasks in the package.json.

Because of how the final combined package-task is generated, we might over-aggressively run tasks because of this missing info.

For example, if A depends on B and B depends on C:

A -> B -> C

and if only C has the task of special-C-build, when this following is called:

lage special-C-build --scope A

Nothing should be run because "A" doesn't have that task. The expected result is that nothing is run.

@amang034
Copy link

amang034 commented Apr 9, 2021

I am planning to add following argument to createPipeline function exported by task-scheduler
canRunTaskInPkg: (taskName: string, packageName: string) => boolean

Since lage has workspace knowledge and knows about scripts in individual packages, i think its better if we pass callback to task-scheduler which can tell if a particular package contains a particular script.

Task - scheduler while generating task graph can use this function to decide if it wants to put things in queue.

From lage, we can easily create canRunTaskInPkg from workspace object

Created following issue on task-scheduler to add above parameter
microsoft/task-scheduler#28

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

No branches or pull requests

2 participants