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.
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.
I'm honestly not sure about default region, I think I would rather prefer to throw an exception when the region is not set. Is there anything that makes us-east-1 special enough to make it default?
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's just because it's the default region AWS applies.
IMHO I'd rather avoid merging any default configuration :)
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.
Same, can't say out of my head why it was implemented this way, I need to take another look later in the codebase but as far as I remember there was a reason. I will look into this later and get back to you
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.
Simple : S3 client needs an array with at least
region
andversion
set. If$contextOptions
does not provide it, it will throw an exception within aws-sdk. Maybe check those 2 keys right before instantiatingFilesystem
and throw a domain exception instead?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.
I was playing with it a bit and I think we can skip any defaults, when region or credentials are missing, S3 client will throw an exception which I think is good since it's S3 responsibility, not flow.
Could you remove those merges from both, S3 and Azure clients and in the meantime I'm gonna prepare some examples for the docs that would explain how to use them both?
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.
You got it. I'll take care of it tomorrow
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.
sounds good, examples should be available any moment: #1065
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.
@jguittard would you mind if I would take it over from here and adjust your PR so it can be merged?