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

✨ Add bulk cancel functionality for analyses #769

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

MiriSafra
Copy link
Contributor

@MiriSafra MiriSafra commented Dec 8, 2024

Added a function for cancelling multiple analyses at once.
Part of: tackle2-ui issue #2153

@MiriSafra MiriSafra changed the title ✨Add bulk cancel functionality for analyses ✨ Add bulk cancel functionality for analyses Dec 8, 2024
Copy link
Contributor

@jortel jortel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The related issue has not been triaged.
This is a premature optimization and should be closed.

// // @tags tasks
// // @success 202
// // @router /tasks/{id}/cancel [put]
// // @param id path int true "Task ID"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were the additional // added? ^

// @description Cancel multiple tasks by IDs.
// @tags tasks
// @success 202
// @router /tasks/cancel/list [put]
Copy link
Contributor

@jortel jortel Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semantically, I think it would be more correct for the PUT to be against the collection because the action is updating the collection. Ex: PUT /tasks/cancel (without the /list ). The collection implies multiple objects.

Better yet, PUT /tasks/cancel?filter=id:[1,2,3]. This would be the most RESTful and more powerful. For example, it would support selection of tasks to be canceled by task kind and state. Example: /tasks/cancel?filter=kind:discovery,state=Running. or all tasks for an application
/tasks/cancel?filter=application.id=44.

@jortel
Copy link
Contributor

jortel commented Jan 17, 2025

@MiriSafra Thank you for your contribution!

@jortel jortel merged commit 55d5e94 into konveyor:main Jan 17, 2025
4 of 5 checks passed
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.

2 participants