Skip to content

Cancel Playground Tests #2246

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

Draft
wants to merge 9 commits into
base: canary
Choose a base branch
from
Draft

Cancel Playground Tests #2246

wants to merge 9 commits into from

Conversation

cg-jl
Copy link
Contributor

@cg-jl cg-jl commented Aug 1, 2025

I'll be implementing WASM functionality for enabling cancellation in the playground on top of #2184. I'm not sure how to proceed afterwards wrt merging, since I'm not going to be doing the rest of the clients for now.

Remaining:

  • rebase against canary
  • I can run pnpm dev:vscode
  • I can run a test in the playground
  • Cancel button on the playground cancels the tests
  • Cancel button runs on playground extension
  • Notify Add abort support [WIP] #2184 of video + available changes

Copy link

vercel bot commented Aug 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
baml Canceled Canceled Aug 18, 2025 8:16am
promptfiddle Error Error Aug 18, 2025 8:16am

Copy link

github-actions bot commented Aug 1, 2025

@aaronvg
Copy link
Contributor

aaronvg commented Aug 1, 2025

you can delete all the non-wasm stuff for now fyi. Like only push the minimum viable code that's all been tested in the playground.

Copy link

github-actions bot commented Aug 2, 2025

@cg-jl cg-jl force-pushed the jesus/cancel-playground-tests branch from 390aa68 to 6839913 Compare August 2, 2025 01:13
@cg-jl
Copy link
Contributor Author

cg-jl commented Aug 2, 2025

I don't have the energy to review the rest of the canceling logic. I'll have some rest & continue tomorrow. Last push is to keep the changes visible & backed up. Will commit --amend when reviewed.

Copy link

github-actions bot commented Aug 2, 2025

Copy link

github-actions bot commented Aug 2, 2025

@cg-jl cg-jl force-pushed the jesus/cancel-playground-tests branch from 6839913 to 1ca932e Compare August 3, 2025 17:32
Copy link

github-actions bot commented Aug 3, 2025

@cg-jl
Copy link
Contributor Author

cg-jl commented Aug 3, 2025

Canceling logic is in place, but the current system doesn't work: Calling token.cancel() from JS blocks until run_tests has finished. I'm not sure why this happens right now, I'll keep debugging.

Copy link

github-actions bot commented Aug 3, 2025

Copy link

github-actions bot commented Aug 4, 2025

Copy link

github-actions bot commented Aug 4, 2025

Copy link

github-actions bot commented Aug 4, 2025

@cg-jl
Copy link
Contributor Author

cg-jl commented Aug 4, 2025

Apparently, cancelling the "joined" request (run_tests) does cancel the future.
Which is sad because I'd prefer to keep the tasks separately cancelable so that we can grab their results as-needed.
I'll add a comment explaining & referencing this, because then some work has to be done wrt canceling if we stop joining the tasks before proceeding.

Copy link

github-actions bot commented Aug 4, 2025

tomaszkiewicz and others added 7 commits August 18, 2025 09:07
- Add { once: true } to external signal abort listeners in BamlStream
- Add { once: true } to internal abort controller listeners
- Add { once: true } to ReadableStream abort listeners
- Update NextJS API route examples with { once: true }
- Update TypeScript examples with { once: true }
- Update integration tests with { once: true }

This prevents memory leaks by automatically removing event listeners
after they fire once, which is the expected behavior for abort events.
Improves performance and ensures proper resource cleanup in long-running
applications with many concurrent requests.
Verified manually that tests can be run on the extension.

No cancellation yet.
@cg-jl cg-jl force-pushed the jesus/cancel-playground-tests branch from 7645c7d to 21ba107 Compare August 18, 2025 08:01
@cg-jl cg-jl temporarily deployed to boundary-tools-dev August 18, 2025 08:01 — with GitHub Actions Inactive
@cg-jl cg-jl temporarily deployed to boundary-tools-dev August 18, 2025 08:01 — with GitHub Actions Inactive
@cg-jl cg-jl temporarily deployed to boundary-tools-dev August 18, 2025 08:01 — with GitHub Actions Inactive
Copy link

Copy link

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.

3 participants