Hello, sorry to create a new thread, but I think t...
# ask-metaflow
f
Hello, sorry to create a new thread, but I think this is different than my previous timeout issue. I've noticed that when I use s3.get_many vs. s3.get with files that contain non-english characters in the file name (e.g. Japanese Kanji) I see a perpetual s3 transient error that doesn't resolve. I can confirm that the s3 file exists by doing an s3 ls command and seeing it exactly as I'm providing to the s3.get command. When I use s3.get("filename") it works fine. When I use s3.get_many(["filename"]) I see the following Transient S3 failure which doesn't resolve.
Copy code
Transient S3 failure (attempt #1) -- total success: 18, last attempt 18/20 -- remaining: 2
Transient S3 failure (attempt #2) -- total success: 18, last attempt 0/2 -- remaining: 2
Transient S3 failure (attempt #3) -- total success: 18, last attempt 0/2 -- remaining: 2
Transient S3 failure (attempt #4) -- total success: 18, last attempt 0/2 -- remaining: 2
a
@hundreds-rainbow-67050 can you take a look? @future-crowd-14830 can you try it out with a rather old version of metaflow - say 2.5.0 and see if you are still running into the same issue?
h
@future-crowd-14830 can you give an example filename?
and to be clear, it's only these non-english ones that are failing? or some of those 18 also have non-english chars?
f
Unfortunately the file names contain private data. I tried with Metaflow version 2.5.0 and the issue does not occur. The 18 are all english characters only in the filename, the 2 contain Japanese Kanji in the file name.
This may or may not be related, but some file names that contain other non-english characters get translated into percent encoding, and because the filenames get insanely long, this causes
"OSError: [Errno 36] File name too long:"
. Again this only happens when using s3.get_many. When using s3.get, it works without any problems.
h
i'm taking a look. meanwhile, can you try with this branch: https://github.com/Netflix/metaflow/pull/2616 it will show what the error is
f
Not sure if I did it correctly. I used:
uv add git+<https://github.com/Netflix/metaflow.git@npow/s3-log-original-error-code>
But I still don't see any detail, e.g. the output is still:
Copy code
Transient S3 failure (attempt #1) -- total success: 1, last attempt 1/2 -- remaining: 1
Transient S3 failure (attempt #2) -- total success: 1, last attempt 0/1 -- remaining: 1
Transient S3 failure (attempt #3) -- total success: 1, last attempt 0/1 -- remaining: 1
Transient S3 failure (attempt #4) -- total success: 1, last attempt 0/1 -- remaining: 1
Transient S3 failure (attempt #5) -- total success: 1, last attempt 0/1 -- remaining: 1
h
not sure about that command.. maybe you need to regenerate the lock?
i see how
"OSError: [Errno 36] File name too long:"
could be causing the retries
am about to fix that
f
Tried to use a blank new project,
uv pip install git+<https://github.com/Netflix/metaflow.git@npow/s3-log-original-error-code>
as well but still no further detail on the transient error, same output.
h
ok i reproduced the problem, the code isnt printed for download (only upload)
updated the branch with both fixes. can you try again?
f
Ahh seems like its fixed, both files were downloaded fine now.
🙌 1
Were the Japanese characters the same problem, e.g. when the filepath was getting generated it was too long in percent encoding?
Could there still be an issue if two filenames match pretty closely up to the 150 char limit?
h
no, that case is handled. first part of the filename is a unique hash that doesnt get truncated
> Were the Japanese characters the same problem, e.g. when the filepath was getting generated it was too long in percent encoding? yeah, it was causing the local path to be too long and triggering OSError, and we were retrying
f
Awesome, thank you very much!
Will this fix get included in an upcoming version?
h
will release once it's reviewed by @ancient-application-36103 @dry-beach-38304
👍 1
f
Hey @hundreds-rainbow-67050 Just following up to see if this fix is scheduled in a release yet.
h
sorry this one slipped through the cracks. followed up to get it reviewed
🙌 1
merged, will be in the next release this week
f
Thank you!