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

Support Inputs in pipeline config, hashes are per task #951

Merged
merged 24 commits into from
Apr 11, 2022

Conversation

gsoltis
Copy link
Contributor

@gsoltis gsoltis commented Mar 25, 2022

  • Add support for "inputs": [<file glob>] to pipeline config
  • In the case of "inputs", use git ls-files to calculate file hashes
  • Remove package-level hash and file hash
  • Hash combinations of package-inputs
  • Hashing of package-tasks is now done inline while walking the graph
  • Update e2e test to highlight new hashing behavior

Because task hashing now only takes into account the hash of task-graph dependencies, tasks that don't have task-graph dependencies won't have new hashes when package-dependencies change. The classic example is lint. If a depends on b, and b changes, that should no longer force a cache miss for a#lint, so long as the lint task has no dependencies.

Remaining work:

  • Update fallback for git ls-file to properly handle inputs
  • Add tests for inputs
  • Update global hash key (not technically necessary, but may be a good idea)

Fixes #523

@vercel
Copy link

vercel bot commented Mar 25, 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/GWsyoJTwpYEzasEKjRbpxszNo6mb
✅ Preview: https://turbo-site-git-gsoltis-hashinputs.vercel.sh

@vercel
Copy link

vercel bot commented Apr 6, 2022

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

Name Deployment Preview Updated
turbo-site Deployed View Apr 11, 2022 at 6:41PM (UTC)

@jaredpalmer
Copy link
Contributor

lgtm

@jaredpalmer jaredpalmer added the pr: automerge Kodiak will merge these automatically after checks pass label Apr 11, 2022
@kodiakhq kodiakhq bot merged commit 1594d44 into main Apr 11, 2022
@gsoltis gsoltis deleted the gsoltis/hash_inputs branch April 11, 2022 19:14
@ObliviousHarmony
Copy link
Contributor

This is a very exciting change. One thing I wanted to note is that this should likely also be documented as a configuration option.

@gsoltis
Copy link
Contributor Author

gsoltis commented Apr 13, 2022

@ObliviousHarmony docs coming in #1046

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to specify inputs to task
3 participants