Skip to content

Add proxy support to specific AWS BPs. #53

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

oysterbank
Copy link
Contributor

@oysterbank oysterbank commented Feb 5, 2020

Development Prerequisites

Summary of Proposed Changes

  • Add proxy support to specific AWS BPs.

Copy link
Contributor

@gsimore gsimore left a comment

Choose a reason for hiding this comment

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

Nice improvements! Mostly looks good, I just have one suggestion

rh = env.resource_handler.cast()
return boto3.client(
wrapper = rh.get_api_wrapper()
return wrapper.get_boto3_client(
Copy link
Contributor

@gsimore gsimore Feb 6, 2020

Choose a reason for hiding this comment

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

It's generally better to separate out return and a function call, doing both on the same line is too many things happening at once, which means if an exception occurs, then the traceback will point to this line and trying to debug would be harder. So I think this should change to:

client = wrapper.get_boto3_client( ...)
return client

rh = env.resource_handler.cast()
return boto3.client(
wrapper = rh.get_api_wrapper()
return wrapper.get_boto3_client(
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here as above.

Explicit is better than implicit.

[DEV-14551]
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