Skip to content

Commit d01089f

Browse files
committed
Merge branch 'master' into humitos/django-upgrade-2.2
2 parents f19476f + 3f6abb5 commit d01089f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+964
-336
lines changed

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
env: TOXENV=py36,codecov ES_VERSION=6.2.4 ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
1010
- python: 3.6
1111
env: TOXENV=docs
12+
- python: 3.6
13+
env: TOXENV=docs-linkcheck
1214
- python: 3.6
1315
env: TOXENV=docs-lint
1416
- python: 3.6
@@ -18,6 +20,9 @@ jobs:
1820
env: TOXENV=eslint NODE_VERSION=10.17.0
1921
- python: 3.6
2022
env: TOXENV=migrations
23+
24+
allow_failures:
25+
- env: TOXENV=docs-linkcheck
2126
cache:
2227
directories:
2328
- ~/.cache/pip

CHANGELOG.rst

+95-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,97 @@
1+
Version 3.12.0
2+
--------------
3+
4+
:Date: February 18, 2020
5+
6+
This version has two major changes:
7+
8+
* It updates our default docker images to stable=5.0 and latest=6.0.
9+
* It changes our PR builder domain to `readthedocs.build`
10+
11+
* `@humitos <https://github.com/humitos>`__: Use PUBLIC_DOMAIN_USES_HTTPS for resolver tests (`#6673 <https://github.com/readthedocs/readthedocs.org/pull/6673>`__)
12+
* `@stsewd <https://github.com/stsewd>`__: Always run CoreTagsTests with http (`#6671 <https://github.com/readthedocs/readthedocs.org/pull/6671>`__)
13+
* `@ericholscher <https://github.com/ericholscher>`__: Remove old docker settings (`#6670 <https://github.com/readthedocs/readthedocs.org/pull/6670>`__)
14+
* `@stsewd <https://github.com/stsewd>`__: Update gitpython and django (`#6667 <https://github.com/readthedocs/readthedocs.org/pull/6667>`__)
15+
* `@humitos <https://github.com/humitos>`__: New docker release (6.0 and testing) (`#6654 <https://github.com/readthedocs/readthedocs.org/pull/6654>`__)
16+
* `@humitos <https://github.com/humitos>`__: Default python version per Docker image (`#6653 <https://github.com/readthedocs/readthedocs.org/pull/6653>`__)
17+
* `@stsewd <https://github.com/stsewd>`__: Add pytest-custom_exit_code (`#6648 <https://github.com/readthedocs/readthedocs.org/pull/6648>`__)
18+
* `@ericholscher <https://github.com/ericholscher>`__: Initial attempt to serve PR builds at `readthedocs.build` (`#6629 <https://github.com/readthedocs/readthedocs.org/pull/6629>`__)
19+
* `@ericholscher <https://github.com/ericholscher>`__: Remove re-authing of users on downloads. (`#6619 <https://github.com/readthedocs/readthedocs.org/pull/6619>`__)
20+
* `@stsewd <https://github.com/stsewd>`__: Don't trigger a sync twice on creation/deletion for GitHub (`#6614 <https://github.com/readthedocs/readthedocs.org/pull/6614>`__)
21+
* `@s-weigand <https://github.com/s-weigand>`__: Add linkcheck test for the docs (`#6543 <https://github.com/readthedocs/readthedocs.org/pull/6543>`__)
22+
23+
Version 3.11.6
24+
--------------
25+
26+
:Date: February 04, 2020
27+
28+
* `@ericholscher <https://github.com/ericholscher>`__: Note we aren't doing GSOC in 2020 (`#6618 <https://github.com/readthedocs/readthedocs.org/pull/6618>`__)
29+
* `@ericholscher <https://github.com/ericholscher>`__: only serve x-rtd-slug project if it exists (`#6617 <https://github.com/readthedocs/readthedocs.org/pull/6617>`__)
30+
* `@ericholscher <https://github.com/ericholscher>`__: Add check for a single_version project having a version_slug for PR builds (`#6615 <https://github.com/readthedocs/readthedocs.org/pull/6615>`__)
31+
* `@stsewd <https://github.com/stsewd>`__: Fix linter (`#6613 <https://github.com/readthedocs/readthedocs.org/pull/6613>`__)
32+
* `@stsewd <https://github.com/stsewd>`__: Create unique container per sync (`#6612 <https://github.com/readthedocs/readthedocs.org/pull/6612>`__)
33+
* `@stsewd <https://github.com/stsewd>`__: Check for None before assignment (`#6611 <https://github.com/readthedocs/readthedocs.org/pull/6611>`__)
34+
* `@ericholscher <https://github.com/ericholscher>`__: Raise exception when we get an InfiniteRedirect (`#6609 <https://github.com/readthedocs/readthedocs.org/pull/6609>`__)
35+
* `@ericholscher <https://github.com/ericholscher>`__: Release 3.11.5 (`#6608 <https://github.com/readthedocs/readthedocs.org/pull/6608>`__)
36+
* `@humitos <https://github.com/humitos>`__: Avoid infinite redirect on El Proxito on 404 (`#6606 <https://github.com/readthedocs/readthedocs.org/pull/6606>`__)
37+
* `@stsewd <https://github.com/stsewd>`__: Don't error when killing/removing non-existent cotainer (`#6605 <https://github.com/readthedocs/readthedocs.org/pull/6605>`__)
38+
* `@humitos <https://github.com/humitos>`__: Use proper path to download/install readthedocs-ext (`#6603 <https://github.com/readthedocs/readthedocs.org/pull/6603>`__)
39+
* `@humitos <https://github.com/humitos>`__: Use timeout on internal API calls (`#6602 <https://github.com/readthedocs/readthedocs.org/pull/6602>`__)
40+
* `@stsewd <https://github.com/stsewd>`__: Don't assume build isn't None in a docker build env (`#6599 <https://github.com/readthedocs/readthedocs.org/pull/6599>`__)
41+
* `@ericholscher <https://github.com/ericholscher>`__: Fix issue with pip 20.0 breaking on install (`#6598 <https://github.com/readthedocs/readthedocs.org/pull/6598>`__)
42+
* `@stsewd <https://github.com/stsewd>`__: More protection against None (`#6597 <https://github.com/readthedocs/readthedocs.org/pull/6597>`__)
43+
* `@agjohnson <https://github.com/agjohnson>`__: Revert "Update celery requirements to its latest version" (`#6596 <https://github.com/readthedocs/readthedocs.org/pull/6596>`__)
44+
* `@Blackcipher101 <https://github.com/Blackcipher101>`__: Changed documentation of Api v3 (`#6574 <https://github.com/readthedocs/readthedocs.org/pull/6574>`__)
45+
* `@ericholscher <https://github.com/ericholscher>`__: Use our standard auth mixin for proxito downloads (`#6572 <https://github.com/readthedocs/readthedocs.org/pull/6572>`__)
46+
* `@humitos <https://github.com/humitos>`__: Move common docker compose configs to common repository (`#6539 <https://github.com/readthedocs/readthedocs.org/pull/6539>`__)
47+
48+
Version 3.11.5
49+
--------------
50+
51+
:Date: January 29, 2020
52+
53+
* `@humitos <https://github.com/humitos>`__: Avoid infinite redirect on El Proxito on 404 (`#6606 <https://github.com/readthedocs/readthedocs.org/pull/6606>`__)
54+
* `@humitos <https://github.com/humitos>`__: Use proper path to download/install readthedocs-ext (`#6603 <https://github.com/readthedocs/readthedocs.org/pull/6603>`__)
55+
* `@stsewd <https://github.com/stsewd>`__: Don't assume build isn't None in a docker build env (`#6599 <https://github.com/readthedocs/readthedocs.org/pull/6599>`__)
56+
* `@ericholscher <https://github.com/ericholscher>`__: Fix issue with pip 20.0 breaking on install (`#6598 <https://github.com/readthedocs/readthedocs.org/pull/6598>`__)
57+
* `@agjohnson <https://github.com/agjohnson>`__: Revert "Update celery requirements to its latest version" (`#6596 <https://github.com/readthedocs/readthedocs.org/pull/6596>`__)
58+
* `@stsewd <https://github.com/stsewd>`__: Remove .cache from parent dir (`#6595 <https://github.com/readthedocs/readthedocs.org/pull/6595>`__)
59+
* `@agjohnson <https://github.com/agjohnson>`__: Release 3.11.4 again (`#6594 <https://github.com/readthedocs/readthedocs.org/pull/6594>`__)
60+
* `@agjohnson <https://github.com/agjohnson>`__: Release 3.11.4 (`#6593 <https://github.com/readthedocs/readthedocs.org/pull/6593>`__)
61+
* `@ericholscher <https://github.com/ericholscher>`__: Use our standard auth mixin for proxito downloads (`#6572 <https://github.com/readthedocs/readthedocs.org/pull/6572>`__)
62+
* `@stsewd <https://github.com/stsewd>`__: Migrate doctype from project to version (`#6523 <https://github.com/readthedocs/readthedocs.org/pull/6523>`__)
63+
64+
Version 3.11.4
65+
--------------
66+
67+
:Date: January 28, 2020
68+
69+
* `@humitos <http://github.com/humitos>`__: Disable django debug toolbar in El Proxito (`#6591 <https://github.com/readthedocs/readthedocs.org/pull/6591>`__)
70+
* `@stsewd <http://github.com/stsewd>`__: Respect docker setting on repo sync (`#6589 <https://github.com/readthedocs/readthedocs.org/pull/6589>`__)
71+
* `@humitos <http://github.com/humitos>`__: Merge pull request #6588 from readthedocs/humitos/support-ext (`#6588 <https://github.com/readthedocs/readthedocs.org/pull/6588>`__)
72+
* `@humitos <http://github.com/humitos>`__: Fix argument of `update_repos` (`#6583 <https://github.com/readthedocs/readthedocs.org/pull/6583>`__)
73+
* `@humitos <http://github.com/humitos>`__: Mount proper shared docker volume (`#6581 <https://github.com/readthedocs/readthedocs.org/pull/6581>`__)
74+
* `@ericholscher <http://github.com/ericholscher>`__: Use our standard auth mixin for proxito downloads (`#6572 <https://github.com/readthedocs/readthedocs.org/pull/6572>`__)
75+
* `@stsewd <http://github.com/stsewd>`__: Delete .cache dir on wipe (`#6571 <https://github.com/readthedocs/readthedocs.org/pull/6571>`__)
76+
* `@humitos <http://github.com/humitos>`__: Run old redirect tests via El Proxito (`#6570 <https://github.com/readthedocs/readthedocs.org/pull/6570>`__)
77+
* `@humitos <http://github.com/humitos>`__: Remove 'build environment' from guides (`#6568 <https://github.com/readthedocs/readthedocs.org/pull/6568>`__)
78+
* `@ericholscher <http://github.com/ericholscher>`__: Fix /en/latest redirects (`#6564 <https://github.com/readthedocs/readthedocs.org/pull/6564>`__)
79+
* `@stsewd <http://github.com/stsewd>`__: Merge pull request #6561 from stsewd/move-method (`#6561 <https://github.com/readthedocs/readthedocs.org/pull/6561>`__)
80+
* `@stsewd <http://github.com/stsewd>`__: Use settings override in footer (`#6560 <https://github.com/readthedocs/readthedocs.org/pull/6560>`__)
81+
* `@ericholscher <http://github.com/ericholscher>`__: Fix proxito redirects breaking without a / (`#6558 <https://github.com/readthedocs/readthedocs.org/pull/6558>`__)
82+
* `@stsewd <http://github.com/stsewd>`__: Remove unused file (`#6557 <https://github.com/readthedocs/readthedocs.org/pull/6557>`__)
83+
* `@mgeier <http://github.com/mgeier>`__: DOC: Change a lot of http links to https (`#6553 <https://github.com/readthedocs/readthedocs.org/pull/6553>`__)
84+
* `@stsewd <http://github.com/stsewd>`__: Don't use an instance of VCS when isn't needed (`#6548 <https://github.com/readthedocs/readthedocs.org/pull/6548>`__)
85+
* `@saadmk11 <http://github.com/saadmk11>`__: Add GitHub OAuth App Permission issue to PR Builder Troubleshooting docs (`#6547 <https://github.com/readthedocs/readthedocs.org/pull/6547>`__)
86+
* `@humitos <http://github.com/humitos>`__: Move common docker compose configs to common repository (`#6539 <https://github.com/readthedocs/readthedocs.org/pull/6539>`__)
87+
* `@preetmishra <http://github.com/preetmishra>`__: Update Transifex Integration details in Internationalization page. (`#6531 <https://github.com/readthedocs/readthedocs.org/pull/6531>`__)
88+
* `@stsewd <http://github.com/stsewd>`__: Migrate doctype from project to version (`#6523 <https://github.com/readthedocs/readthedocs.org/pull/6523>`__)
89+
* `@stsewd <http://github.com/stsewd>`__: Simplify docker image (`#6519 <https://github.com/readthedocs/readthedocs.org/pull/6519>`__)
90+
* `@Parth1811 <http://github.com/Parth1811>`__: Fixes #5388 -- Added Documentation for constraint while using Conda (`#6509 <https://github.com/readthedocs/readthedocs.org/pull/6509>`__)
91+
* `@stsewd <http://github.com/stsewd>`__: Improve test for sync_repo (`#6504 <https://github.com/readthedocs/readthedocs.org/pull/6504>`__)
92+
* `@humitos <http://github.com/humitos>`__: Show debug toolbar when running docker compose (`#6488 <https://github.com/readthedocs/readthedocs.org/pull/6488>`__)
93+
* `@dibyaaaaax <http://github.com/dibyaaaaax>`__: Add python examples for API v3 Documentation (`#6487 <https://github.com/readthedocs/readthedocs.org/pull/6487>`__)
94+
195
Version 3.11.3
296
--------------
397

@@ -846,7 +940,7 @@ Version 3.2.2
846940
* `@pyup-bot <https://github.com/pyup-bot>`__: Pin pytest-cov to latest version 2.6.1 (`#5276 <https://github.com/readthedocs/readthedocs.org/pull/5276>`__)
847941
* `@pyup-bot <https://github.com/pyup-bot>`__: Pin pillow to latest version 5.4.1 (`#5275 <https://github.com/readthedocs/readthedocs.org/pull/5275>`__)
848942
* `@pyup-bot <https://github.com/pyup-bot>`__: Update elasticsearch to 6.3.1 (`#5274 <https://github.com/readthedocs/readthedocs.org/pull/5274>`__)
849-
* `@discdiver <https://github.com/discdiver>`__: clarify github integration needs https:// prepended (`#5273 <https://github.com/readthedocs/readthedocs.org/pull/5273>`__)
943+
* `@discdiver <https://github.com/discdiver>`__: clarify github integration needs ``https://`` prepended (`#5273 <https://github.com/readthedocs/readthedocs.org/pull/5273>`__)
850944
* `@humitos <https://github.com/humitos>`__: Setup and configure pyup.io (`#5272 <https://github.com/readthedocs/readthedocs.org/pull/5272>`__)
851945
* `@humitos <https://github.com/humitos>`__: Update all Python dependencies (`#5269 <https://github.com/readthedocs/readthedocs.org/pull/5269>`__)
852946
* `@davidfischer <https://github.com/davidfischer>`__: Add note about security issue (`#5263 <https://github.com/readthedocs/readthedocs.org/pull/5263>`__)

docker-compose.override.yml

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ services:
4646
- ${PWD}/dockerfiles/settings/web.py:/usr/src/app/checkouts/readthedocs.org/readthedocs/settings/web.py
4747
environment:
4848
- DJANGO_SETTINGS_MODULE=readthedocs.settings.web
49+
- HOSTIP=${HOSTIP:-}
4950
extra_hosts:
5051
- "community.dev.readthedocs.io:10.10.0.100"
5152

dockerfiles/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,17 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
3434

3535
RUN pip3 install --no-cache-dir --upgrade pip
3636

37+
# Ensure that ``python`` is in the PATH so that ``./manage.py`` works
38+
RUN ln -s /usr/bin/python3 /usr/bin/python
39+
3740
WORKDIR /tmp
3841

3942
RUN curl -O https://raw.githubusercontent.com/readthedocs/readthedocs.org/master/requirements/pip.txt
4043
RUN curl -O https://raw.githubusercontent.com/readthedocs/readthedocs.org/master/requirements/docker.txt
4144
RUN pip3 install --no-cache-dir -r docker.txt
4245

4346
# Install readthedocs-ext only if GITHUB_TOKEN is provided
47+
WORKDIR /usr/src/app/checkouts/
4448
RUN if [ -n "$GITHUB_TOKEN" ] ; \
4549
then \
4650
git clone --depth 1 https://${GITHUB_TOKEN}@github.com/readthedocs/readthedocs-ext ; \

dockerfiles/nginx/proxito.conf

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
# Proxito
22
server {
3-
listen 80;
4-
server_name *.community.dev.readthedocs.io;
3+
listen 80 default_server;
4+
server_name *.community.dev.readthedocs.io *.org.dev.readthedocs.build;
55

66
# TODO: serve the favicon.ico from the project/version itself instead
77
location /favicon.ico {
88
proxy_pass http://storage:10000/devstoreaccount1/static/images/favicon.ico;
99
break;
1010
}
1111

12+
# Redirect old URLs to our new domain
13+
# external-builds.readthedocs.io/<type>/<slug>/<pr-number>/
14+
location ~* ^/html/(?P<project>.+)/(?P<version>.+)/(?P<path>.*) {
15+
add_header X-Served Nginx-External-Redirect always;
16+
rewrite ^ http://$project--$version.org.dev.readthedocs.build/page/$path;
17+
}
18+
1219
# Proxito doc serving
1320
location / {
1421
proxy_pass http://proxito:8000;
@@ -29,10 +36,12 @@ server {
2936
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
3037
proxy_set_header X-Forwarded-Host $host;
3138

39+
3240
proxy_intercept_errors on;
3341
error_page 404 = @notfoundfallback;
3442

3543
add_header X-Served Nginx-Proxito-Sendfile always;
44+
add_header X-RTD-Project $upstream_http_x_rtd_project always;
3645
}
3746

3847
# Serve 404 pages here

docs/api/v3.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ Version detail
424424
Version update
425425
++++++++++++++
426426

427-
.. http:patch:: /api/v3/projects/(string:project_slug)/version/(string:version_slug)/
427+
.. http:patch:: /api/v3/projects/(string:project_slug)/versions/(string:version_slug)/
428428
429429
Update a version.
430430

@@ -460,7 +460,7 @@ Version update
460460
.. sourcecode:: json
461461

462462
{
463-
"active": true,
463+
"active": true
464464
}
465465

466466
:statuscode 204: Updated successfully

docs/conf.py

+12
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@ def get_version():
103103
<p>Try using the search box or go to the homepage.</p>
104104
''',
105105
}
106+
linkcheck_ignore = [
107+
r'http://127\.0\.0\.1',
108+
r'http://localhost',
109+
r'https://yourproject\.readthedocs\.io',
110+
r'https?://docs\.example\.com',
111+
r'https://foo\.readthedocs\.io/projects',
112+
r'https://github\.com.+?#L\d+',
113+
r'https://github\.com/readthedocs/readthedocs\.org/issues',
114+
r'https://github\.com/readthedocs/readthedocs\.org/pull',
115+
r'https://docs\.readthedocs\.io/\?rtd_search',
116+
r'https://readthedocs\.org/search',
117+
]
106118

107119

108120
def setup(app):

docs/gsoc.rst

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
Google Summer of Code
22
=====================
33

4-
.. note:: Thanks for your interest in Read the Docs!
5-
Please follow the instructions in `Getting Started`_,
6-
as a good place to start.
7-
**Contacting us will not increase your chance of being accepted,
8-
but opening Pull Requests with docs and tests will.**
9-
10-
Read the Docs is excited to be in the Google Summer of Code in 2019.
11-
This page will contain all the information for students and anyone else interested in helping.
4+
5+
.. warning:: **Read the Docs will not be participating in the Google Summer of Code in 2020.**
6+
We hope to return to the program in the future,
7+
and appreciate the interest everyone has shown.
8+
9+
Thanks for your interest in Read the Docs!
10+
Please follow the instructions in `Getting Started`_,
11+
as a good place to start.
12+
**Contacting us will not increase your chance of being accepted,
13+
but opening Pull Requests with docs and tests will.**
14+
15+
You can see our :ref:`gsoc:Projects from previous years` for the work that students have done in the past.
1216

1317
Skills
1418
------

docs/intro/import-guide.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ You can configure these settings in a ``readthedocs.yml`` file.
7676
See our :doc:`/config-file/index` docs for more details.
7777

7878
It is also important to note that the default version of Sphinx is ``v1.8.5``. If
79-
chosing to build your documentation other than this, it must be specified in a
79+
choosing to build your documentation other than this, it must be specified in a
8080
``requirements.txt`` file.
8181

8282
Read the Docs will host multiple versions of your code. You can read more about

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "readthedocs",
3-
"version": "3.11.1",
3+
"version": "3.11.4",
44
"description": "Read the Docs build dependencies",
55
"author": "Anthony Johnson <[email protected]>",
66
"scripts": {

readthedocs/api/v2/adapters.py

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from requests_toolbelt.adapters.host_header_ssl import HostHeaderSSLAdapter
2+
from requests.adapters import HTTPAdapter
3+
4+
5+
class TimeoutAdapter:
6+
7+
"""
8+
Adapter to inject ``timeout`` to all the requests.
9+
10+
Allows us to not wait forever when querying our API internally from the
11+
builders and make the build fail faster if it goes wrong.
12+
13+
https://2.python-requests.org//en/master/user/advanced/#transport-adapters
14+
https://2.python-requests.org//en/master/user/advanced/#timeouts
15+
"""
16+
17+
def send(self, *args, **kwargs):
18+
kwargs.update({
19+
'timeout': 5, # 5 seconds in total (connect + read)
20+
})
21+
return super().send(*args, **kwargs)
22+
23+
24+
class TimeoutHostHeaderSSLAdapter(TimeoutAdapter, HostHeaderSSLAdapter):
25+
pass
26+
27+
28+
class TimeoutHTTPAdapter(TimeoutAdapter, HTTPAdapter):
29+
pass

readthedocs/api/v2/client.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
import requests
66
from django.conf import settings
77
from requests.packages.urllib3.util.retry import Retry # noqa
8-
from requests_toolbelt.adapters import host_header_ssl
98
from rest_framework.renderers import JSONRenderer
109
from slumber import API, serialize
1110

11+
from .adapters import TimeoutHostHeaderSSLAdapter, TimeoutHTTPAdapter
12+
1213

1314
log = logging.getLogger(__name__)
1415

@@ -28,9 +29,9 @@ def setup_api():
2829
session = requests.Session()
2930
if settings.SLUMBER_API_HOST.startswith('https'):
3031
# Only use the HostHeaderSSLAdapter for HTTPS connections
31-
adapter_class = host_header_ssl.HostHeaderSSLAdapter
32+
adapter_class = TimeoutHostHeaderSSLAdapter
3233
else:
33-
adapter_class = requests.adapters.HTTPAdapter
34+
adapter_class = TimeoutHTTPAdapter
3435

3536
# Define a retry mechanism trying to attempt to not fail in the first
3637
# error. Builders hit this issue frequently because the webs are high loaded

0 commit comments

Comments
 (0)