Skip to content

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.

3 participants