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(watch): add interruptible tasks #9228

Merged
merged 3 commits into from
Oct 15, 2024
Merged

Conversation

NicholasLYang
Copy link
Contributor

@NicholasLYang NicholasLYang commented Oct 7, 2024

Description

Adds the ability to annotate persistent tasks as interruptible. Fixes #8164.

NOTE: This does create change in behavior for watch mode where new changes will stop the current executing and start a new one. Previously, we waited for runs to finish, but now that persistent tasks can be interrupted, we can't do that since persistent tasks don't finish.

Testing Instructions

Added tests for ensuring that interruptible requires persistent, but otherwise you'll have to try this out manually since it's watch mode.

Copy link

vercel bot commented Oct 7, 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 Oct 8, 2024 6:23pm
8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 6:23pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 6:23pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 6:23pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 6:23pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 6:23pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 6:23pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 6:23pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 6:23pm

@weyert
Copy link
Contributor

weyert commented Oct 11, 2024

NOTE: This does create change in behavior for watch mode where new changes will stop the current executing and start a new one. Previously, we waited for runs to finish, but now that persistent tasks can be interrupted, we can't do that since persistent tasks don't finish.

But only when interruptible is set to true otherwise the previous behaviour occurs?

@NicholasLYang
Copy link
Contributor Author

No, the change is true for all tasks. I don't want to make too many special cases for watch mode execution

Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

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

I believe this now allows for persistent tasks to only run after their deps run which has also been an ask (#8673). Should we advertise this/consider this when naming the config option?

Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

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

This is awesome!

If we ever enable caching during watch I believe we need to verify that cache: false on interruptible tasks, but since that isn't possible now it's fine.

@NicholasLYang NicholasLYang merged commit 6cbce7a into main Oct 15, 2024
40 checks passed
@NicholasLYang NicholasLYang deleted the nicholasyang/interruptible branch October 15, 2024 17:53
@JCMais
Copy link

JCMais commented Oct 19, 2024

Hmm, looks like the JSON schema was not updated with the new field added here.

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.

Watch-mode not rebuild dependent packages when package changes
4 participants