-
Notifications
You must be signed in to change notification settings - Fork 113
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
Preconditionfailed vs aborted #3003
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
butonic
requested review from
a team,
labkode,
ishank011 and
glpatcern
as code owners
June 23, 2022 11:51
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
butonic
force-pushed
the
preconditionfailed-vs-aborted
branch
2 times, most recently
from
June 23, 2022 13:59
2dac9d1
to
9fda17b
Compare
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
C0rby
approved these changes
Jun 23, 2022
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 good. 👍
This was referenced Aug 17, 2022
wkloucek
added a commit
that referenced
this pull request
Aug 18, 2022
* revert some locking status codes back to precondition failed, see also #3003 and owncloud/ocis#4366 * fix unit tests * fix locking response codes in ocdav * fix refresh lock unit test
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Webdav distinguishes between 412 precondition failed for if match errors for locks or etags, uses 405 Method Not Allowed when trying to MKCOL an already existing collection and 409 Conflict when intermediate collections are missing.
The CS3 GRPC status codes are modeled after https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto. When trying to use the error codes to distinguish these cases on a storageprovider CreateDir call we can map ALREADY_EXISTS to 405, FAILED_PRECONDITION to 409 and ABORTED to 412.
Unfortunately, we currently use and map FAILED_PRECONDITION to 412. I assume because the naming is very similar to PreconditionFailed. However the GRPC docs are very clear that ABORTED should be used, specifically mentioning etags and locks.
With this PR we internally clean up the usage in the decompesedfs and mapping in the ocdav handler.