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

feat(turborepo): pass through arguments only for root tasks #8089

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

HelloWorld017
Copy link

@HelloWorld017 HelloWorld017 commented May 4, 2024

Description

In the document, it says that cli arguments are not passed through task dependencies.

Note that these additional arguments will not be passed to any additional tasks that are run due to dependencies from the pipeline configuration.

But when I actually run a task with additional arguments (e.g. turbo run dev -- --env=stage) the arguments (e.g. --env=stage) are passed through all the dependencies, and their caches are missed.

Related Issues: #1744 #5743

Fixes

Only pass the additional cli arguments to the root tasks. (= tasks which are not required by other tasks)

Testing Instructions

  1. Open the design-system example.
  2. In docs, run turbo run build --summarize -- --disable-telemetry.
  3. Ensure that --disable-telemetry is only passed in @repo/docs#build, not @acme/ui#build
  4. In docs, run turbo run build --summarize -- --test
  5. Ensure that @acme/ui#build is cached.

@HelloWorld017 HelloWorld017 requested a review from a team as a code owner May 4, 2024 16:14
@turbo-orchestrator turbo-orchestrator bot added needs: triage New issues get this label. Remove it after triage owned-by: turborepo labels May 4, 2024
Copy link

vercel bot commented May 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

7 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview May 5, 2024 7:52am
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview May 5, 2024 7:52am
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview May 5, 2024 7:52am
examples-native-web ⬜️ Ignored (Inspect) Visit Preview May 5, 2024 7:52am
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview May 5, 2024 7:52am
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview May 5, 2024 7:52am
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview May 5, 2024 7:52am

Copy link

vercel bot commented May 4, 2024

@HelloWorld017 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@HelloWorld017 HelloWorld017 force-pushed the fix/wrong-passthrough-args-cache-key branch from 11e8bb9 to 05409ce Compare May 5, 2024 07:52
@marisuxma
Copy link

This would be great!

@marisuxma
Copy link

@jaredpalmer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage New issues get this label. Remove it after triage owned-by: turborepo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants