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

Support for job cancellation #2136

Closed
arrowd opened this issue May 2, 2023 · 6 comments
Closed

Support for job cancellation #2136

arrowd opened this issue May 2, 2023 · 6 comments

Comments

@arrowd
Copy link
Contributor

arrowd commented May 2, 2023

After libpkg enters pkg_jobs_solve()/pkg_jobs_apply() there is no way to signal it to stop. It'd be great to be able to stop the process while reacting on PKG_EVENT_PROGRESS_START/PKG_EVENT_PROGRESS_TICK.

@bapt
Copy link
Member

bapt commented May 2, 2023

What are you trying to achieve, the problem is in the middle of a transaction, the risk is to stop in an unstable state.

@arrowd
Copy link
Contributor Author

arrowd commented May 2, 2023

PackageKit has the ability to cancel jobs and I want our backend to support it as much as it can. At least we should be able to cancel during downloading.

pkg also stops in the middle of jobs_apply when a trigger fails, as well as user can hit Ctrl+C any time, so we're already risking. Adding some cancellation points may mitigate these risks.

@bapt
Copy link
Member

bapt commented May 2, 2023

ok I see and pkg tries to remain in a stable state as possible. I'll see what I can do

@arrowd
Copy link
Contributor Author

arrowd commented May 6, 2023

Another case - cancelling during multiple packages removal after receiving PKG_EVENT_DEINSTALL_FINISHED.

arrowd added a commit to arrowd/pkg that referenced this issue Jun 22, 2023
This implements cancelling fetch_libcurl downloads and DB incremental updating.
A part of freebsd#2136

Sponsored by:	Serenity Cybersecurity, LLC
bapt pushed a commit that referenced this issue Jun 22, 2023
This implements cancelling fetch_libcurl downloads and DB incremental updating.
A part of #2136

Sponsored by:	Serenity Cybersecurity, LLC
@grahamperrin
Copy link
Contributor

Duplicate of a 2021 issue?

@arrowd
Copy link
Contributor Author

arrowd commented Dec 7, 2023

I think this can be closed now.

@bapt bapt closed this as completed Jul 1, 2024
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

No branches or pull requests

3 participants