Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit daff1cc

Browse files
committed
Merge branch 'develop' into anoa/reg_email
2 parents 8cd8124 + e701128 commit daff1cc

File tree

125 files changed

+3729
-909
lines changed

Some content is hidden

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

125 files changed

+3729
-909
lines changed

.buildkite/docker-compose.py35.pg95.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ services:
66
image: postgres:9.5
77
environment:
88
POSTGRES_PASSWORD: postgres
9+
command: -c fsync=off
910

1011
testenv:
1112
image: python:3.5
@@ -16,6 +17,6 @@ services:
1617
SYNAPSE_POSTGRES_HOST: postgres
1718
SYNAPSE_POSTGRES_USER: postgres
1819
SYNAPSE_POSTGRES_PASSWORD: postgres
19-
working_dir: /app
20+
working_dir: /src
2021
volumes:
21-
- ..:/app
22+
- ..:/src

.buildkite/docker-compose.py37.pg11.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ services:
66
image: postgres:11
77
environment:
88
POSTGRES_PASSWORD: postgres
9+
command: -c fsync=off
910

1011
testenv:
1112
image: python:3.7
@@ -16,6 +17,6 @@ services:
1617
SYNAPSE_POSTGRES_HOST: postgres
1718
SYNAPSE_POSTGRES_USER: postgres
1819
SYNAPSE_POSTGRES_PASSWORD: postgres
19-
working_dir: /app
20+
working_dir: /src
2021
volumes:
21-
- ..:/app
22+
- ..:/src

.buildkite/docker-compose.py37.pg95.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ services:
66
image: postgres:9.5
77
environment:
88
POSTGRES_PASSWORD: postgres
9+
command: -c fsync=off
910

1011
testenv:
1112
image: python:3.7
@@ -16,6 +17,6 @@ services:
1617
SYNAPSE_POSTGRES_HOST: postgres
1718
SYNAPSE_POSTGRES_USER: postgres
1819
SYNAPSE_POSTGRES_PASSWORD: postgres
19-
working_dir: /app
20+
working_dir: /src
2021
volumes:
21-
- ..:/app
22+
- ..:/src

.buildkite/merge_base_branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ git config --global user.name "A robot"
2727

2828
# Fetch and merge. If it doesn't work, it will raise due to set -e.
2929
git fetch -u origin $GITBASE
30-
git merge --no-edit origin/$GITBASE
30+
git merge --no-edit --no-commit origin/$GITBASE
3131

3232
# Show what we are after.
3333
git --no-pager show -s

.buildkite/pipeline.yml

Lines changed: 82 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
env:
2-
CODECOV_TOKEN: "2dd7eb9b-0eda-45fe-a47c-9b5ac040045f"
2+
COVERALLS_REPO_TOKEN: wsJWOby6j0uCYFiCes3r0XauxO27mx8lD
33

44
steps:
5-
65
- command:
76
- "python -m pip install tox"
87
- "tox -e check_codestyle"
98
label: "\U0001F9F9 Check Style"
109
plugins:
1110
- docker#v3.0.1:
1211
image: "python:3.6"
12+
mount-buildkite-agent: false
1313

1414
- command:
1515
- "python -m pip install tox"
@@ -18,6 +18,7 @@ steps:
1818
plugins:
1919
- docker#v3.0.1:
2020
image: "python:3.6"
21+
mount-buildkite-agent: false
2122

2223
- command:
2324
- "python -m pip install tox"
@@ -26,6 +27,7 @@ steps:
2627
plugins:
2728
- docker#v3.0.1:
2829
image: "python:3.6"
30+
mount-buildkite-agent: false
2931

3032
- command:
3133
- "python -m pip install tox"
@@ -36,6 +38,7 @@ steps:
3638
- docker#v3.0.1:
3739
image: "python:3.6"
3840
propagate-environment: true
41+
mount-buildkite-agent: false
3942

4043
- command:
4144
- "python -m pip install tox"
@@ -44,21 +47,35 @@ steps:
4447
plugins:
4548
- docker#v3.0.1:
4649
image: "python:3.6"
50+
mount-buildkite-agent: false
4751

48-
- wait
52+
- command:
53+
- "python -m pip install tox"
54+
- "tox -e mypy"
55+
label: ":mypy: mypy"
56+
plugins:
57+
- docker#v3.0.1:
58+
image: "python:3.5"
59+
mount-buildkite-agent: false
4960

61+
- wait
5062

5163
- command:
5264
- "apt-get update && apt-get install -y python3.5 python3.5-dev python3-pip libxml2-dev libxslt-dev zlib1g-dev"
5365
- "python3.5 -m pip install tox"
54-
- "tox -e py35-old,codecov"
66+
- "tox -e py35-old,combine"
5567
label: ":python: 3.5 / SQLite / Old Deps"
5668
env:
5769
TRIAL_FLAGS: "-j 2"
70+
LANG: "C.UTF-8"
5871
plugins:
5972
- docker#v3.0.1:
60-
image: "ubuntu:xenial" # We use xenail to get an old sqlite and python
73+
image: "ubuntu:xenial" # We use xenial to get an old sqlite and python
74+
workdir: "/src"
75+
mount-buildkite-agent: false
6176
propagate-environment: true
77+
- matrix-org/coveralls#v1.0:
78+
parallel: "true"
6279
retry:
6380
automatic:
6481
- exit_status: -1
@@ -68,14 +85,18 @@ steps:
6885

6986
- command:
7087
- "python -m pip install tox"
71-
- "tox -e py35,codecov"
88+
- "tox -e py35,combine"
7289
label: ":python: 3.5 / SQLite"
7390
env:
7491
TRIAL_FLAGS: "-j 2"
7592
plugins:
7693
- docker#v3.0.1:
7794
image: "python:3.5"
95+
workdir: "/src"
96+
mount-buildkite-agent: false
7897
propagate-environment: true
98+
- matrix-org/coveralls#v1.0:
99+
parallel: "true"
79100
retry:
80101
automatic:
81102
- exit_status: -1
@@ -85,14 +106,18 @@ steps:
85106

86107
- command:
87108
- "python -m pip install tox"
88-
- "tox -e py36,codecov"
109+
- "tox -e py36,combine"
89110
label: ":python: 3.6 / SQLite"
90111
env:
91112
TRIAL_FLAGS: "-j 2"
92113
plugins:
93114
- docker#v3.0.1:
94115
image: "python:3.6"
116+
workdir: "/src"
117+
mount-buildkite-agent: false
95118
propagate-environment: true
119+
- matrix-org/coveralls#v1.0:
120+
parallel: "true"
96121
retry:
97122
automatic:
98123
- exit_status: -1
@@ -102,14 +127,18 @@ steps:
102127

103128
- command:
104129
- "python -m pip install tox"
105-
- "tox -e py37,codecov"
130+
- "tox -e py37,combine"
106131
label: ":python: 3.7 / SQLite"
107132
env:
108133
TRIAL_FLAGS: "-j 2"
109134
plugins:
110135
- docker#v3.0.1:
111136
image: "python:3.7"
137+
workdir: "/src"
138+
mount-buildkite-agent: false
112139
propagate-environment: true
140+
- matrix-org/coveralls#v1.0:
141+
parallel: "true"
113142
retry:
114143
automatic:
115144
- exit_status: -1
@@ -123,12 +152,14 @@ steps:
123152
env:
124153
TRIAL_FLAGS: "-j 8"
125154
command:
126-
- "bash -c 'python -m pip install tox && python -m tox -e py35-postgres,codecov'"
155+
- "bash -c 'python -m pip install tox && python -m tox -e py35-postgres,combine'"
127156
plugins:
128157
- docker-compose#v2.1.0:
129158
run: testenv
130159
config:
131160
- .buildkite/docker-compose.py35.pg95.yaml
161+
- matrix-org/coveralls#v1.0:
162+
parallel: "true"
132163
retry:
133164
automatic:
134165
- exit_status: -1
@@ -142,12 +173,14 @@ steps:
142173
env:
143174
TRIAL_FLAGS: "-j 8"
144175
command:
145-
- "bash -c 'python -m pip install tox && python -m tox -e py37-postgres,codecov'"
176+
- "bash -c 'python -m pip install tox && python -m tox -e py37-postgres,combine'"
146177
plugins:
147178
- docker-compose#v2.1.0:
148179
run: testenv
149180
config:
150181
- .buildkite/docker-compose.py37.pg95.yaml
182+
- matrix-org/coveralls#v1.0:
183+
parallel: "true"
151184
retry:
152185
automatic:
153186
- exit_status: -1
@@ -161,20 +194,21 @@ steps:
161194
env:
162195
TRIAL_FLAGS: "-j 8"
163196
command:
164-
- "bash -c 'python -m pip install tox && python -m tox -e py37-postgres,codecov'"
197+
- "bash -c 'python -m pip install tox && python -m tox -e py37-postgres,combine'"
165198
plugins:
166199
- docker-compose#v2.1.0:
167200
run: testenv
168201
config:
169202
- .buildkite/docker-compose.py37.pg11.yaml
203+
- matrix-org/coveralls#v1.0:
204+
parallel: "true"
170205
retry:
171206
automatic:
172207
- exit_status: -1
173208
limit: 2
174209
- exit_status: 2
175210
limit: 2
176211

177-
178212
- label: "SyTest - :python: 3.5 / SQLite / Monolith"
179213
agents:
180214
queue: "medium"
@@ -187,6 +221,16 @@ steps:
187221
propagate-environment: true
188222
always-pull: true
189223
workdir: "/src"
224+
entrypoint: ["/bin/sh", "-e", "-c"]
225+
mount-buildkite-agent: false
226+
volumes: ["./logs:/logs"]
227+
- artifacts#v1.2.0:
228+
upload: [ "logs/**/*.log", "logs/**/*.log.*", "logs/coverage.xml" ]
229+
- matrix-org/annotate:
230+
path: "logs/annotate.md"
231+
class: "error"
232+
- matrix-org/coveralls#v1.0:
233+
parallel: "true"
190234
retry:
191235
automatic:
192236
- exit_status: -1
@@ -208,6 +252,16 @@ steps:
208252
propagate-environment: true
209253
always-pull: true
210254
workdir: "/src"
255+
entrypoint: ["/bin/sh", "-e", "-c"]
256+
mount-buildkite-agent: false
257+
volumes: ["./logs:/logs"]
258+
- artifacts#v1.2.0:
259+
upload: [ "logs/**/*.log", "logs/**/*.log.*", "logs/coverage.xml" ]
260+
- matrix-org/annotate:
261+
path: "logs/annotate.md"
262+
class: "error"
263+
- matrix-org/coveralls#v1.0:
264+
parallel: "true"
211265
retry:
212266
automatic:
213267
- exit_status: -1
@@ -232,9 +286,25 @@ steps:
232286
propagate-environment: true
233287
always-pull: true
234288
workdir: "/src"
289+
entrypoint: ["/bin/sh", "-e", "-c"]
290+
mount-buildkite-agent: false
291+
volumes: ["./logs:/logs"]
292+
- artifacts#v1.2.0:
293+
upload: [ "logs/**/*.log", "logs/**/*.log.*", "logs/coverage.xml" ]
294+
- matrix-org/annotate:
295+
path: "logs/annotate.md"
296+
class: "error"
297+
- matrix-org/coveralls#v1.0:
298+
parallel: "true"
235299
retry:
236300
automatic:
237301
- exit_status: -1
238302
limit: 2
239303
- exit_status: 2
240304
limit: 2
305+
306+
- wait: ~
307+
continue_on_failure: true
308+
309+
- label: Trigger webhook
310+
command: "curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d \"payload[build_num]=$BUILDKITE_BUILD_NUMBER&payload[status]=done\""

.coveragerc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[run]
22
branch = True
33
parallel = True
4-
include = synapse/*
4+
include=$TOP/synapse/*
5+
data_file = $TOP/.coverage
56

67
[report]
78
precision = 2

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ _trial_temp*/
2020
/*.signing.key
2121
/env/
2222
/homeserver*.yaml
23+
/logs
2324
/media_store/
2425
/uploads
2526

@@ -29,13 +30,13 @@ _trial_temp*/
2930
/.vscode/
3031

3132
# build products
32-
/.coverage*
3333
!/.coveragerc
34+
/.coverage*
35+
/.mypy_cache/
3436
/.tox
3537
/build/
3638
/coverage.*
3739
/dist/
3840
/docs/build/
3941
/htmlcov
4042
/pip-wheel-metadata/
41-

changelog.d/5680.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lay the groundwork for structured logging output.

changelog.d/5771.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Make Opentracing work in worker mode.

changelog.d/5776.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update opentracing docs to use the unified `trace` method.

changelog.d/5845.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add an admin API to purge old rooms from the database.

changelog.d/5850.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add retry to well-known lookups if we have recently seen a valid well-known record for the server.

changelog.d/5852.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Pass opentracing contexts between servers when transmitting EDUs.

changelog.d/5855.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Opentracing for room and e2e keys.

changelog.d/5859.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add unstable support for MSC2197 (filtered search requests over federation), in order to allow upcoming room directory query performance improvements.

changelog.d/5864.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Correctly retry all hosts returned from SRV when we fail to connect.

changelog.d/5877.removal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove shared secret registration from client/r0/register endpoint. Contributed by Awesome Technologies Innovationslabor GmbH.

changelog.d/5878.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add admin API endpoint for setting whether or not a user is a server administrator.

changelog.d/5885.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix stack overflow when recovering an appservice which had an outage.

changelog.d/5886.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Refactor the Appservice scheduler code.

changelog.d/5893.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Drop some unused tables.

changelog.d/5894.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add missing index on users_in_public_rooms to improve the performance of directory queries.

changelog.d/5895.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add config option to sign remote key query responses with a separate key.

changelog.d/5896.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improve the logging when we have an error when fetching signing keys.

changelog.d/5897.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Switch to the v2 lookup API for 3PID invites.

changelog.d/5900.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add support for config templating.

changelog.d/5902.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Users with the type of "support" or "bot" are no longer required to consent.

changelog.d/5904.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Let synctl accept a directory of config files.

changelog.d/5906.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Increase max display name size to 256.

changelog.d/5909.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix error message which referred to public_base_url instead of public_baseurl. Thanks to @aaronraimist for the fix!

0 commit comments

Comments
 (0)