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

Provide AWS_REGION variable to cargohold #314

Merged
merged 2 commits into from
Jul 14, 2020

Conversation

mheinzel
Copy link
Contributor

See https://github.com/zinfra/backend-issues/issues/488

Now with cargohold using V4 signatures, the region is part of the Authorization header and needs to configured correctly. We already do that for the other services, so I just copied the code from there.

We do this for all the other servers, too, but I'm actually not sure
why. The integration tests themselves don't call AWS.

We should probably just remove it (+ from the other services)
Comment on lines +20 to +27
env:
# these dummy values are necessary for Amazonka's "Discover"
- name: AWS_ACCESS_KEY_ID
value: "dummy"
- name: AWS_SECRET_ACCESS_KEY
value: "dummy"
- name: AWS_REGION
value: "eu-west-1"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what we also do for the other services, but unless I'm missing something it is completely unnecessary?
The integration test binaries don't talk to AWS directly, so they should not need these variables.

We should probably remove them (from all integration pods, in a separate PR).

Copy link
Contributor

Choose a reason for hiding this comment

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

I cannot remember right now but... amazonka might complain/throw errors if they are not defined?

Copy link
Contributor Author

@mheinzel mheinzel Jul 14, 2020

Choose a reason for hiding this comment

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

But this pod only runs the cargohold-integration binary, right? And that doesn't depend on amazonka.

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 verified this locally for gundeck (from where I copied the config). I can run the binary without providing the environment variables.

Well, for now I'll merge this and then I can make a separate PR removing the config from all -integration pods.

Copy link
Contributor

Choose a reason for hiding this comment

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

cargohold-integration depends on cargohold lib which does have a dependency on amazonka. I can't tell for sure if it's a problem or not; it may be different for other services because brig-integration and galley-integration do talk directly to AWS (they check the queues)

@mheinzel mheinzel merged commit cc2d5c3 into develop Jul 14, 2020
@mheinzel mheinzel deleted the mheinzel/cargohold-aws-region branch July 14, 2020 09:24
@fisx fisx mentioned this pull request Jul 29, 2020
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.

2 participants