-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Remove blocking IO for static resources and refactor exception handling #8507
Remove blocking IO for static resources and refactor exception handling #8507
Conversation
…xception handling
5d70fcb
to
210d8f5
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8507 +/- ##
=======================================
Coverage 97.62% 97.63%
=======================================
Files 107 107
Lines 33262 33282 +20
Branches 3905 3908 +3
=======================================
+ Hits 32472 32494 +22
+ Misses 571 569 -2
Partials 219 219
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
7e86a47
to
213199d
Compare
Looks like this is ready for manual testing |
Testing this on production now |
Manual testing looks good. As soon as the coverage issue is addressed, I think this is good to go. |
Co-authored-by: J. Nick Koston <[email protected]>
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 @steverep
Ran fine in production overnight. |
Backport to 3.10: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply c9d09f1 on top of patchback/backports/3.10/c9d09f11d71e878984f7a528d414b059d4f4d9bd/pr-8507 Backporting merged PR #8507 into master
🤖 @patchback |
…ng (#8507) Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]> Co-authored-by: J. Nick Koston <[email protected]> (cherry picked from commit c9d09f1)
…urces and refactor exception handling (#8521) Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) Co-authored-by: J. Nick Koston <[email protected]> Co-authored-by: Steve Repsher <[email protected]>
What do these changes do?
Refactors the static resource handler to run all IO methods in an executor. Also revamps the exception handling to be less confusing and throw client exceptions only for known scenarios. The current handling clearly was designed prior to python 3.6, where
Path.resolve()
was called strictly - see #8182 (comment) for details.Are there changes in behavior for the user?
I doubt these would be noticed, but:
PermissionError
will now always lead to a 403 response (previously there was a mix of 403 and 404 depending on the scenario).Is it a substantial burden for the maintainers to support this?
No
Related issue number
Checklist
CONTRIBUTORS.txt
CHANGES/
foldername it
<issue_or_pr_num>.<type>.rst
(e.g.588.bugfix.rst
)if you don't have an issue number, change it to the pull request
number after creating the PR
.bugfix
: A bug fix for something the maintainers deemed animproper undesired behavior that got corrected to match
pre-agreed expectations.
.feature
: A new behavior, public APIs. That sort of stuff..deprecation
: A declaration of future API removals and breakingchanges in behavior.
.breaking
: When something public is removed in a breaking way.Could be deprecated in an earlier release.
.doc
: Notable updates to the documentation structure or buildprocess.
.packaging
: Notes for downstreams about unobvious side effectsand tooling. Changes in the test invocation considerations and
runtime assumptions.
.contrib
: Stuff that affects the contributor experience. e.g.Running tests, building the docs, setting up the development
environment.
.misc
: Changes that are hard to assign to any of the abovecategories.
Make sure to use full sentences with correct case and punctuation,
for example:
Use the past tense or the present tense a non-imperative mood,
referring to what's changed compared to the last released version
of this project.