packit / packit-service

Packit provided as a service
https://packit.dev
MIT License
37 stars 48 forks source link

Add support for cancelling Testing Farm requests by users #2336

Open janhavlin opened 9 months ago

janhavlin commented 9 months ago

Description

After some recent changes to auth on the Testing Farm API, users are not able to use the delete endpoint to cancel requests that were submitted on their behalf by Packit - only Packit is authorized to cancel TF requests created by Packit. Due to this limitation, implementing support for TF request cancelling on Packit's side deems most suitable.

Benefit

Users will be able to cancel their TF requests.

Importance

No response

What is the impacted category (job)?

Testing Farm tests

Workaround

Participation

janhavlin commented 9 months ago

@Frawless @kornys

lbarcziova commented 9 months ago

hi @janhavlin. This makes sense to me and would be a nice improvement.

As for the implementation, it could be a new comment command (e.g. `/packit test-cancel ) or something similar to #1595, but that is only for GitHub. In any case, we need to check the "permissions" to cancel the particular request for the person who triggers it.

kkaarreell commented 1 month ago

This would be really great to have. It might also help to "decrease" cloud costs. Could you maybe consider planning it for implementation?

LecrisUT commented 1 month ago

Also worth considering GH Action's concurrency option. Basically if you set it, then it would cancel all previous jobs that have the same github.ref (e.g. this would be the PR reference) . Would be nice to make packit do this by default, or have an option to enable such logic.