Skip to content

Commit f0c74a6

Browse files
committed
Merge branch 'main' of github.com:readthedocs/readthedocs.org into humitos/addons/flyout-versions-sorting-algorithm
2 parents 6288537 + 2ab8c0b commit f0c74a6

File tree

111 files changed

+8948
-9810
lines changed

Some content is hidden

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

111 files changed

+8948
-9810
lines changed

CHANGELOG.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
Version 10.21.0
2+
---------------
3+
4+
:Date: March 04, 2024
5+
6+
* `@stsewd <https://github.com/stsewd>`__: Project: force PR previews to match repo only if the repo is public (`#11184 <https://github.com/readthedocs/readthedocs.org/pull/11184>`__)
7+
* `@github-actions[bot] <https://github.com/github-actions[bot]>`__: Dependencies: all packages updated via pip-tools (`#11180 <https://github.com/readthedocs/readthedocs.org/pull/11180>`__)
8+
* `@ericholscher <https://github.com/ericholscher>`__: Init path to ensure it exists (`#11178 <https://github.com/readthedocs/readthedocs.org/pull/11178>`__)
9+
* `@stsewd <https://github.com/stsewd>`__: Project: build both default and latest version when saving the project form (`#11177 <https://github.com/readthedocs/readthedocs.org/pull/11177>`__)
10+
* `@humitos <https://github.com/humitos>`__: Build: show the YAML config file before validating it (`#11175 <https://github.com/readthedocs/readthedocs.org/pull/11175>`__)
11+
* `@humitos <https://github.com/humitos>`__: Notification: make the OAuth one dismissable (`#11172 <https://github.com/readthedocs/readthedocs.org/pull/11172>`__)
12+
* `@humitos <https://github.com/humitos>`__: Build: set CANCELLED state when the build is cancelled (`#11171 <https://github.com/readthedocs/readthedocs.org/pull/11171>`__)
13+
* `@stsewd <https://github.com/stsewd>`__: Project: merge basic and advanced forms (`#11169 <https://github.com/readthedocs/readthedocs.org/pull/11169>`__)
14+
* `@humitos <https://github.com/humitos>`__: Admin: remove temporal opt-out email settings (`#11164 <https://github.com/readthedocs/readthedocs.org/pull/11164>`__)
15+
* `@humitos <https://github.com/humitos>`__: New dashboard: notification to point users there (`#11161 <https://github.com/readthedocs/readthedocs.org/pull/11161>`__)
16+
* `@stsewd <https://github.com/stsewd>`__: Allauth: Include Bitbucket in the list of social accounts (`#11160 <https://github.com/readthedocs/readthedocs.org/pull/11160>`__)
17+
* `@humitos <https://github.com/humitos>`__: Release 10.20.0 (`#11158 <https://github.com/readthedocs/readthedocs.org/pull/11158>`__)
18+
* `@stsewd <https://github.com/stsewd>`__: Allauth: define secrets in settings (`#11156 <https://github.com/readthedocs/readthedocs.org/pull/11156>`__)
19+
* `@hoyes <https://github.com/hoyes>`__: Dev: Default RTD_DJANGO_DEBUG to False if not set (`#11154 <https://github.com/readthedocs/readthedocs.org/pull/11154>`__)
20+
* `@humitos <https://github.com/humitos>`__: Build: bugfix to show build notifications (`#11153 <https://github.com/readthedocs/readthedocs.org/pull/11153>`__)
21+
* `@ewjoachim <https://github.com/ewjoachim>`__: Fix Poetry instructions (`#11152 <https://github.com/readthedocs/readthedocs.org/pull/11152>`__)
22+
* `@humitos <https://github.com/humitos>`__: VCS: deprecation dates at application level (`#11147 <https://github.com/readthedocs/readthedocs.org/pull/11147>`__)
23+
* `@humitos <https://github.com/humitos>`__: Notifications: allow dismiss user's notifications (`#11130 <https://github.com/readthedocs/readthedocs.org/pull/11130>`__)
24+
* `@humitos <https://github.com/humitos>`__: Projects: remove old/non-used fields (`#11124 <https://github.com/readthedocs/readthedocs.org/pull/11124>`__)
25+
* `@stsewd <https://github.com/stsewd>`__: Match login template with changes from .com (`#11101 <https://github.com/readthedocs/readthedocs.org/pull/11101>`__)
26+
* `@humitos <https://github.com/humitos>`__: Addons + Proxito: return `X-RTD-Resolver-Filename` and inject via CF (`#11100 <https://github.com/readthedocs/readthedocs.org/pull/11100>`__)
27+
128
Version 10.20.0
229
---------------
330

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
master_doc = "index"
7979
copyright = "Read the Docs, Inc & contributors"
80-
version = "10.20.0"
80+
version = "10.21.0"
8181
release = version
8282
exclude_patterns = ["_build", "shared", "_includes"]
8383
default_role = "obj"

docs/dev/settings.rst

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,41 @@ ELASTICSEARCH_DSL_AUTOSYNC
130130

131131
This setting is used for automatically indexing objects to elasticsearch.
132132

133-
134133
.. _elasticsearch-dsl-py.connections.configure: https://elasticsearch-dsl.readthedocs.io/en/stable/configuration.html#multiple-clusters
134+
135+
136+
Docker pass-through settings
137+
----------------------------
138+
139+
If you run a Docker environment, it is possible to pass some secrets through to
140+
the Docker containers from your host system. For security reasons, we do not
141+
commit these secrets to our repository. Instead, we individually define these
142+
settings for our local environments.
143+
144+
We recommend using `direnv`_ for storing local development secrets.
145+
146+
.. _direnv: https://direnv.net/
147+
148+
Allauth secrets
149+
~~~~~~~~~~~~~~~
150+
151+
It is possible to set the Allauth application secrets for our supported
152+
providers using the following environment variables:
153+
154+
.. envvar:: RTD_SOCIALACCOUNT_PROVIDERS_GITHUB_CLIENT_ID
155+
.. envvar:: RTD_SOCIALACCOUNT_PROVIDERS_GITHUB_SECRET
156+
.. envvar:: RTD_SOCIALACCOUNT_PROVIDERS_GITLAB_CLIENT_ID
157+
.. envvar:: RTD_SOCIALACCOUNT_PROVIDERS_GITLAB_SECRET
158+
.. envvar:: RTD_SOCIALACCOUNT_PROVIDERS_BITBUCKET_OAUTH2_CLIENT_ID
159+
.. envvar:: RTD_SOCIALACCOUNT_PROVIDERS_BITBUCKET_OAUTH2_SECRET
160+
.. envvar:: RTD_SOCIALACCOUNT_PROVIDERS_GOOGLE_CLIENT_ID
161+
.. envvar:: RTD_SOCIALACCOUNT_PROVIDERS_GOOGLE_SECRET
162+
163+
Stripe secrets
164+
~~~~~~~~~~~~~~
165+
166+
The following secrets are required to use ``djstripe`` and our Stripe integration.
167+
168+
.. envvar:: RTD_STRIPE_SECRET
169+
.. envvar:: RTD_STRIPE_PUBLISHABLE
170+
.. envvar:: RTD_DJSTRIPE_WEBHOOK_SECRET

docs/user/commercial/single-sign-on.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Learn how to configure this SSO method with our :doc:`/guides/setup-single-sign-
3636
SSO with Google Workspace
3737
-------------------------
3838

39-
This feature allows you to restrict access to users with a specific email address (e.g. ``[email protected]``),
39+
This feature allows you to easily manage access to users with a specific email address (e.g. ``[email protected]``),
4040
where ``company.com`` is a registered Google Workspace domain.
41-
As this identity provider does not provide authorization over each project a user has access to,
41+
As this identity provider does not provide information about which projects a user has access to,
4242
permissions are managed by the :ref:`internal Read the Docs's teams <commercial/organizations:Team Types>` authorization system.
4343

4444
This feature is only available on the **Pro plan** and above.

docs/user/guides/pull-requests.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ Privacy levels
2626

2727
Privacy levels are only supported on :doc:`/commercial/index`.
2828

