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

support AWS_ENDPOINT_URL configuration #177

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

sdelano
Copy link
Contributor

@sdelano sdelano commented Oct 19, 2023

the AWS SDK and CLI (currently only in Python) allows for configuration of the AWS endpoint URL via the AWS_ENDPOINT_URL environment variable 1.

the Golang AWS SDK does not currently support this, but according to GitHub issues, parity is on the way 2.

this change allows for a temporary workaround (it took two years for this support to make it to the Python SDK 3) that allows vals to pick up the AWS_ENDPOINT_URL environment variable and configure the session accordingly.

this allows for testing with non-AWS infrastructure like Localstack and Moto, and could even open the door for more comprehensive integration tests of the AWS functionality in this project without the need for using real AWS infrastructure.

the AWS SDK and CLI (currently only in Python) allows for
configuration of the AWS endpoint URL via the `AWS_ENDPOINT_URL`
environment variable [1].

the Golang AWS SDK does not currently support this, but according to
GitHub issues, parity is on the way [2].

this change allows for a temporary workaround (it took two years for
this support to make it to the Python SDK [3]) that allows `vals` to
pick up the `AWS_ENDPOINT_URL` environment variable and configure the
session accordingly.

this allows for testing with non-AWS infrastructure like Localstack
and Moto, and could even open the door for more comprehensive
integration tests of the AWS functionality in this project without the
need for using real AWS infrastructure.

[1]: https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html
[2]: aws/aws-sdk-go#4942
[3]: boto/boto3#2746

Signed-off-by: Stephen Delano <[email protected]>
@sdelano sdelano force-pushed the sdelano/support-aws-endpoint-url branch from 8d3d6cb to ba42146 Compare October 19, 2023 14:31
@sdelano
Copy link
Contributor Author

sdelano commented Oct 19, 2023

For the maintainers: I'd love to have a test for this, but it's been a while since I've written any meaningful amount of Go code and I couldn't find a great spot to slot a test into the existing tests. I also couldn't get the tests to run successfully and they were making outbound AWS calls using my AWS credentials.

Any pointers to adding a relevant test here would be great.

Thanks!

@yxxhero
Copy link
Member

yxxhero commented Oct 23, 2023

@sdelano sorry for the delayed review. please fix the lint error.

Copy link
Collaborator

@mumoshu mumoshu left a comment

Choose a reason for hiding this comment

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

@yxxhero Seems like the lint error is unrelated to this change. Let me merge anyway!

@sdelano Thank you for your contribution ☺️

@mumoshu mumoshu merged commit 3abfd38 into helmfile:main Dec 1, 2023
2 of 3 checks passed
@sdelano
Copy link
Contributor Author

sdelano commented Dec 1, 2023

Right on, thanks everyone! Sorry I didn't come back to this sooner! I looked at the failure and thought "I have no idea how I made that fail" and then promptly filed it away as something to get back to later.

@yxxhero
Copy link
Member

yxxhero commented Dec 1, 2023

@mumoshu great to see you.

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