Skip to content
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

Add a basic support for parsing hosts from virtual private cloud #35

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

Drvi
Copy link
Member

@Drvi Drvi commented Jan 24, 2024

A very simple fix,we would ideally use something more robust to parse the input. Maybe we could see what the Java SDK does.

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (db6d637) 67.21% compared to head (4c002be) 67.81%.

Files Patch % Lines
src/aws.jl 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
+ Coverage   67.21%   67.81%   +0.59%     
==========================================
  Files           5        5              
  Lines         610      612       +2     
==========================================
+ Hits          410      415       +5     
+ Misses        200      197       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nickrobinson251
Copy link
Member

i took a look at the Java and Rust AWS SDKs and couldn't figure out where they were doing this kind of parsing, but a look at the test cases suggests that there are also "s3 control" URLs that are 8-parts long, like:

https://123456789012.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com

https://github.com/aws/aws-sdk-java-v2/blob/b85450fc77a6939abf734dcf01ddb90a8f277669/services/s3control/src/main/resources/codegen-resources/endpoint-tests.json#L1301
or

http://bucket-name.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com

https://github.com/awslabs/aws-sdk-rust/blob/3a73776042e02c0224546276246614884b2c50ab/sdk/s3/src/config/endpoint.rs#L5125

Do we need to handle those here too?

Copy link
Member

@quinnj quinnj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; do you know if there's anything similar for azure or GCP? (we don't need to do it here, but might be worth a quick search around)

@Drvi Drvi merged commit a8a8b15 into main Jan 24, 2024
4 of 6 checks passed
@Drvi Drvi deleted the td-basic-vpc branch January 24, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants