This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[turborepo] turbo-ignore doesn't provide a way to specify a commit to compare #5080
Labels
You can continue the conversation there. Go to discussion →
Which project is this feature idea for?
Turborepo
Describe the feature you'd like to request
Backstory
This is a continuation of our conversation with @anthonyshew on the turbo discord server: https://discord.com/channels/818588653005176832/1108910806269169785
It has led to some improvements in the docs, namely #5039 and #5041, which has resolved some inconsistency between the docs and the actual behaviour, but it doesn't solve the problem.
The problem
Turborepo docs have a page called Skipping tasks in CI. The docs tell about a simple CLI tool,
turbo-ignore
, that usesturbo
under the hood. This tool returns status code 1 if a workspace have changes and 0 otherwise. The docs page suggests that you should use it in CI.In a CI pipeline that starts when a new commit gets pushed, you want to compare this commit with a commit of the latest sucessful deployment. The docs page mentioned before implies that you can do that by showing the following command as the example of a command that gets generated under the hood, when
turbo-ignore
interacts withturbo
. Note the specified commit sha:On Vercel, it happens automatically -
turbo-ignore
adapts if it sees Vercel specific environment variables. On the other hand, in your own CI you're supposed to provide it by yourself. The problem is that there's no way to provide it, which makesturbo-ignore
basically useless outside of Vercel.Describe the solution you'd like
I don't have an exact solution, but there should be a way to provide commit sha to compare to. One idea might be to introduce a new flag that accepts it.
Describe alternatives you've considered
I tried using the
--fallback
flag, as the docs page suggested to before the mentioned PR's were merged, and it didn't worked.I ended up copying parts of
turbo-ignore
into my own CI scripts, so I manually callturbo
with the--dry
flag and look for thepackages
field in the returned JSON.The text was updated successfully, but these errors were encountered: