Replies: 1 comment
-
|
Hi danLDev, Your proposal makes a lot of sense. Allowing arbitrary CLI arguments to be passed through without affecting the cache key would improve flexibility for use cases like sharded E2E tests. Currently, passing extra args causes cache misses because Turbo treats them as part of the task signature. Adding an option similar to passThroughEnv for arbitrary arguments would let you run commands with varying flags without triggering unnecessary rebuilds, while still relying on Turbo’s caching and dependency guarantees. This feature would streamline CI workflows where dynamic args are common. Thanks for sharing this idea—it would be a useful enhancement for many users. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-goals
No response
Background
Currently in our CI, we use sharding to split our E2E tests.
This results in a command something like
yarn test:e2e -- -- --project=foo --shard=1/3This then triggers a cache miss (due to the arbitrary args), causing a full build before e2e is ran.
We are currently getting around this by doing
yarn buildin a prior step to ensure everything is built, and then passing--onlyto the test command.Proposal
It would be ideal if there was a way to omit the passthrough args from a specific task.
This would mean we could still rely on turbo to guarantee the rest of the dependency graph is built.
Potentially part of the turbo.json in the same way as tasks.passThroughEnv.
Beta Was this translation helpful? Give feedback.
All reactions