-
Notifications
You must be signed in to change notification settings - Fork 19
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
ft: ZENKO-1019 delete scheduled resume #405
ft: ZENKO-1019 delete scheduled resume #405
Conversation
Hello philipyoo,My role is to assist you with the merge of this Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
@rachedbenmustapha This may be of interest to you. Did you already implement a cancel by sending an |
@alexanderchan-scality can you confirm that the immediate resume is using an empty object as a body placeholder already? |
032175d
to
d392585
Compare
@rachedbenmustapha Yes, the immediate resume/pause requests have empty bodies. As for @rahulreddy 's question about |
lib/api/BackbeatAPI.js
Outdated
@@ -736,6 +736,9 @@ class BackbeatAPI { | |||
} | |||
try { | |||
reqBody = JSON.parse(body); | |||
if (reqBody.cancel) { |
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.
If a user set this to 'false', wouldn't this skip?
In the documentation it says:
"Providing a POST request body object with a cancel
key with any value will remove any scheduled resumes for the given destination replication endpoint."
We probably shouldn't give users this much freedom of usage + interpretation.
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.
ah good catch! I think I'm going to change this so rather than any value, I expect user to send true
. Seems sort of weird to just accept any value from a ux perspective
docs/crr-pause-resume.md
Outdated
@@ -141,6 +142,20 @@ is resumed, it again resumes consuming entries from its last offset. | |||
} | |||
``` | |||
|
|||
Providing a POST request body object with a `cancel` key with any value |
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.
Looks like it has to be a truthy value, rather than any value.
d8b0b6f
to
d33c708
Compare
lib/api/BackbeatAPI.js
Outdated
if (reqBody.cancel !== true) { | ||
return { | ||
error: errors.MalformedPOSTrequest.customizeDescription( | ||
`${msg}: cancel key found with incorrect value`), |
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.
I think it would be worthwhile to include in the message that the cancel
property key must be true
.
d33c708
to
1f751dc
Compare
Sorry instead of cancel via POST, should be a DELETE request with no body |
It's good to be inline with the REST API semantics 💯 |
a04cea3
to
9d071e6
Compare
26aa43d
to
7294787
Compare
7294787
to
21d202d
Compare
Add a DELETE route to remove a schedule resume
Rename and reuse the http request helper method for use with both POST and DELETE requests
21d202d
to
3b90ad9
Compare
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a |
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue ZENKO-1019. Goodbye philipyoo. |
Looking to merge this for pre-GA build