-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add cancel/kill all invocations to a service or service instance #1529
Conversation
1679650
to
ad0fe03
Compare
|
cli/src/commands/services/cancel.rs
Outdated
for inv in invocations { | ||
let result = client.cancel_invocation(&inv.id, opts.kill).await?; | ||
let _ = result.success_or_error()?; | ||
} |
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.
A) Should we put an upper bound on how many we display on the screen? (maybe a few examples and a message that says how many more?)
B) Do you think it'd cause problems to have this be an unbounded loop of cancellations (in situations with potentially large number of invocations)?
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.
Should we put an upper bound on how many we display on the screen?
We could introduce an upper bound, but then this means either that we don't show all the invocations we kill, or we need to shave off some invocations, meaning that during dev the user might have to run many times the kill command to kill all the invocations...
Do you think it'd cause problems to have this be an unbounded loop of cancellations (in situations with potentially large number of invocations)?
Only way to find out is testing it 😄 In principle here we just append commands to the log, so many commands probably will slow down the system a bit while all of those are processed.
My 2c:
|
Sounds good to me, i can disambiguate the "query" by checking if the string starts with
I don't see the need for it TBH, it's quite explicit already and asks for confirmation too. |
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.
LGTM. Let's run this as an experiment (maybe make it clear that this is a [BETA] command on help?) to see how it behaves and performs before we commit to this interface/behaviour.
I would like to avoid adding BETA, as we're trying as much as we can to show that restate is stable. |
A beta CLI command doesn't mean that restate is not stable! it's a signal that the command interface is experimental and we are likely to change the behavior. |
Yes but it can give the wrong impression that the cancel/kill feature is not stable, and not just the command interface. I also think that the whole CLI is probably experimental and we'll do some changes to it over time, perhaps breaking old commands too... |
Fix #827