-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Proxito middleware: reset to original urlconf after request #7137
Conversation
This also fixes a flaky test. We hit this before after proxito too https://github.com/readthedocs/readthedocs.org/blob/8ebded69160f495c56e2966da90bad3be2dc9f5f/readthedocs/core/middleware.py#L132-L136
Ok... it doesn't fail on my computer anymore, but it still fails on travis 🙃 |
# Reset URLconf for this thread | ||
# to the original one. |
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.
why not put the comment in just one line? 😄
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 just like short lines to have more space in my monitor 🤷♂️
@stsewd yea, the original test works for me locally, but fails on travis. Really not sure what's going on, but the request-based URLConf stuff is definitely buggy. |
@ericholscher tests should be passing now, to replicate locally I had to run the tests a lot of times till I got an error, then trying with/without my fix several times to see if failed or not... |
This also fixes a flaky test.
We hit this before proxito too
readthedocs.org/readthedocs/core/middleware.py
Lines 132 to 136 in 8ebded6