Docs: Clarify behaviour of --affected
flag, and whether it takes inputs
into account
#9329
Labels
area: docs
Improvements or additions to documentation
What is the improvement or update you wish to see?
I've just run into an issue where the
--affected
flag does not take a tasksinputs
into account, which I think could be made clearer in the documentation. In my case, a graphql schema in a parent directory should be taken into account for acodegen
task as it is part of the tasksinputs
, and therefore cause cache misses in all tasks that depend on it. When adding--affected
to my CI runs, I noticed that a change to the schema file doesn't cause thecodegen
tasks to run, as it is not deemed to be affected by the change (not are any tasks), and as a result CI passes even though a type error is subsequently introduced.Looking more closely at the documentation, I see a mention of "packages with code changes", which could suggest that only changes within the packages, and not their inputs, are considered? If this is the case, I think the docs could bemade a lot clearer on the point.
Is there any context that might help us understand?
I considered whether this should be a bug report or a documentation request, but given that the language is a little unclear, I decided on the latter.
Does the docs page already exist? Please link to it.
https://turbo.build/repo/docs/crafting-your-repository/constructing-ci#running-only-affected-tasks
The text was updated successfully, but these errors were encountered: