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

retrieve envfiles from s3 concurrently using go routines #2392

Merged
merged 1 commit into from
Mar 12, 2020

Conversation

jy19
Copy link
Contributor

@jy19 jy19 commented Mar 11, 2020

Summary

This pull request updates how we retrieve envfiles from s3.

Implementation details

Each envfile specified will spin up a go routine so that multiple env files can be retrieved in parallel

Testing

New tests cover the changes: no
make test is successful. Yunhee will add a benchmark into test plan.

Description for the changelog

N/A

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

}

return nil
}

func (envfile *EnvironmentFileResource) downloadEnvfileFromS3(envFilePath string, iamCredentials credentials.IAMRoleCredentials) error {
func (envfile *EnvironmentFileResource) downloadEnvfileFromS3(envFilePath string, iamCredentials credentials.IAMRoleCredentials,
Copy link
Contributor

Choose a reason for hiding this comment

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

in error cases, should we log the task id/arn or does it get logged in the method that calls this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the full s3 arn should get logged. should we also log the task arn?

Copy link
Contributor

Choose a reason for hiding this comment

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

s3 arn doesn't provide any identifying info about for which task the env file download was attempted so yeah i think we should add it.

@jy19 jy19 merged commit 8b5769a into aws:env_files Mar 12, 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.

3 participants