-
Notifications
You must be signed in to change notification settings - Fork 223
shopify app bulk cancel command to cancel bulkops through CLI
#6706
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
Conversation
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success3573 tests passing in 1419 suites. Report generated by 🧪jest coverage report action from 839f44a |
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
f696432 to
a89e033
Compare
shopify app bulk cancel command to cancel bulkops through CLI
9c7c1cc to
d860661
Compare
6b60777 to
dcc981b
Compare
gonzaloriestra
left a comment
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.
Some general feedback/doubts:
- Is there a limit in the number of simultaneous bulk operations? Otherwise, why would the users want to cancel?
- Why does it take so long to cancel? I would find it annoying to need another bulk operation for that. I think it should be almost instant, at least from the user perspective. If the server really need some time, couldn't we tell the user it's canceled and finish the work silently in the backend?
3696913 to
886a15d
Compare
|
Not too sure about this. I think @allancalix will have more context. But for the limit in the number of simultaneous bulk operations part, I'm pretty sure you can only run one bulk operation per shop at a time. |
|
@gonzaloriestra We allow at most 5 bulk mutations at any time per app. Most of the bulk operation use cases are async and offline, we didn't consider how a recent change we made to allow bulk mutation jobs to run longer would cause delays for cancellation (cc: @teddyhwang). There are things we can do to improve this but this is the first we have heard of cancellation delay causing issues so we'll have to make changes to lower the latency on it. |
In that case, I suspect this command would almost never be used... But it's ok to keep it. Also, if the cancellation is going to be fast, I think the command should be sync (similar to |
|
Initiating a cancel is sync, but the process is async. It will take time for the job to respond to the cancel "request." I think the output of cancel in the screenshot above though looks too much like a new job has been created. Let's use the info banner to confirm inputs -- especially in the case that there is an error due to a bad ID or having the wrong app/store context. Then use the success banner to confirm that the cancellation was initiated, set expectations, and tell them how to check on it. |
2f0263f to
668499a
Compare
|
@nickwesselman Made the changes to reflect this! |
668499a to
2aa6bd5
Compare
|
/snapit |
e8d1e85 to
fb7dd29
Compare
fb7dd29 to
839f44a
Compare
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.
It's working well. Although after a while, when trying to get the status of a canceled operation, I get Bulk operation not found. Is that related to the token issue you are aware?
Also, I think I already mentioned this, but I think you should add a --query-file flag. Update: this is added by #6733

Summary
Adds a new
shopify app bulk cancelcommand to cancel running bulk operations, complementing the existingbulk executeandbulk statuscommands.Usage
Implementation Details
ID accepts both flag and positional argument
Status-aware result messaging
API version hardcoded
2026-01Should we add a
--watchflag to this?Testing
This should show.

Save the bulk operation id somewhere.
This should show.
This should show.