-
Notifications
You must be signed in to change notification settings - Fork 18
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
Bunch of tiny fixes for macos #790
Conversation
@@ -222,7 +222,7 @@ def upload_via_http_gate_curl( | |||
large_object = is_object_large(filepath) | |||
if large_object: | |||
# pre-clean | |||
_cmd_run("rm pipe -f") | |||
_cmd_run("rm pipe -f || true") |
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.
dangerous
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.
Maybe we can make something more darwin-specific here?
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.
why is it dangerous? we just ignore the RC here, if something is not ok, we will fail on the next command. I'm not sure it is worth it to adapt the code to macos here, since the problem is only in the rm -f
returning non zero RC on macos if there is nothing to remove. But if we want, I can try to get rid of pipes here at all
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 can fail for some other reason and you won't notice. At least if the problem doesn't affect the next command. But you're right in that mkfifo
is the main thing here, if it works then we don't care much about rm
. Does it all happen in tmp directory?
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.
Nope, it happens in the current working directory.
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.
That's worse. Maybe we can feed curl
in some other way then or use some pythonic library instead of curl. This named pipe trick came from the HTTP gateway documentation. There CLI tooling only was used, so there were not a lot of choices. But in a test it seems kludgy, this pipe can be left in FS if something goes wrong.
Signed-off-by: Evgeniy Zayats <[email protected]>
Signed-off-by: Evgeniy Zayats <[email protected]>
Signed-off-by: Evgeniy Zayats <[email protected]>
Signed-off-by: Evgeniy Zayats <[email protected]>
b7c4331
to
c848ad8
Compare
No description provided.