这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@gsoltis
Copy link
Contributor

@gsoltis gsoltis commented Mar 8, 2022

  • shows what packages would be affected by an invocation of turbo run with equivalent arguments
  • can use --json flag to produce output as a pretty-printed json array

@vercel
Copy link
Contributor

vercel bot commented Mar 8, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/turbo-site/5fPGSA6xr7TDBitcDaDKcxKZoCfo
✅ Preview: https://turbo-site-git-gsoltis-plancmd.vercel.sh

jaredpalmer
jaredpalmer previously approved these changes Mar 9, 2022
Copy link
Contributor

@jaredpalmer jaredpalmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should make this a flag on run? If we think about what we would need to use --plan to clean up e2e tests, I think we would need payload of package in scope, task ids + hashes. What do you think?

@weyert

This comment was marked as off-topic.

Copy link
Contributor

@weyert weyert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking promising

@jaredpalmer
Copy link
Contributor

jaredpalmer commented Mar 9, 2022

@weyert serialized graph is a different matter which we are going to support. The goal here is to increase observability and unblock folks using Ignore Command on Vercel/Netlify and also ppl using dynamic pipelines in CircleCI and GitLab CI.

@gsoltis
Copy link
Contributor Author

gsoltis commented Mar 9, 2022

@jaredpalmer re: cleaning up e2e tests, I think we need to be able to check "packages in scope", "tasks to be run", and "what was run from cache".

As currently implemented, plan gives us "packages in scope". Maybe plan is not the best term for that functionality, since it suggests "things that will be run", which is more like "tasks to be run". Perhaps the command here is better described as affected? It answers the question of "given these flags (--since, --scope, etc.), what packages are in scope?". Then a true plan would be "tasks to be run", a superset of "packages in scope". We don't technically need both, could even have a --packages-only flag to the "tasks to be run" command. What do you think, should we implement that instead?

I'm not sure I have a strong opinion on a separate command vs flag to run. Internally we can make the code sharing work out either way. My inclination is towards separate command because not all of the flags for run apply and that could lead to some documentation or parsing awkwardness, but that's not necessarily a strong argument. If there's a better DX reason either way, that should probably take precedence.

@alexandernanberg
Copy link

As a user I think I'd prefer turbo run --dry or an variation of that. --dry/--dry-run is quite common in other tools so might be easier to understand compared to --plan

@jaredpalmer
Copy link
Contributor

Agree with @alexandernanberg —dry makes sense. Obvs let’s keep the abstraction needed to get the graph and scope outside of run command. These will be useful for the query commands we chatted about in our sync yesterday.

@gsoltis
Copy link
Contributor Author

gsoltis commented Mar 10, 2022

I think --dry-run would be fine for showing the tasks that would be run. That will require extricating the task graph a bit, but that's work we need to do anyways. I'll get that going in a separate PR and then we can layer on top of that.

@gsoltis
Copy link
Contributor Author

gsoltis commented Mar 11, 2022

Closing in favor of #862

@gsoltis gsoltis closed this Mar 11, 2022
@gsoltis gsoltis deleted the gsoltis/plan_cmd branch March 11, 2022 01:14
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

Successfully merging this pull request may close these issues.

5 participants