Fix s3fs region access, s3 url styles #6679
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Two fixes for s3fs
withForceGlobalBucketAccessEnabled
to true, since we do not know in advance in which s3 region the relevant buckets will be stored.(Note that these examples need credentials, talk to us for testing)
Note on Implementation: The FileSystem itself now holds bucket information IF the bucket is in the base uri (as is the case in the first two examples above). When getPath is called on that fileSystem, the bucket is prepended to the path arguments.
Note that non-standard endpoints are no longer supported due to this change. The endpoint is now always s3.amazon.com (with default region us-east-1 but globalBucketAccess). We never encountered non-standard endpoints so far anyway and this case was not properly tested before either. When we encounter them, we can still try to re-add it without breaking this existing logic.
I did not clean up the s3fs java code. We could consider converting it to scala, rewriting it with our style, and remove the parts we do not use. However, I’d suggest we wait with this since there have been discussions about a new s3fs fork with active support, which may replace our package in the future.
Steps to test: