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
Initial attempt to serve PR builds at readthedocs.build
#6629
Conversation
This updates the logic so that we can serve docs from a URL that looks like this: http://test-builds--13.dev.readthedocs.build/en/13/ We will take the Project & Version from the domain, and then the rest of the URL will be parsed normally.
It's looking good!
I think this URL won't be needed anymore if we approve this changes:
readthedocs.org/readthedocs/proxito/urls.py
Lines 136 to 149 in 6aa76b8
# External versions | |
# (RTD_EXTERNAL_VERSION_DOMAIN/html/<project-slug>/<version-slug>/<filename>) | |
# NOTE: requires to be before single version | |
url( | |
( | |
r'^html/(?P<project_slug>{project_slug})/' | |
r'(?P<version_slug>{version_slug})/' | |
r'(?P<filename>{filename_slug})'.format( | |
**pattern_opts, | |
) | |
), | |
ServeDocs.as_view(version_type=EXTERNAL), | |
name='docs_detail_external_version', | |
), |
we are going to use a different domain for corporate, correct? |
I was able to review this more deeply. I like the approach taken here, although I'd like to polish this code a little more to follow the pattern we have and improve naming. This code is getting hard to follow because we need to have a lot of things in mind to understand it, so the simpler we can make it the better.
I made some suggestions to make it a little simpler, IMHO but I think it's pretty close to be ready.
I understand that the URL for production will be like Since we have the canonical project's slug in the host, having a lang in the path is also irrelevant --we won't have a URL like |
I pulled down the PR and it works properly locally. Although, I'm not sure why it's not required to add a |
Because nginx always has a default server, so it's just handling it properly when it gets hit. I've made it explicit here. |
Looks good to me when we figure it out why tests are failing.
This updates the logic so that we can serve docs from a URL that looks like this:
http://test-builds--13.dev.readthedocs.build/en/13/
We will take the Project & Version from the domain, and then the rest of the URL will be parsed normally.