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

Commit 48fec67

Browse files
committed
Merge tag 'v0.33.3'
Features -------- - Add support for the SNI extension to federation TLS connections. Thanks to @vojeroen! ([\#3439](#3439)) - Add /_media/r0/config ([\#3184](#3184)) - speed up /members API and add `at` and `membership` params as per MSC1227 ([\#3568](#3568)) - implement `summary` block in /sync response as per MSC688 ([\#3574](#3574)) - Add lazy-loading support to /messages as per MSC1227 ([\#3589](#3589)) - Add ability to limit number of monthly active users on the server ([\#3633](#3633)) - Support more federation endpoints on workers ([\#3653](#3653)) - Basic support for room versioning ([\#3654](#3654)) - Ability to disable client/server Synapse via conf toggle ([\#3655](#3655)) - Ability to whitelist specific threepids against monthly active user limiting ([\#3662](#3662)) - Add some metrics for the appservice and federation event sending loops ([\#3664](#3664)) - Where server is disabled, block ability for locked out users to read new messages ([\#3670](#3670)) - set admin uri via config, to be used in error messages where the user should contact the administrator ([\#3687](#3687)) - Synapse's presence functionality can now be disabled with the "use_presence" configuration option. ([\#3694](#3694)) - For resource limit blocked users, prevent writing into rooms ([\#3708](#3708)) Bugfixes -------- - Fix occasional glitches in the synapse_event_persisted_position metric ([\#3658](#3658)) - Fix bug on deleting 3pid when using identity servers that don't support unbind API ([\#3661](#3661)) - Make the tests pass on Twisted < 18.7.0 ([\#3676](#3676)) - Don’t ship recaptcha_ajax.js, use it directly from Google ([\#3677](#3677)) - Fixes test_reap_monthly_active_users so it passes under postgres ([\#3681](#3681)) - Fix mau blocking calulation bug on login ([\#3689](#3689)) - Fix missing yield in synapse.storage.monthly_active_users.initialise_reserved_users ([\#3692](#3692)) - Improve HTTP request logging to include all requests ([\#3700](#3700)) - Avoid timing out requests while we are streaming back the response ([\#3701](#3701)) - Support more federation endpoints on workers ([\#3705](#3705), [\#3713](#3713)) - Fix "Starting db txn 'get_all_updated_receipts' from sentinel context" warning ([\#3710](#3710)) - Fix bug where `state_cache` cache factor ignored environment variables ([\#3719](#3719)) - Fix bug in v0.33.3rc1 which caused infinite loops and OOMs ([\#3723](#3723)) - Fix bug introduced in v0.33.3rc1 which made the ToS give a 500 error ([\#3732](#3732)) Deprecations and Removals ------------------------- - The Shared-Secret registration method of the legacy v1/register REST endpoint has been removed. For a replacement, please see [the admin/register API documentation](https://github.com/matrix-org/synapse/blob/master/docs/admin_api/register_api.rst). ([\#3703](#3703)) Internal Changes ---------------- - The test suite now can run under PostgreSQL. ([\#3423](#3423)) - Refactor HTTP replication endpoints to reduce code duplication ([\#3632](#3632)) - Tests now correctly execute on Python 3. ([\#3647](#3647)) - Sytests can now be run inside a Docker container. ([\#3660](#3660)) - Port over enough to Python 3 to allow the sytests to start. ([\#3668](#3668)) - Update docker base image from alpine 3.7 to 3.8. ([\#3669](#3669)) - Rename synapse.util.async to synapse.util.async_helpers to mitigate async becoming a keyword on Python 3.7. ([\#3678](#3678)) - Synapse's tests are now formatted with the black autoformatter. ([\#3679](#3679)) - Implemented a new testing base class to reduce test boilerplate. ([\#3684](#3684)) - Rename MAU prometheus metrics ([\#3690](#3690)) - add new error type ResourceLimit ([\#3707](#3707)) - Logcontexts for replication command handlers ([\#3709](#3709)) - Update admin register API documentation to reference a real user ID. ([\#3712](#3712))
2 parents cd32c19 + 3504982 commit 48fec67

File tree

200 files changed

+5653
-3529
lines changed

Some content is hidden

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

200 files changed

+5653
-3529
lines changed

.circleci/config.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
version: 2
2+
jobs:
3+
sytestpy2:
4+
machine: true
5+
steps:
6+
- checkout
7+
- run: docker pull matrixdotorg/sytest-synapsepy2
8+
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs matrixdotorg/sytest-synapsepy2
9+
- store_artifacts:
10+
path: ~/project/logs
11+
destination: logs
12+
sytestpy2postgres:
13+
machine: true
14+
steps:
15+
- checkout
16+
- run: docker pull matrixdotorg/sytest-synapsepy2
17+
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs -e POSTGRES=1 matrixdotorg/sytest-synapsepy2
18+
- store_artifacts:
19+
path: ~/project/logs
20+
destination: logs
21+
sytestpy3:
22+
machine: true
23+
steps:
24+
- checkout
25+
- run: docker pull matrixdotorg/sytest-synapsepy3
26+
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs hawkowl/sytestpy3
27+
- store_artifacts:
28+
path: ~/project/logs
29+
destination: logs
30+
sytestpy3postgres:
31+
machine: true
32+
steps:
33+
- checkout
34+
- run: docker pull matrixdotorg/sytest-synapsepy3
35+
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs -e POSTGRES=1 matrixdotorg/sytest-synapsepy3
36+
- store_artifacts:
37+
path: ~/project/logs
38+
destination: logs
39+
40+
workflows:
41+
version: 2
42+
build:
43+
jobs:
44+
- sytestpy2
45+
- sytestpy2postgres
46+
# Currently broken while the Python 3 port is incomplete
47+
# - sytestpy3
48+
# - sytestpy3postgres

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ Dockerfile
33
.gitignore
44
demo/etc
55
tox.ini
6+
synctl
7+
.git/*
8+
.tox/*

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ before_script:
88
- git remote set-branches --add origin develop
99
- git fetch origin develop
1010

11+
services:
12+
- postgresql
13+
1114
matrix:
1215
fast_finish: true
1316
include:
@@ -20,6 +23,9 @@ matrix:
2023
- python: 2.7
2124
env: TOX_ENV=py27
2225

26+
- python: 2.7
27+
env: TOX_ENV=py27-postgres TRIAL_FLAGS="-j 4"
28+
2329
- python: 3.6
2430
env: TOX_ENV=py36
2531

@@ -29,6 +35,10 @@ matrix:
2935
- python: 3.6
3036
env: TOX_ENV=check-newsfragment
3137

38+
allow_failures:
39+
- python: 2.7
40+
env: TOX_ENV=py27-postgres TRIAL_FLAGS="-j 4"
41+
3242
install:
3343
- pip install tox
3444

CHANGES.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,85 @@
1+
Synapse 0.33.3 (2018-08-22)
2+
===========================
3+
4+
Bugfixes
5+
--------
6+
7+
- Fix bug introduced in v0.33.3rc1 which made the ToS give a 500 error ([\#3732](https://github.com/matrix-org/synapse/issues/3732))
8+
9+
10+
Synapse 0.33.3rc2 (2018-08-21)
11+
==============================
12+
13+
Bugfixes
14+
--------
15+
16+
- Fix bug in v0.33.3rc1 which caused infinite loops and OOMs ([\#3723](https://github.com/matrix-org/synapse/issues/3723))
17+
18+
19+
Synapse 0.33.3rc1 (2018-08-21)
20+
==============================
21+
22+
Features
23+
--------
24+
25+
- Add support for the SNI extension to federation TLS connections. Thanks to @vojeroen! ([\#3439](https://github.com/matrix-org/synapse/issues/3439))
26+
- Add /_media/r0/config ([\#3184](https://github.com/matrix-org/synapse/issues/3184))
27+
- speed up /members API and add `at` and `membership` params as per MSC1227 ([\#3568](https://github.com/matrix-org/synapse/issues/3568))
28+
- implement `summary` block in /sync response as per MSC688 ([\#3574](https://github.com/matrix-org/synapse/issues/3574))
29+
- Add lazy-loading support to /messages as per MSC1227 ([\#3589](https://github.com/matrix-org/synapse/issues/3589))
30+
- Add ability to limit number of monthly active users on the server ([\#3633](https://github.com/matrix-org/synapse/issues/3633))
31+
- Support more federation endpoints on workers ([\#3653](https://github.com/matrix-org/synapse/issues/3653))
32+
- Basic support for room versioning ([\#3654](https://github.com/matrix-org/synapse/issues/3654))
33+
- Ability to disable client/server Synapse via conf toggle ([\#3655](https://github.com/matrix-org/synapse/issues/3655))
34+
- Ability to whitelist specific threepids against monthly active user limiting ([\#3662](https://github.com/matrix-org/synapse/issues/3662))
35+
- Add some metrics for the appservice and federation event sending loops ([\#3664](https://github.com/matrix-org/synapse/issues/3664))
36+
- Where server is disabled, block ability for locked out users to read new messages ([\#3670](https://github.com/matrix-org/synapse/issues/3670))
37+
- set admin uri via config, to be used in error messages where the user should contact the administrator ([\#3687](https://github.com/matrix-org/synapse/issues/3687))
38+
- Synapse's presence functionality can now be disabled with the "use_presence" configuration option. ([\#3694](https://github.com/matrix-org/synapse/issues/3694))
39+
- For resource limit blocked users, prevent writing into rooms ([\#3708](https://github.com/matrix-org/synapse/issues/3708))
40+
41+
42+
Bugfixes
43+
--------
44+
45+
- Fix occasional glitches in the synapse_event_persisted_position metric ([\#3658](https://github.com/matrix-org/synapse/issues/3658))
46+
- Fix bug on deleting 3pid when using identity servers that don't support unbind API ([\#3661](https://github.com/matrix-org/synapse/issues/3661))
47+
- Make the tests pass on Twisted < 18.7.0 ([\#3676](https://github.com/matrix-org/synapse/issues/3676))
48+
- Don’t ship recaptcha_ajax.js, use it directly from Google ([\#3677](https://github.com/matrix-org/synapse/issues/3677))
49+
- Fixes test_reap_monthly_active_users so it passes under postgres ([\#3681](https://github.com/matrix-org/synapse/issues/3681))
50+
- Fix mau blocking calulation bug on login ([\#3689](https://github.com/matrix-org/synapse/issues/3689))
51+
- Fix missing yield in synapse.storage.monthly_active_users.initialise_reserved_users ([\#3692](https://github.com/matrix-org/synapse/issues/3692))
52+
- Improve HTTP request logging to include all requests ([\#3700](https://github.com/matrix-org/synapse/issues/3700))
53+
- Avoid timing out requests while we are streaming back the response ([\#3701](https://github.com/matrix-org/synapse/issues/3701))
54+
- Support more federation endpoints on workers ([\#3705](https://github.com/matrix-org/synapse/issues/3705), [\#3713](https://github.com/matrix-org/synapse/issues/3713))
55+
- Fix "Starting db txn 'get_all_updated_receipts' from sentinel context" warning ([\#3710](https://github.com/matrix-org/synapse/issues/3710))
56+
- Fix bug where `state_cache` cache factor ignored environment variables ([\#3719](https://github.com/matrix-org/synapse/issues/3719))
57+
58+
59+
Deprecations and Removals
60+
-------------------------
61+
62+
- The Shared-Secret registration method of the legacy v1/register REST endpoint has been removed. For a replacement, please see [the admin/register API documentation](https://github.com/matrix-org/synapse/blob/master/docs/admin_api/register_api.rst). ([\#3703](https://github.com/matrix-org/synapse/issues/3703))
63+
64+
65+
Internal Changes
66+
----------------
67+
68+
- The test suite now can run under PostgreSQL. ([\#3423](https://github.com/matrix-org/synapse/issues/3423))
69+
- Refactor HTTP replication endpoints to reduce code duplication ([\#3632](https://github.com/matrix-org/synapse/issues/3632))
70+
- Tests now correctly execute on Python 3. ([\#3647](https://github.com/matrix-org/synapse/issues/3647))
71+
- Sytests can now be run inside a Docker container. ([\#3660](https://github.com/matrix-org/synapse/issues/3660))
72+
- Port over enough to Python 3 to allow the sytests to start. ([\#3668](https://github.com/matrix-org/synapse/issues/3668))
73+
- Update docker base image from alpine 3.7 to 3.8. ([\#3669](https://github.com/matrix-org/synapse/issues/3669))
74+
- Rename synapse.util.async to synapse.util.async_helpers to mitigate async becoming a keyword on Python 3.7. ([\#3678](https://github.com/matrix-org/synapse/issues/3678))
75+
- Synapse's tests are now formatted with the black autoformatter. ([\#3679](https://github.com/matrix-org/synapse/issues/3679))
76+
- Implemented a new testing base class to reduce test boilerplate. ([\#3684](https://github.com/matrix-org/synapse/issues/3684))
77+
- Rename MAU prometheus metrics ([\#3690](https://github.com/matrix-org/synapse/issues/3690))
78+
- add new error type ResourceLimit ([\#3707](https://github.com/matrix-org/synapse/issues/3707))
79+
- Logcontexts for replication command handlers ([\#3709](https://github.com/matrix-org/synapse/issues/3709))
80+
- Update admin register API documentation to reference a real user ID. ([\#3712](https://github.com/matrix-org/synapse/issues/3712))
81+
82+
183
Synapse 0.33.2 (2018-08-09)
284
===========================
385

@@ -24,7 +106,7 @@ Features
24106
Bugfixes
25107
--------
26108

27-
- Make /directory/list API return 404 for room not found instead of 400 ([\#2952](https://github.com/matrix-org/synapse/issues/2952))
109+
- Make /directory/list API return 404 for room not found instead of 400. Thanks to @fuzzmz! ([\#3620](https://github.com/matrix-org/synapse/issues/3620))
28110
- Default inviter_display_name to mxid for email invites ([\#3391](https://github.com/matrix-org/synapse/issues/3391))
29111
- Don't generate TURN credentials if no TURN config options are set ([\#3514](https://github.com/matrix-org/synapse/issues/3514))
30112
- Correctly announce deleted devices over federation ([\#3520](https://github.com/matrix-org/synapse/issues/3520))

CONTRIBUTING.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ use github's pull request workflow to review the contribution, and either ask
3030
you to make any refinements needed or merge it and make them ourselves. The
3131
changes will then land on master when we next do a release.
3232

33-
We use `Jenkins <http://matrix.org/jenkins>`_ and
33+
We use `Jenkins <http://matrix.org/jenkins>`_ and
3434
`Travis <https://travis-ci.org/matrix-org/synapse>`_ for continuous
35-
integration. All pull requests to synapse get automatically tested by Travis;
36-
the Jenkins builds require an adminstrator to start them. If your change
37-
breaks the build, this will be shown in github, so please keep an eye on the
35+
integration. All pull requests to synapse get automatically tested by Travis;
36+
the Jenkins builds require an adminstrator to start them. If your change
37+
breaks the build, this will be shown in github, so please keep an eye on the
3838
pull request for feedback.
3939

4040
Code style
@@ -56,17 +56,17 @@ entry. These are managed by Towncrier
5656
(https://github.com/hawkowl/towncrier).
5757

5858
To create a changelog entry, make a new file in the ``changelog.d``
59-
file named in the format of ``issuenumberOrPR.type``. The type can be
59+
file named in the format of ``PRnumber.type``. The type can be
6060
one of ``feature``, ``bugfix``, ``removal`` (also used for
6161
deprecations), or ``misc`` (for internal-only changes). The content of
6262
the file is your changelog entry, which can contain RestructuredText
6363
formatting. A note of contributors is welcomed in changelogs for
6464
non-misc changes (the content of misc changes is not displayed).
6565

66-
For example, a fix for a bug reported in #1234 would have its
67-
changelog entry in ``changelog.d/1234.bugfix``, and contain content
68-
like "The security levels of Florbs are now validated when
69-
recieved over federation. Contributed by Jane Matrix".
66+
For example, a fix in PR #1234 would have its changelog entry in
67+
``changelog.d/1234.bugfix``, and contain content like "The security levels of
68+
Florbs are now validated when recieved over federation. Contributed by Jane
69+
Matrix".
7070

7171
Attribution
7272
~~~~~~~~~~~
@@ -125,7 +125,7 @@ the contribution or otherwise have the right to contribute it to Matrix::
125125
personal information I submit with it, including my sign-off) is
126126
maintained indefinitely and may be redistributed consistent with
127127
this project or the open source license(s) involved.
128-
128+
129129
If you agree to this for your contribution, then all that's needed is to
130130
include the line in your commit or pull request comment::
131131

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ recursive-include changelog.d *
3636
prune .github
3737
prune demo/etc
3838
prune docker
39+
prune .circleci

contrib/grafana/synapse.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"gnetId": null,
5555
"graphTooltip": 0,
5656
"id": null,
57-
"iteration": 1533026624326,
57+
"iteration": 1533598785368,
5858
"links": [
5959
{
6060
"asDropdown": true,
@@ -4629,7 +4629,7 @@
46294629
"h": 9,
46304630
"w": 12,
46314631
"x": 0,
4632-
"y": 11
4632+
"y": 29
46334633
},
46344634
"id": 67,
46354635
"legend": {
@@ -4655,11 +4655,11 @@
46554655
"steppedLine": false,
46564656
"targets": [
46574657
{
4658-
"expr": " synapse_event_persisted_position{instance=\"$instance\"} - ignoring(index, job, name) group_right(instance) synapse_event_processing_positions{instance=\"$instance\",job=~\"$job\",index=~\"$index\"}",
4658+
"expr": " synapse_event_persisted_position{instance=\"$instance\",job=\"synapse\"} - ignoring(index, job, name) group_right() synapse_event_processing_positions{instance=\"$instance\",job=~\"$job\",index=~\"$index\"}",
46594659
"format": "time_series",
46604660
"interval": "",
46614661
"intervalFactor": 1,
4662-
"legendFormat": "{{job}}-{{index}}",
4662+
"legendFormat": "{{job}}-{{index}} ",
46634663
"refId": "A"
46644664
}
46654665
],
@@ -4697,7 +4697,11 @@
46974697
"min": null,
46984698
"show": true
46994699
}
4700-
]
4700+
],
4701+
"yaxis": {
4702+
"align": false,
4703+
"alignLevel": null
4704+
}
47014705
},
47024706
{
47034707
"aliasColors": {},
@@ -4710,7 +4714,7 @@
47104714
"h": 9,
47114715
"w": 12,
47124716
"x": 12,
4713-
"y": 11
4717+
"y": 29
47144718
},
47154719
"id": 71,
47164720
"legend": {
@@ -4778,7 +4782,11 @@
47784782
"min": null,
47794783
"show": true
47804784
}
4781-
]
4785+
],
4786+
"yaxis": {
4787+
"align": false,
4788+
"alignLevel": null
4789+
}
47824790
}
47834791
],
47844792
"title": "Event processing loop positions",
@@ -4957,5 +4965,5 @@
49574965
"timezone": "",
49584966
"title": "Synapse",
49594967
"uid": "000000012",
4960-
"version": 125
4968+
"version": 127
49614969
}

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/python:2-alpine3.7
1+
FROM docker.io/python:2-alpine3.8
22

33
RUN apk add --no-cache --virtual .nacl_deps \
44
build-base \

docs/admin_api/register_api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ As an example::
3333

3434
< {
3535
"access_token": "token_here",
36-
"user_id": "@pepper_roni@test",
36+
"user_id": "@pepper_roni:localhost",
3737
"home_server": "test",
3838
"device_id": "device_id_here"
3939
}

docs/workers.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,23 @@ endpoints matching the following regular expressions::
173173
^/_matrix/federation/v1/backfill/
174174
^/_matrix/federation/v1/get_missing_events/
175175
^/_matrix/federation/v1/publicRooms
176+
^/_matrix/federation/v1/query/
177+
^/_matrix/federation/v1/make_join/
178+
^/_matrix/federation/v1/make_leave/
179+
^/_matrix/federation/v1/send_join/
180+
^/_matrix/federation/v1/send_leave/
181+
^/_matrix/federation/v1/invite/
182+
^/_matrix/federation/v1/query_auth/
183+
^/_matrix/federation/v1/event_auth/
184+
^/_matrix/federation/v1/exchange_third_party_invite/
185+
^/_matrix/federation/v1/send/
176186

177187
The above endpoints should all be routed to the federation_reader worker by the
178188
reverse-proxy configuration.
179189

190+
The `^/_matrix/federation/v1/send/` endpoint must only be handled by a single
191+
instance.
192+
180193
``synapse.app.federation_sender``
181194
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
182195

@@ -228,6 +241,14 @@ regular expressions::
228241

229242
^/_matrix/client/(api/v1|r0|unstable)/keys/upload
230243

244+
If ``use_presence`` is False in the homeserver config, it can also handle REST
245+
endpoints matching the following regular expressions::
246+
247+
^/_matrix/client/(api/v1|r0|unstable)/presence/[^/]+/status
248+
249+
This "stub" presence handler will pass through ``GET`` request but make the
250+
``PUT`` effectively a no-op.
251+
231252
It will proxy any requests it cannot handle to the main synapse instance. It
232253
must therefore be configured with the location of the main instance, via
233254
the ``worker_main_http_uri`` setting in the frontend_proxy worker configuration

0 commit comments

Comments
 (0)