-
Notifications
You must be signed in to change notification settings - Fork 10
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
Implement "force" for UrlOperations.delete|upload()
#454
Comments
We might need to put a user of Either we make all uniform, or we make the behavior configurable, or at least queriable. Example: I am doing an Will it overwrite an existing resource silently, or fail. If the container is not-writable by default (but could be made writable), will it fail? Example: I am doing a If something is "protected", should an explicit |
TLDR;I would opt against a forced mode in order to keep the semantics and the set of possible errors of the individual operations simple. I am not sure, whether we should either let the semantics of the underlying platform determine whether an overwrite is possible, or generally implement on overwrite-protection. The latter might make some UrlOperations implementations less performant. In detail
I would generally opt for a uniform behavior with errors that allow a user to distinguish between causes, i.e.
I think if the upload fails, an explicit delete should be required to keep the API simple. Otherwise, we would introduce additional methods like
I think it might be better to let If we would on the other hand provide a force operation, and the user does not set So the options that provide themselves to the user are not too different in both cases. But if we allow a forced One other question that comes to mind is the potential necessity of different credentials for |
This sounds simple, but it not. For the usecase of an This means that a user needs to be given means to "disable the protection". This implies an extension of the Remove a key would then require something like the following algorithm to success (to be implemented by a user):
|
Maybe I don't understand all the modes of access to a ria-store or I am mistaken about the ORA-interface, but why would the key be in a write protected key directory? Do we envision git-annex to have direct access to the files that comprise the RIA-store? |
Here is a file tree and the permissions of the different elements from a random ria store I found on juseless:
I think the directories aren't write protected. But I believe git-annex has direct access to most of the files in the RIA store EDIT: I stand corrected, I found datalad/datalad#5668 where Benjamin says that git-annex shouldn't know about about the location of keys, at least for the previous implementation. But I am not sure if this still fits our development targets |
Waiting for #596 |
This is the companion issue for datalad/datalad-ria#103
We need to figure out if and how to deal with upload/delete requests where the associated user has all necessary permissions to successfully complete the operation -- but it would require additional steps (besides the actual upload), e.g. (temporarily) setting a parent directory.
In general, and depending on the protocol, uploads can already be more complex. For example, in some cases it might be desirable for uploads to happen in an atomic fashion (see datalad/datalad-ria#102), which would typically amount to an upload to a tmp location, plus a final rename/move to the actual upload target.
Yet another facet of this is "overwrite-protection". One can have expectations to fail instead of overwriting an existing resource, or to not do that. ATM this is not defined, documented, or uniformly implemented.
The text was updated successfully, but these errors were encountered: