-
Notifications
You must be signed in to change notification settings - Fork 544
Fix AWS Lambda tests #4199
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
Fix AWS Lambda tests #4199
Conversation
❌ 826 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
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.
Looking good, please see comment
@@ -73,7 +73,7 @@ def putrequest(self, method, url, *args, **kwargs): | |||
|
|||
client = sentry_sdk.get_client() | |||
if client.get_integration(StdlibIntegration) is None or is_sentry_url( | |||
client, host | |||
client, f"{host}:{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.
Can port
be None
? On line 85 we fill in the port in real_url
and there's a fallback to empty string: port != default_port and ":%s" % port or "",
so I'm wondering if that's there to handle the potential port = None
case
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.
Hm ok parsing it again I guess that's actually for the port == default_port
case.
And anyways this is only used in is_sentry_url
which doesn't seem to care. So probably just disregard.
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 think port is always there. I tried it with a normal Sentry DSN and then the port was 443
and it still worked. (because the check in is_sentry_url
is if dsn_url in given_url
.)
With the refactoring of the AWS Lambda test suite in
master
. We need to update the tests inpotel-base
to succeed again.This also fixes a check in the
stdlib
integration. With local AWS Lambda we have a DSN that includes a port. This did not work and this PR makes this work. (This will allow support for self hosted Sentry running on a specific port too)