-
Notifications
You must be signed in to change notification settings - Fork 313
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: Add cancel button to playground runs #5566
feat: Add cancel button to playground runs #5566
Conversation
Can cancel runs with and without datasets. Cancellation is purely client-side. The backend should abort its tasks when connection with the client is lost.
|
||
// Get the response as JSON | ||
const json = await response.json(); | ||
function fetchJsonObservable<T>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not find any examples of how to trigger an abort controller from a relay disposable.
Had to whip this up, surprised it works 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People have been asking for this since 2018 apparently
icon={ | ||
!isRunning ? ( | ||
<Icon svg={<Icons.PlayCircleOutline />} /> | ||
) : ( | ||
<div | ||
css={css` | ||
margin-right: var(--ac-global-dimension-static-size-50); | ||
& > * { | ||
height: 1em; | ||
width: 1em; | ||
font-size: 1.3rem; | ||
} | ||
`} | ||
> | ||
<Loading size="S" /> | ||
</div> | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have a loading prop on our buttons you can use instead of this i think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also disables the button, so I can't use it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh okay, this works then
can we get an issue to track server side cancel support? |
See #5573 for backend work |
Can cancel runs with and without datasets.
- [ ] Server side run cancellationwill do this in future workCancel.prompts.mov
Cancel.Datasets.mov
resolves: #5484