Conversation
There was a problem hiding this comment.
It looks like a breaking change. Instead of modifying filename field, we could add filenames field of type repeated string and on server side filename value will be used only if filenames field is empty.
There was a problem hiding this comment.
I looked into some options and I don't think there's a nice way of doing this for us. Technically, with current code (before the fix below) new-client-old-server scenario would just result in deletion of the last file, with the approach above its going to be first-file deleted only, so I implemented that for now.
That being said, we have no good way (without connecting that is) of knowing what version of SansShell server we're sending the request to, so we'll have to populate both of these fields at all times basically to ensure that both old and new versions work.
There was a problem hiding this comment.
Prop renaming also will cause non backward compatible changes of opa policy and could open backdoor to remove what actually should't be removed.
To avoid this lets avoid request shape changes, instead send several remove requests to remove single file/dir
There was a problem hiding this comment.
Prop renaming also will cause non backward compatible changes of opa policy and could open backdoor to remove what actually should't be removed.
To avoid this lets avoid request shape changes, instead send several remove requests to remove single file/dir
Changes
rmandrmdirto accept multiple args (absolute paths) and return a compound error for any dirs/files that failed to be deleted. Also add-rflag tormdirwhich deletes everything inside of directory, along with directory itself. Behaviour in general follows coreutilsrmwith-rflag.