-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Update remaining usages of LOCALHOST_HOSTNAME #9578
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More explicit, clearer, and easier 💯 LGTM 🚀
(the major change is a bit sneaky in the usage update PR ;)
@@ -603,16 +603,6 @@ def populate_edge_configuration( | |||
localstack_host_raw = environment.get("LOCALSTACK_HOST") | |||
gateway_listen_raw = environment.get("GATEWAY_LISTEN") | |||
|
|||
# new for v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to see this complexity go and keep LOCALSTACK_HOST
purely cosmetic ✨
also localstack_host_port
was confusing to follow
We have not advertised this shortcut anywhere. So let's hope this breaking change goes smooth 🤞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be interesting to know why we added it in the first place but I guess that remains unknown 🪄
# * ip only | ||
# * host and ip | ||
# and there are two variables so 16 total tests | ||
@pytest.mark.parametrize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lovely thorough test coverage 💯
We do lose the human-readable names but that's worth the full coverage (at least for len(gateway_listen) == 1) ⚖️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would also simplify removing EDGE_PORT
from populate_edge_configuration
if we wish to do so later 👍
I've put in the PR description, so it's fine right?! 🤷 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! Test cases look good as well, i think it's quite clear what's going on.
Motivation
Some usages of
LOCALHOST_HOSTNAME
were missed during the migration toLOCALSTACK_HOST
. This PR addresses that.Note: usages of returning
LOCALHOST_HOSTNAME
are changed, not internal usages ofLOCALHOST_HOSTNAME
to return tolocalhost
. This is important, becauseLOCALSTACK_HOST
is a "cosmetic" variable, and as such should not be used as a value to reachlocalhost
.Changes
LOCALHOST_HOSTNAME
to useLOCALSTACK_HOST
.LOCALSTACK_HOST
no longer configures the edge port ifGATEWAY_LISTEN
is not specified