29-
If you didn’t import your project manually, the privacy level of pull request previews will match your repository,
29+
If you didn’t import your project manually and your repository is public,
30+
the privacy level of pull request previews will be set to *Public*,
3031
otherwise it will be set to *Private*.
3132
Public pull request previews are available to anyone with the link to the preview,
3233
while private previews are only available to users with access to the Read the Docs project.

docs/user/guides/setup-single-sign-on-google-email.rst

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ User setup
2424
~~~~~~~~~~
2525

2626
Using this setup,
27-
all users who have access to the configured Google Workspace will be granted a subset of permissions on your organization automatically on account creation.
27+
all users who have access to the configured Google Workspace will automatically join to your organization when they sign up with their Google account.
28+
Existing users will not be automatically joined to the organization.
2829

2930
You can still add outside collaborators and manage their access.
3031
There are two ways to manage this access:
@@ -42,6 +43,14 @@ However, you can define which teams users matching your company's domain email a
4243
2. Select **Google** in the :guilabel:`Provider` drop-down.
4344
3. Press :guilabel:`Save`.
4445

46+
After enabling SSO with Google Workspace,
47+
all users with email addresses from your configured Google Workspace domain will be required to signup using their Google account.
48+
49+
.. warning::
50+
51+
Existing users with email addresses from your configured Google Workspace domain will not be required to link their Google account,
52+
but they won't be automatically joined to your organization.
53+
4554
Configure team for all users to join
4655
------------------------------------
4756

@@ -62,7 +71,23 @@ Revoke user's access to all the projects
6271
----------------------------------------
6372

6473
By disabling the Google Workspace account with email ``[email protected]``,
65-
you revoke access to all the projects that user had access and disable login on Read the Docs completely for that user.
74+
you revoke access to all the projects the linked Read the Docs user had access to,
75+
and disable login on Read the Docs completely for that user.
76+
77+
.. warning::
78+
79+
If the user signed up to Read the Docs previously to enabling SSO with Google Workspace on your organization,
80+
they may still have access to their account and projects if they were manually added to a team.
81+
82+
To completely revoke access to a user, remove them from all the teams they are part of.
83+
84+
.. warning::
85+
86+
If the user was already signed in to Read the Docs when their access was revoked,
87+
they may still have access to documentation pages until their session expires.
88+
This is three days for the dashboard and documentation pages.
89+
90+
To completely revoke access to a user, remove them from all the teams they are part of.
6691

6792
.. seealso::
6893

docs/user/pull-requests.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ if you have environment variables with private information, make sure they aren'
4848
See :ref:`environment-variables:Environment variables and build process` for more information.
4949

5050
On |com_brand| you can set pull request previews to be private or public,
51-
if you didn't import your project manually, the privacy level of pull request previews will match your repository.
51+
If you didn’t import your project manually and your repository is public,
52+
the privacy level of pull request previews will be set to *Public*.
5253
Public pull request previews are available to anyone with the link to the preview,
5354
while private previews are only available to users with access to the Read the Docs project.
5455

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "readthedocs",
3-
"version": "10.20.0",
3+
"version": "10.21.0",
44
"description": "Read the Docs build dependencies",
55
"author": "Read the Docs, Inc <[email protected]>",
66
"scripts": {

readthedocs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Read the Docs."""
22

33

4-
__version__ = "10.20.0"
4+
__version__ = "10.21.0"

readthedocs/api/v2/utils.py

Lines changed: 26 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def sync_versions_to_db(project, versions, type):
3737
:returns: set of versions' slug added
3838
"""
3939
old_version_values = project.versions.filter(type=type).values_list(
40-
'verbose_name',
41-
'identifier',
40+
"verbose_name",
41+
"identifier",
4242
)
4343
old_versions = dict(old_version_values)
4444

@@ -48,8 +48,8 @@ def sync_versions_to_db(project, versions, type):
4848
has_user_stable = False
4949
has_user_latest = False
5050
for version in versions:
51-
version_id = version['identifier']
52-
version_name = version['verbose_name']
51+
version_id = version["identifier"]
52+
version_name = version["verbose_name"]
5353
if version_name == STABLE_VERBOSE_NAME:
5454
has_user_stable = True
5555
created_version, created = _set_or_create_version(
@@ -90,7 +90,7 @@ def sync_versions_to_db(project, versions, type):
9090
)
9191

9292
log.info(
93-
'Re-syncing versions: version updated.',
93+
"Re-syncing versions: version updated.",
9494
version_verbose_name=version_name,
9595
version_id=version_id,
9696
)
@@ -101,26 +101,22 @@ def sync_versions_to_db(project, versions, type):
101101
added.update(_create_versions(project, type, versions_to_create))
102102

103103
if not has_user_stable:
104-
stable_version = (
105-
project.versions.filter(slug=STABLE, type=type).first()
106-
)
104+
stable_version = project.versions.filter(slug=STABLE, type=type).first()
107105
if stable_version:
108106
# Put back the RTD's stable version
109107
stable_version.machine = True
110108
stable_version.save()
111109
if not has_user_latest:
112-
latest_version = (
113-
project.versions.filter(slug=LATEST, type=type).first()
114-
)
110+
latest_version = project.versions.filter(slug=LATEST, type=type).first()
115111
if latest_version:
116112
# Put back the RTD's latest version
117113
latest_version.machine = True
118114
latest_version.save()
119115
if added:
120116
log.info(
121-
'Re-syncing versions: versions added.',
117+
"Re-syncing versions: versions added.",
122118
count=len(added),
123-
versions=','.join(itertools.islice(added, 100)),
119+
versions=",".join(itertools.islice(added, 100)),
124120
)
125121
return added
126122

@@ -174,14 +170,8 @@ def _set_or_create_version(project, slug, version_id, verbose_name, type_):
174170
def _get_deleted_versions_qs(project, tags_data, branches_data):
175171
# We use verbose_name for tags
176172
# because several tags can point to the same identifier.
177-
versions_tags = [
178-
version['verbose_name']
179-
for version in tags_data
180-
]
181-
versions_branches = [
182-
version['identifier']
183-
for version in branches_data
184-
]
173+
versions_tags = [version["verbose_name"] for version in tags_data]
174+
versions_branches = [version["identifier"] for version in branches_data]
185175

186176
to_delete_qs = (
187177
project.versions(manager=INTERNAL)
@@ -206,32 +196,28 @@ def delete_versions_from_db(project, tags_data, branches_data):
206196
207197
:returns: The slug of the deleted versions from the database.
208198
"""
209-
to_delete_qs = (
210-
_get_deleted_versions_qs(
211-
project=project,
212-
tags_data=tags_data,
213-
branches_data=branches_data,
214-
)
215-
.exclude(active=True)
216-
)
199+
to_delete_qs = _get_deleted_versions_qs(
200+
project=project,
201+
tags_data=tags_data,
202+
branches_data=branches_data,
203+
).exclude(active=True)
217204
_, deleted = to_delete_qs.delete()
218-
versions_count = deleted.get('builds.Version', 0)
205+
versions_count = deleted.get("builds.Version", 0)
219206
log.info(
220-
'Re-syncing versions: versions deleted.', project_slug=project.slug, count=versions_count,
207+
"Re-syncing versions: versions deleted.",
208+
project_slug=project.slug,
209+
count=versions_count,
221210
)
222211

223212

224213
def get_deleted_active_versions(project, tags_data, branches_data):
225214
"""Return the slug of active versions that were deleted from the repository."""
226-
to_delete_qs = (
227-
_get_deleted_versions_qs(
228-
project=project,
229-
tags_data=tags_data,
230-
branches_data=branches_data,
231-
)
232-
.filter(active=True)
233-
)
234-
return set(to_delete_qs.values_list('slug', flat=True))
215+
to_delete_qs = _get_deleted_versions_qs(
216+
project=project,
217+
tags_data=tags_data,
218+
branches_data=branches_data,
219+
).filter(active=True)
220+
return set(to_delete_qs.values_list("slug", flat=True))
235221

236222

237223
def run_automation_rules(project, added_versions, deleted_active_versions):

0 commit comments

Comments
 (0)