-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: allow cli prompt to be canceled #143
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
verbanicm
requested review from
a team,
wallyts,
volzmc,
gjonathanhong,
drevell and
sethvargo
and removed request for
wallyts,
volzmc and
gjonathanhong
June 25, 2023 14:42
sethvargo
requested changes
Jun 26, 2023
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'm not sure this is needed? Does it actually fail to cancel on ctrl+c?
verbanicm
force-pushed
the
verbanicm/prompt
branch
from
June 26, 2023 13:20
a717fff
to
f7fe48f
Compare
sethvargo
reviewed
Jun 26, 2023
verbanicm
force-pushed
the
verbanicm/prompt
branch
4 times, most recently
from
June 26, 2023 15:16
2c1de3b
to
1dad0ef
Compare
verbanicm
force-pushed
the
verbanicm/prompt
branch
from
June 26, 2023 15:22
1dad0ef
to
e98561e
Compare
drevell
requested changes
Jun 26, 2023
verbanicm
force-pushed
the
verbanicm/prompt
branch
from
June 26, 2023 18:40
92297d9
to
e6ff767
Compare
verbanicm
changed the title
fix: allow cli prompt to be canceled and add default value
fix: allow cli prompt to be canceled
Jun 26, 2023
verbanicm
force-pushed
the
verbanicm/prompt
branch
from
June 26, 2023 19:25
e6ff767
to
b11b432
Compare
sethvargo
reviewed
Jun 26, 2023
drevell
previously requested changes
Jun 26, 2023
verbanicm
commented
Jun 27, 2023
sethvargo
approved these changes
Jun 27, 2023
verbanicm
dismissed
drevell’s stale review
June 27, 2023 02:37
merging during off hours to keep moving
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When adding prompt feature to https://github.com/abcxyz/abc, I noticed that prompt cannot be canceled with SIGTERM or SIGINT (even it parent context was created that way). This adds that capability.
Chose to add context to prompt func to allow calling function to determine how the context should be canceled in addition to adding signal.NotifyContext to guarantee Prompt is cancelable.