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 loadoptions to configure BaseEndpoint #2837

Merged
merged 3 commits into from
Oct 15, 2024
Merged

Conversation

lucix-aws
Copy link
Contributor

@lucix-aws lucix-aws commented Oct 15, 2024

Adds in-code hook for configuring a global endpoint override in config loading.

Also adds an integration test that verifies the SEP-defined precedence of endpoint overrides with actual env and shared config in place.

Closes #2422
Related ekristen/aws-nuke#376

@lucix-aws lucix-aws requested a review from a team as a code owner October 15, 2024 18:20
@@ -0,0 +1,187 @@
package main
Copy link
Contributor

Choose a reason for hiding this comment

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

this package being main is tripping the integ tests

found packages s3 (api_test.go) and main (endpoint_url_test.go) in /codebuild/output/src1559507751/src/github.com/aws/aws-sdk-go-v2/service/internal/integrationtest/s3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also 100% did not apply the integration test flag so that needs fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@lucix-aws
Copy link
Contributor Author

I didn't prefix the new test with TestInteg_ either... so it wasn't actually running. Fixed again.

"AWS_ENDPOINT_URL_S3": "https://service-env.com",
},
SharedConfig: `
[default]
Copy link
Contributor

Choose a reason for hiding this comment

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

thought, non blocking: I understand why multi-line strings are like this, but boy are they not pretty to read

s3 =
endpoint_url = https://service-cfg.com
`,
Expect: "https://service-cfg.com",
Copy link
Contributor

Choose a reason for hiding this comment

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

love the urls <3

Copy link
Contributor

Choose a reason for hiding this comment

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

excellent url naming

@lucix-aws lucix-aws merged commit 3cc4661 into main Oct 15, 2024
13 checks passed
@lucix-aws lucix-aws deleted the feat-configbaseendpoint branch October 15, 2024 20:52
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.

Allow setting BaseEndpoint on config.LoadOptions
3 participants