-
Notifications
You must be signed in to change notification settings - Fork 44
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
Delocalizing-files is not working if path ended with whitespace #259
Comments
Hi @faruqsandi ! Thank-you for reporting the problem you ran into. When you say "it is not working", can you clarify what you observe did happen? Was there a job failure? We have a test for recursive outputs that does include spaces. It doesn't include spaces at the end of the path, as your test case did, however I just tested this scenario and did get outputs. I would expect that you would observe outputs in your target directory if you double-quote your path (and include a trailing slash):
or you could use the extended wildcard support:
Please let us know what you find out. Thanks! |
Hello! Yes, I agree too to use warning. Because probably this error (a typo) will only happen once in blue moon. I also just realized that we can actually create a folder with trailing spaces *nix. For example So, while it is possible for bash to run a script that a path contains trailing whitespaces, probably it is not possible in GCP bucket. Anyway, I tried something that might be worth looking into.. Ok, Let me show you the success scenario with this whitespace_example.sh: touch example.txt
mv example.txt $OUTPUT_DIR using this
the output of
is
there is example.txt, which is what we expected. I believe, using this param (double quotes, no trailing whitespace)
will yield the same thing. Let's move to failed scenario using this
log says success:
However when I run this command to see what is in the OUTPUT_DIR:
the output is:
there is no
probably the clue is in the last line of that log. |
GCS does support whitespace in object paths. The issue here is actually with the test Rather than:
This should be:
Otherwise, the "mv" command becomes:
Instead of
and so when With the output directory quoted, I do see example.txt showing up in my bucket:
|
Oh, you are right! That makes sense. Thanks! I think it solved!
|
Hello.
I ran dsub with these parameters
Please mind that in the --output-recursive path ended with space. And of course it is not working.
It is user responsibility to ensure that user should not add extra white space after path when using quotes/double quotes, but I think, this little mistake too easy to miss. And this error is not visible until at delocalization stage, which is when you think you are done!
Probably, is it better if dsub to always trim leading and trailing whitespaces when the path using quotes/double quotes.
Thank you.
The text was updated successfully, but these errors were encountered: