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

Added cancellable context #309

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dgannon991
Copy link
Contributor

@dgannon991 dgannon991 commented Nov 14, 2024

When using cnab-go in porter, we have a requirement to be able to cancel a long running task.

To this end, I've updated the Run method such that you can provide in a context and then I've updated the docker.exec method such that if the context is cancelled, it will attempt to stop the container.

This is just a suggestion, and one possible solution towards getporter/porter#2234, happy to take feedback and suggestions :)

Cheers!

@dgannon991 dgannon991 force-pushed the feat/2234/cancel-context branch from 332b354 to 1debf88 Compare November 14, 2024 21:24
@dgannon991 dgannon991 force-pushed the feat/2234/cancel-context branch from af409c3 to abef8d6 Compare January 29, 2025 21:58
@dgannon991 dgannon991 force-pushed the feat/2234/cancel-context branch from abef8d6 to 4d9d6fd Compare January 29, 2025 22:04
@dgannon991 dgannon991 changed the title Added optional cancellable context Added cancellable context Jan 29, 2025
@dgannon991
Copy link
Contributor Author

After feedback, I have made this a mandatory parameter to the action.Run and driver.Run methods.

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.

1 participant