-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Minor fixes in edge forwarder and zip utils for dev/host mode #6065
Conversation
@@ -32,7 +32,6 @@ def test_start_and_stop(self, monkeypatch): | |||
backend_port, | |||
update_listener=None, | |||
quiet=True, | |||
params={"protocol_version": "HTTP/1.0"}, |
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.
Value currently not being used/processed downstream, so this change does not change the logic itself.
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.
Thanks for the fix! Looks great and actually fixes the issue which would have been addressed with #6059. 🚀
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
Minor fixes for issues that surfaced during testing in local dev/host mode:
When using the HTTPS forwarding server on port 443 (using
EDGE_FORWARD_URL
), we need to forward the requests using the raw path of the HTTP request (otherwise request parsing fails downstream, e.g., for URL-encoded ARNs passed in request paths). Issue can be replicated, e.g., with this command (after starting LS in Pro host mode):awslocal kafka --endpoint-url https://localhost.localstack.cloud get-bootstrap-brokers --cluster-arn arn:aws:kafka:us-east-1:000000000000:cluster/test
. The existingget_raw_path(..)
http utility comes in handy here. Added a small test for it as well.Prefer using the native
unzip
command (if available) over the built-in Pythonzipfile
utils. Some versions of Node.js / Serverless are generating zip files with invalid/incorrect CRC codes (e.g., here) - the files extract fine withunzip
(potentially generating some warnings), but the unzipping fails with Python utils (empty files being created on disk). In future, we could think about introducing astrict
mode for theunzip
utils to enforce CRC codes, if needed.The changes above should not impact the current logic inside the Docker container (only relevant for host mode).
Additionally, the PR contains a few minor cleanups:
params
argument for thestart_proxy(..)
utility - resolves aTODO: not being used
commenttime.sleep(..)
calls in the tests