-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Unify hostnames in returned URLs #7774
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
7756af7
to
bd97e9a
Compare
6e58a00
to
08982ed
Compare
08982ed
to
03d9fc3
Compare
03d9fc3
to
72abce8
Compare
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.
Looks great! Small things remaining which can be fixed super quickly and then it's a go from my side 🎉
Thanks @baermat, I've implemented your changes |
This brings along #7870
We need to listen on the HTTP port rather than the HTTPS port
if config.SQS_PORT_EXTERNAL: | ||
host_url = external_service_url("sqs") | ||
host_definition = localstack_host( | ||
use_hostname_external=True, custom_port=config.SQS_PORT_EXTERNAL | ||
) | ||
host_url = f"{get_protocol()}://{host_definition.host_and_port()}" |
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.
hey! i can see that SQS_PORT_EXTERNAL
is still in the control path here although we decided to boot it. can we just remove this?
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.
This PR is just matching existing behaviour. I'll get rid of it in a follow up PR targeting the v2
branch once this is merged 👍
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.
I mostly looked at the lambda parts, LGTM!
This PR centralises the way we decide what hostname is returned when requested by the resource.
This PR contains tests that ensure the current behaviour. This is important as I consider changing the way the user configures returned names to be a backwards incompatible change. In a future PR when v2 will be released, we will update the new url function to be systematic, based on the new configuration.