Skip to content

Commit 718bc9c

Browse files
authored
Merge branch 'main' into rate-limit-at-lb
2 parents 7ada809 + 8b8081b commit 718bc9c

File tree

9 files changed

+2096
-26
lines changed

9 files changed

+2096
-26
lines changed

.github/workflows/deployminder.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
remind:
1212
if: github.event.pull_request.merged == true
1313
runs-on: ubuntu-latest
14+
permissions:
15+
issues: write
1416
steps:
1517
- name: Comment on PR
1618
uses: actions/github-script@v7

pillar/base/users/_admin/ee.sls

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ users:
1010
ee@chungus
1111
- ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBt9u0P2LhONN5ngUmtU8GupeRXp+BKXnq9Pmx6r6vE8iJ1MQCeRroiNpJ5C8Lr+2yCgsRK5pLndKOowIz5hFPY=
1212
ee@pancack
13+
- ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBSz/Yna8yFAglO9iY/lEdBHDNY91UTfbfGLYcYAZKtYnAnTMyOSQBhubUYr7z5zZv8NBpLiU+10WR8hgDtSsr0=
14+
ee@psf-air

pillar/dev/secrets/docs.sls

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
docs:
22
sentry:
33
dsn: https://[email protected]/6666666
4+
fastly:
5+
service_id: deadbeefdeadbeefdead
6+
token: deadbeefdeadbeefdeadbeefdeadbeef

salt/docs/config/nginx.docs-redirects.conf

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ location ~ ^/([a-z-]*/)?(3|3.5|3.6|3.7|3.8|3.9|3.10)/library/_winreg.html$ {
133133
location ~ ^/([a-z-]*/)?(3|3.12|3.13|3.14)/library/(asynchat|asyncore|smtpd).html$ {
134134
return 301 https://$host/$1$2/;
135135
}
136-
location ~ ^/([a-z-]*/)?(3.13|3.14)/library/(2to3|aifc|audioop|cgi|cgitb|chunk|crypt|imghdr|mailcap|msilib|nis|nntplib|ossaudiodev|pipes|sndhdr|spwd|sunau|telnetlib|tkinter.tix|uu|xdrlib).html$ {
136+
location ~ ^/([a-z-]*/)?(3|3.13|3.14)/library/(2to3|aifc|audioop|cgi|cgitb|chunk|crypt|imghdr|mailcap|msilib|nis|nntplib|ossaudiodev|pipes|sndhdr|spwd|sunau|telnetlib|tkinter.tix|uu|xdrlib).html$ {
137137
return 301 https://$host/$1$2/;
138138
}
139139

@@ -167,7 +167,7 @@ location = /documenting/building.html {
167167
}
168168

169169
# Map toplevel URIs to Python 3 docs.
170-
location ~ ^/((archives|c-api|distutils|extending|faq|howto|install|library|reference|tutorial|using|whatsnew|_images|_sources|_static)(/.*)?)$ {
170+
location ~ ^/((archives|c-api|deprecations|distutils|extending|faq|howto|install|library|reference|tutorial|using|whatsnew|_images|_sources|_static)(/.*)?)$ {
171171
return 301 https://$host/3/$1;
172172
}
173173
location ~ ^/(about|bugs|contents|copyright|download|genindex(-[^.]+)?|glossary|index|license|py-modindex|search)(.html)?$ {
@@ -185,36 +185,46 @@ location ~ ^/((2|3)(\.[0-9]+)?|dev)/\w+/[\d\w\.]+(?!\.html)$ {
185185
if (-f "${request_filename}.html") {
186186
return 301 https://$host:$request_uri.html;
187187
}
188+
add_header Surrogate-Key en/$1 always;
189+
}
190+
191+
# Add the Surrogate-Key for bulk CDN purging
192+
# xref https://docs.fastly.com/en/guides/working-with-surrogate-keys
193+
location ~ ^/((2|3)(\.[0-9]+)?|dev)/ {
194+
add_header Surrogate-Key en/$1 always;
195+
}
196+
location ~ ^/(es|fr|id|it|ja|ko|pl|pt-br|tr|uk|zh-cn|zh-tw)/((2|3)(\.[0-9]+)?|dev)/ {
197+
add_header Surrogate-Key $1/$2 always;
188198
}
189199

190200
# Map old, 2.5-and-earlier directory names to 2.6-and-later names.
191201
location = /lib/ {
192-
return 301 https://$host/library/;
202+
return 301 https://$host/3/library/;
193203
}
194204
location ~ ^/lib/module-([a-zA-Z0-9.]+)\.html$ {
195-
return 301 https://$host/library/$1.html;
205+
return 301 https://$host/3/library/$1.html;
196206
}
197207
location = /tut/ {
198-
return 301 https://$host/tutorial/;
208+
return 301 https://$host/3/tutorial/;
199209
}
200210
location = /tut/tut.html {
201-
return 301 https://$host/tutorial/;
211+
return 301 https://$host/3/tutorial/;
202212
}
203213
location = /api/ {
204-
return 301 https://$host/c-api/;
214+
return 301 https://$host/3/c-api/;
205215
}
206216
location = /ext/ {
207-
return 301 https://$host/extending/;
217+
return 301 https://$host/3/extending/;
208218
}
209219
location = /dist/ {
210-
return 301 https://docs.python.org/distutils/;
220+
return 301 https://$host/3/;
211221
}
212222
location = /inst/ {
213-
return 301 https://$host/install/;
223+
return 301 https://$host/3/;
214224
}
215225
location = /doc/ {
216-
return 301 https://devguide.python.org/documenting.html;
226+
return 301 https://devguide.python.org/documentation/start-documenting/;
217227
}
218228
location = /ref/ {
219-
return 301 https://$host/reference/;
229+
return 301 https://$host/3/reference/;
220230
}

salt/docs/init.sls

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ doc-pkgs:
2222
- texlive-latex-extra
2323
- texlive-latex-recommended
2424
- texlive-fonts-recommended
25+
- texlive-fonts-extra
2526
- texlive-lang-all
2627
- texlive-xetex
2728
- xindy
@@ -78,8 +79,21 @@ docsbuild-sentry:
7879
- name: SENTRY_DSN
7980
- value: {{ pillar.get('docs', {}).get('sentry', {}).get('dsn', '') }}
8081

82+
docsbuild-fastly-service-id:
83+
cron.env_present:
84+
- user: docsbuild
85+
- name: FASTLY_SERVICE_ID
86+
- value: {{ pillar.get('docs', {}).get('fastly', {}).get('service_id', '') }}
87+
88+
docsbuild-fastly-token:
89+
cron.env_present:
90+
- user: docsbuild
91+
- name: FASTLY_TOKEN
92+
- value: {{ pillar.get('docs', {}).get('fastly', {}).get('token', '') }}
93+
8194
docsbuild-no-html:
8295
cron.present:
96+
# run every other day at 07:06
8397
- identifier: docsbuild-no-html
8498
- name: >
8599
/srv/docsbuild/venv/bin/python
@@ -88,18 +102,35 @@ docsbuild-no-html:
88102
- user: docsbuild
89103
- minute: 7
90104
- hour: 6
105+
- daymonth: '*/2'
91106
- require:
92107
- cmd: virtualenv-dependencies
93108

94109
docsbuild-only-html:
95110
cron.present:
111+
# run daily at 04:42
96112
- identifier: docsbuild-only-html
97113
- name: >
98114
/srv/docsbuild/venv/bin/python
99115
/srv/docsbuild/scripts/build_docs.py
100116
--select-output=only-html
101117
- user: docsbuild
102-
- minute: 16
118+
- minute: 42
119+
- hour: 4
120+
- require:
121+
- cmd: virtualenv-dependencies
122+
123+
docsbuild-only-html-en:
124+
cron.present:
125+
# run twice hourly at HH:16 and HH:46
126+
- identifier: docsbuild-only-html-en
127+
- name: >
128+
/srv/docsbuild/venv/bin/python
129+
/srv/docsbuild/scripts/build_docs.py
130+
--select-output=only-html-en
131+
--language=en
132+
- user: docsbuild
133+
- minute: 16,46
103134
- require:
104135
- cmd: virtualenv-dependencies
105136

salt/planet/init.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ planet-user:
4040

4141
https://github.com/python/planet:
4242
git.latest:
43+
- branch: py2
4344
- target: /srv/planet/
4445
- user: planet
4546
- require:

0 commit comments

Comments
 (0)