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): Persistent Tasks in Watch Mode #7922

Merged
merged 10 commits into from Apr 23, 2024

Conversation

NicholasLYang
Copy link
Contributor

@NicholasLYang NicholasLYang commented Apr 9, 2024

Description

Implements handling of persistent tasks. Basically, we strip out any persistent tasks from the task graph when we do either an execution for package rediscovery or package changes. Instead, we run the persistent tasks in a separate thread, so they don't block anything.

Testing Instructions

Added tests for both pruning methods.

Closes TURBO-2775

Copy link

vercel bot commented Apr 9, 2024

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

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 4:10pm
examples-svelte-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 4:10pm
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2024 4:10pm
turbo-turbo-tracing-next-plugin ❌ Failed (Inspect) Apr 22, 2024 4:10pm
7 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 4:10pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 4:10pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 4:10pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 4:10pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 4:10pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 4:10pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 4:10pm

Copy link
Contributor Author

NicholasLYang commented Apr 9, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @NicholasLYang and the rest of your teammates on Graphite Graphite

Copy link
Contributor

github-actions bot commented Apr 9, 2024

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

github-actions bot commented Apr 9, 2024

🟢 CI successful 🟢

Thanks

if run.has_persistent_tasks() {
// Abort old run
if let Some(run) = persistent_tasks_handle.take() {
run.abort();
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this run synchronously? Do we need to await the handle after calling abort?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the actual cancelation will likely happen at the next await point. We don't need to await the handle.

Copy link
Contributor

@gsoltis gsoltis left a comment

Choose a reason for hiding this comment

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

LGTM, just the one question about aborting an in-progress run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants