-
Notifications
You must be signed in to change notification settings - Fork 515
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(starlette): Fix failed_request_status_codes=[]
#3561
Merged
szokeasaurusrex
merged 2 commits into
master
from
szokeasaurusrex/fix-failed_request_status_codes
Sep 24, 2024
Merged
fix(starlette): Fix failed_request_status_codes=[]
#3561
szokeasaurusrex
merged 2 commits into
master
from
szokeasaurusrex/fix-failed_request_status_codes
Sep 24, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #3561 +/- ##
=======================================
Coverage 84.30% 84.31%
=======================================
Files 133 133
Lines 13890 13890
Branches 2930 2930
=======================================
+ Hits 11710 11711 +1
- Misses 1440 1442 +2
+ Partials 740 737 -3
|
szokeasaurusrex
force-pushed
the
szokeasaurusrex/remove-invalid-tests
branch
from
September 24, 2024 11:28
8402895
to
2afe13a
Compare
…3560) The Starlette integration tests (as well as the FastAPI integration tests, which hit the same code path as the Starlette integration) include a test where the integrations' `failed_request_status_codes` parameter is set to `[None]`. However, since the parameter is typed as `Optional[list[HttpStatusCodeRange]]`, where `HttpStatusCodeRange = Union[int, Container[int]]`, passing `[None]` for this parameter should not be allowed, per the type hint. Thus, we should not test this input, since the behavior of passing `[None]` is not, and should not be, defined by the API.
szokeasaurusrex
force-pushed
the
szokeasaurusrex/remove-invalid-tests
branch
from
September 24, 2024 11:31
2afe13a
to
ccdbffb
Compare
szokeasaurusrex
added a commit
that referenced
this pull request
Sep 24, 2024
Passing an empty list for `failed_request_status_codes` should result in no status codes resulting in a Sentry error. However, right now, setting `failed_request_status_codes=[]` instead yields the default `failed_request_status_codes` of `range(500, 599)`. This change fixes the incorrect behavior and adds tests to verify the fix.
szokeasaurusrex
force-pushed
the
szokeasaurusrex/fix-failed_request_status_codes
branch
from
September 24, 2024 11:31
ef76732
to
7ddada4
Compare
Passing an empty list for `failed_request_status_codes` should result in no status codes resulting in a Sentry error. However, right now, setting `failed_request_status_codes=[]` instead yields the default `failed_request_status_codes` of `range(500, 599)`. This change fixes the incorrect behavior and adds tests to verify the fix.
szokeasaurusrex
force-pushed
the
szokeasaurusrex/fix-failed_request_status_codes
branch
from
September 24, 2024 11:39
7ddada4
to
09c6f2a
Compare
sentrivana
approved these changes
Sep 24, 2024
szokeasaurusrex
changed the base branch from
szokeasaurusrex/remove-invalid-tests
to
master
September 24, 2024 12:12
szokeasaurusrex
force-pushed
the
szokeasaurusrex/fix-failed_request_status_codes
branch
from
September 24, 2024 12:13
2352b53
to
09c6f2a
Compare
szokeasaurusrex
deleted the
szokeasaurusrex/fix-failed_request_status_codes
branch
September 24, 2024 12:24
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Passing an empty list for
failed_request_status_codes
should result in no status codes resulting in a Sentry error. However, right now, settingfailed_request_status_codes=[]
instead yields the defaultfailed_request_status_codes
ofrange(500, 599)
. This change fixes the incorrect behavior and adds tests to verify the fix.Depends on #3560