Compare commits
192 Commits
hhs-7
...
bwindels/r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5e1de677d | ||
|
|
36c62a67c4 | ||
|
|
b5c976347b | ||
|
|
e1e3e77bfd | ||
|
|
6de3884e5e | ||
|
|
a512e637ac | ||
|
|
b3064532d0 | ||
|
|
861c063ebc | ||
|
|
a873896096 | ||
|
|
dc5db01ff2 | ||
|
|
51d33d5178 | ||
|
|
74bbdd0412 | ||
|
|
8607397ea7 | ||
|
|
a3c11f7320 | ||
|
|
73a089f461 | ||
|
|
3852c2bc39 | ||
|
|
0d36fe3563 | ||
|
|
28223841e0 | ||
|
|
ad8e137062 | ||
|
|
e3c159863d | ||
|
|
92abd3d6d6 | ||
|
|
4a15a3e4d5 | ||
|
|
ae6ad4cf41 | ||
|
|
2c695fd1aa | ||
|
|
e70b4ce069 | ||
|
|
3c37c7e45b | ||
|
|
a87d419a85 | ||
|
|
ab59f3d8da | ||
|
|
607eec0456 | ||
|
|
d514608b5c | ||
|
|
28781b65e7 | ||
|
|
d4e0861ff9 | ||
|
|
bf01efb864 | ||
|
|
8834396b8a | ||
|
|
4e8276a34a | ||
|
|
7ee94fc1ba | ||
|
|
66a1d57adb | ||
|
|
c2185f14d7 | ||
|
|
8ac9fa7375 | ||
|
|
3baf6e1667 | ||
|
|
f65163627f | ||
|
|
df55a943ca | ||
|
|
e7fa032126 | ||
|
|
0649306fde | ||
|
|
4c3e7eeec5 | ||
|
|
6cf261930a | ||
|
|
94f7befc31 | ||
|
|
bd469adaa9 | ||
|
|
c53336986d | ||
|
|
e4e96486a9 | ||
|
|
45a1053d44 | ||
|
|
a9d84f4e44 | ||
|
|
787d22ed6c | ||
|
|
fbe5ba25f6 | ||
|
|
5121ae97f5 | ||
|
|
fc691ca97c | ||
|
|
6b6cb32297 | ||
|
|
e37c221b97 | ||
|
|
7d3f639844 | ||
|
|
04eed80a73 | ||
|
|
829213523e | ||
|
|
e3aa2c0b75 | ||
|
|
e302f40e20 | ||
|
|
d3f80cbc9c | ||
|
|
8601c24287 | ||
|
|
a776ccd8f5 | ||
|
|
ad53a5497d | ||
|
|
a2ddaa90f2 | ||
|
|
94ae1dea3c | ||
|
|
168491c412 | ||
|
|
9ea408441f | ||
|
|
3af7a95a9d | ||
|
|
8dfb33d325 | ||
|
|
13f6f1624b | ||
|
|
b28a7ed503 | ||
|
|
23b53b4ef8 | ||
|
|
6bb9a4b1d6 | ||
|
|
703de4ec13 | ||
|
|
1f3f5fcf52 | ||
|
|
3fd68d533b | ||
|
|
741571cf22 | ||
|
|
aeca5a5ed5 | ||
|
|
48957d2c8c | ||
|
|
bd37c4a444 | ||
|
|
642199570c | ||
|
|
77f1de141d | ||
|
|
81b56f8078 | ||
|
|
ce846bb620 | ||
|
|
1a24d4effa | ||
|
|
bbab6ebfd9 | ||
|
|
392a54128c | ||
|
|
83ee5592a5 | ||
|
|
b9158ac2bf | ||
|
|
d4c389f0e4 | ||
|
|
cb016baa37 | ||
|
|
4311f861a3 | ||
|
|
80d2d50f47 | ||
|
|
9407bcf37a | ||
|
|
6c48aa0256 | ||
|
|
6bbe3d5732 | ||
|
|
a334e1cace | ||
|
|
05b9937cd7 | ||
|
|
47c02e6332 | ||
|
|
3f0d8e6b09 | ||
|
|
3d6b24fb1b | ||
|
|
f773ecbd61 | ||
|
|
13b31a9baf | ||
|
|
35aec19f0a | ||
|
|
38ead946a9 | ||
|
|
a219ce8726 | ||
|
|
31c15dcb80 | ||
|
|
c600886d47 | ||
|
|
edabc18938 | ||
|
|
b3097396e7 | ||
|
|
8565d9a9fe | ||
|
|
550007cb0e | ||
|
|
286d6930b7 | ||
|
|
892432c818 | ||
|
|
1e09a1d48a | ||
|
|
ad95ec12ca | ||
|
|
1f4296efcf | ||
|
|
505abb38f0 | ||
|
|
4ecdf73fc7 | ||
|
|
2b41f2ed76 | ||
|
|
5baa087312 | ||
|
|
b58714789f | ||
|
|
06f2dbbb5d | ||
|
|
ac80cb08fe | ||
|
|
9a1cceeca9 | ||
|
|
c7131baefc | ||
|
|
f75b9961c6 | ||
|
|
2b39494cd5 | ||
|
|
0cb7afff35 | ||
|
|
f00a9d2636 | ||
|
|
c9c50284d7 | ||
|
|
1e70f1dbab | ||
|
|
b56ef14629 | ||
|
|
fe88907d04 | ||
|
|
c1ae6b1bce | ||
|
|
85a43f4167 | ||
|
|
c6363f7269 | ||
|
|
2a8996b67d | ||
|
|
e7b3b4d8c2 | ||
|
|
0e46ff6904 | ||
|
|
da864a92c9 | ||
|
|
f472abd792 | ||
|
|
9c749a6b61 | ||
|
|
c71b93f2a4 | ||
|
|
d42d79e3c3 | ||
|
|
9d13ff4da8 | ||
|
|
c8642720c9 | ||
|
|
24efb2a70d | ||
|
|
c30cfff572 | ||
|
|
335b23a078 | ||
|
|
fcfe7a850d | ||
|
|
024be6cf18 | ||
|
|
3e6e94fe9f | ||
|
|
8b3652831c | ||
|
|
bc9af88a2d | ||
|
|
90f8e606e2 | ||
|
|
d0f6c1ce21 | ||
|
|
9e2f9a7b57 | ||
|
|
941ac0f085 | ||
|
|
f6e82dcddb | ||
|
|
0a81038ea0 | ||
|
|
ad9198cc34 | ||
|
|
bef1d6f3bf | ||
|
|
7de1989ea2 | ||
|
|
984db8bb08 | ||
|
|
c971aa7b9d | ||
|
|
8f08d848f5 | ||
|
|
f1a7264663 | ||
|
|
7c33ab76da | ||
|
|
63755fa4c2 | ||
|
|
73884ebac5 | ||
|
|
7c27c4d51c | ||
|
|
1c3f4d9ca5 | ||
|
|
6c0f8d9d50 | ||
|
|
ed5331a627 | ||
|
|
cb64fe2cb7 | ||
|
|
13193a6e2b | ||
|
|
3126b88d35 | ||
|
|
89a76d1889 | ||
|
|
bfa0b759e0 | ||
|
|
9cbd0094f0 | ||
|
|
9dbe38ea7d | ||
|
|
93139a1fb8 | ||
|
|
e7cd7cb0f0 | ||
|
|
c857f5ef9b | ||
|
|
b7d2fb5eb9 | ||
|
|
ceec6ce5f4 | ||
|
|
5f02017aea |
@@ -1,5 +1,21 @@
|
||||
version: 2
|
||||
jobs:
|
||||
dockerhubuploadrelease:
|
||||
machine: true
|
||||
steps:
|
||||
- checkout
|
||||
- run: docker build -f docker/Dockerfile -t matrixdotorg/synapse:$CIRCLE_TAG .
|
||||
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
||||
- run: docker push matrixdotorg/synapse:$CIRCLE_TAG
|
||||
dockerhubuploadlatest:
|
||||
machine: true
|
||||
steps:
|
||||
- checkout
|
||||
- run: docker build -f docker/Dockerfile -t matrixdotorg/synapse:$CIRCLE_SHA1 .
|
||||
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
||||
- run: docker tag matrixdotorg/synapse:$CIRCLE_SHA1 matrixdotorg/synapse:latest
|
||||
- run: docker push matrixdotorg/synapse:$CIRCLE_SHA1
|
||||
- run: docker push matrixdotorg/synapse:latest
|
||||
sytestpy2:
|
||||
machine: true
|
||||
steps:
|
||||
@@ -53,7 +69,7 @@ jobs:
|
||||
steps:
|
||||
- checkout
|
||||
- run: docker pull matrixdotorg/sytest-synapsepy3
|
||||
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs hawkowl/sytestpy3
|
||||
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs matrixdotorg/sytest-synapsepy3
|
||||
- store_artifacts:
|
||||
path: ~/project/logs
|
||||
destination: logs
|
||||
@@ -76,7 +92,7 @@ jobs:
|
||||
- checkout
|
||||
- run: bash .circleci/merge_base_branch.sh
|
||||
- run: docker pull matrixdotorg/sytest-synapsepy3
|
||||
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs hawkowl/sytestpy3
|
||||
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs matrixdotorg/sytest-synapsepy3
|
||||
- store_artifacts:
|
||||
path: ~/project/logs
|
||||
destination: logs
|
||||
@@ -99,16 +115,45 @@ workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- sytestpy2
|
||||
- sytestpy2postgres
|
||||
- sytestpy2:
|
||||
filters:
|
||||
branches:
|
||||
only: /develop|master|release-.*/
|
||||
- sytestpy2postgres:
|
||||
filters:
|
||||
branches:
|
||||
only: /develop|master|release-.*/
|
||||
- sytestpy3:
|
||||
filters:
|
||||
branches:
|
||||
only: /develop|master|release-.*/
|
||||
- sytestpy3postgres:
|
||||
filters:
|
||||
branches:
|
||||
only: /develop|master|release-.*/
|
||||
- sytestpy2merged:
|
||||
filters:
|
||||
branches:
|
||||
ignore: /develop|master/
|
||||
ignore: /develop|master|release-.*/
|
||||
- sytestpy2postgresmerged:
|
||||
filters:
|
||||
branches:
|
||||
ignore: /develop|master/
|
||||
# Currently broken while the Python 3 port is incomplete
|
||||
# - sytestpy3
|
||||
# - sytestpy3postgres
|
||||
ignore: /develop|master|release-.*/
|
||||
- sytestpy3merged:
|
||||
filters:
|
||||
branches:
|
||||
ignore: /develop|master|release-.*/
|
||||
- sytestpy3postgresmerged:
|
||||
filters:
|
||||
branches:
|
||||
ignore: /develop|master|release-.*/
|
||||
- dockerhubuploadrelease:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v[0-9].[0-9]+.[0-9]+(.[0-9]+)?/
|
||||
branches:
|
||||
ignore: /.*/
|
||||
- dockerhubuploadlatest:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
|
||||
@@ -4,7 +4,7 @@ set -e
|
||||
|
||||
# CircleCI doesn't give CIRCLE_PR_NUMBER in the environment for non-forked PRs. Wonderful.
|
||||
# In this case, we just need to do some ~shell magic~ to strip it out of the PULL_REQUEST URL.
|
||||
echo 'export CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"' >> "$BASH_ENV"
|
||||
echo 'export CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"' >> $BASH_ENV
|
||||
source $BASH_ENV
|
||||
|
||||
if [[ -z "${CIRCLE_PR_NUMBER}" ]]
|
||||
@@ -19,6 +19,10 @@ GITBASE=`curl -q https://api.github.com/repos/matrix-org/synapse/pulls/${CIRCLE_
|
||||
# Show what we are before
|
||||
git show -s
|
||||
|
||||
# Set up username so it can do a merge
|
||||
git config --global user.email bot@matrix.org
|
||||
git config --global user.name "A robot"
|
||||
|
||||
# Fetch and merge. If it doesn't work, it will raise due to set -e.
|
||||
git fetch -u origin $GITBASE
|
||||
git merge --no-edit origin/$GITBASE
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,9 +1,11 @@
|
||||
*.pyc
|
||||
.*.swp
|
||||
*~
|
||||
*.lock
|
||||
|
||||
.DS_Store
|
||||
_trial_temp/
|
||||
_trial_temp*/
|
||||
logs/
|
||||
dbs/
|
||||
*.egg
|
||||
|
||||
11
.travis.yml
11
.travis.yml
@@ -20,14 +20,25 @@ matrix:
|
||||
- python: 2.7
|
||||
env: TOX_ENV=py27
|
||||
|
||||
- python: 2.7
|
||||
env: TOX_ENV=py27-old
|
||||
|
||||
- python: 2.7
|
||||
env: TOX_ENV=py27-postgres TRIAL_FLAGS="-j 4"
|
||||
services:
|
||||
- postgresql
|
||||
|
||||
- python: 3.5
|
||||
env: TOX_ENV=py35
|
||||
|
||||
- python: 3.6
|
||||
env: TOX_ENV=py36
|
||||
|
||||
- python: 3.6
|
||||
env: TOX_ENV=py36-postgres TRIAL_FLAGS="-j 4"
|
||||
services:
|
||||
- postgresql
|
||||
|
||||
- python: 3.6
|
||||
env: TOX_ENV=check_isort
|
||||
|
||||
|
||||
74
CHANGES.md
74
CHANGES.md
@@ -1,3 +1,77 @@
|
||||
Synapse 0.33.5.1 (2018-09-25)
|
||||
=============================
|
||||
|
||||
Internal Changes
|
||||
----------------
|
||||
|
||||
- Fix incompatibility with older Twisted version in tests. Thanks
|
||||
@OlegGirko! ([\#3940](https://github.com/matrix-org/synapse/issues/3940))
|
||||
|
||||
|
||||
Synapse 0.33.5 (2018-09-24)
|
||||
===========================
|
||||
|
||||
No significant changes.
|
||||
|
||||
|
||||
Synapse 0.33.5rc1 (2018-09-17)
|
||||
==============================
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
- Python 3.5 and 3.6 support is now in beta. ([\#3576](https://github.com/matrix-org/synapse/issues/3576))
|
||||
- Implement `event_format` filter param in `/sync` ([\#3790](https://github.com/matrix-org/synapse/issues/3790))
|
||||
- Add synapse_admin_mau:registered_reserved_users metric to expose number of real reaserved users ([\#3846](https://github.com/matrix-org/synapse/issues/3846))
|
||||
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Remove connection ID for replication prometheus metrics, as it creates a large number of new series. ([\#3788](https://github.com/matrix-org/synapse/issues/3788))
|
||||
- guest users should not be part of mau total ([\#3800](https://github.com/matrix-org/synapse/issues/3800))
|
||||
- Bump dependency on pyopenssl 16.x, to avoid incompatibility with recent Twisted. ([\#3804](https://github.com/matrix-org/synapse/issues/3804))
|
||||
- Fix existing room tags not coming down sync when joining a room ([\#3810](https://github.com/matrix-org/synapse/issues/3810))
|
||||
- Fix jwt import check ([\#3824](https://github.com/matrix-org/synapse/issues/3824))
|
||||
- fix VOIP crashes under Python 3 (#3821) ([\#3835](https://github.com/matrix-org/synapse/issues/3835))
|
||||
- Fix manhole so that it works with latest openssh clients ([\#3841](https://github.com/matrix-org/synapse/issues/3841))
|
||||
- Fix outbound requests occasionally wedging, which can result in federation breaking between servers. ([\#3845](https://github.com/matrix-org/synapse/issues/3845))
|
||||
- Show heroes if room name/canonical alias has been deleted ([\#3851](https://github.com/matrix-org/synapse/issues/3851))
|
||||
- Fix handling of redacted events from federation ([\#3859](https://github.com/matrix-org/synapse/issues/3859))
|
||||
- ([\#3874](https://github.com/matrix-org/synapse/issues/3874))
|
||||
- Mitigate outbound federation randomly becoming wedged ([\#3875](https://github.com/matrix-org/synapse/issues/3875))
|
||||
|
||||
|
||||
Internal Changes
|
||||
----------------
|
||||
|
||||
- CircleCI tests now run on the potential merge of a PR. ([\#3704](https://github.com/matrix-org/synapse/issues/3704))
|
||||
- http/ is now ported to Python 3. ([\#3771](https://github.com/matrix-org/synapse/issues/3771))
|
||||
- Improve human readable error messages for threepid registration/account update ([\#3789](https://github.com/matrix-org/synapse/issues/3789))
|
||||
- Make /sync slightly faster by avoiding needless copies ([\#3795](https://github.com/matrix-org/synapse/issues/3795))
|
||||
- handlers/ is now ported to Python 3. ([\#3803](https://github.com/matrix-org/synapse/issues/3803))
|
||||
- Limit the number of PDUs/EDUs per federation transaction ([\#3805](https://github.com/matrix-org/synapse/issues/3805))
|
||||
- Only start postgres instance for postgres tests on Travis CI ([\#3806](https://github.com/matrix-org/synapse/issues/3806))
|
||||
- tests/ is now ported to Python 3. ([\#3808](https://github.com/matrix-org/synapse/issues/3808))
|
||||
- crypto/ is now ported to Python 3. ([\#3822](https://github.com/matrix-org/synapse/issues/3822))
|
||||
- rest/ is now ported to Python 3. ([\#3823](https://github.com/matrix-org/synapse/issues/3823))
|
||||
- add some logging for the keyring queue ([\#3826](https://github.com/matrix-org/synapse/issues/3826))
|
||||
- speed up lazy loading by 2-3x ([\#3827](https://github.com/matrix-org/synapse/issues/3827))
|
||||
- Improved Dockerfile to remove build requirements after building reducing the image size. ([\#3834](https://github.com/matrix-org/synapse/issues/3834))
|
||||
- Disable lazy loading for incremental syncs for now ([\#3840](https://github.com/matrix-org/synapse/issues/3840))
|
||||
- federation/ is now ported to Python 3. ([\#3847](https://github.com/matrix-org/synapse/issues/3847))
|
||||
- Log when we retry outbound requests ([\#3853](https://github.com/matrix-org/synapse/issues/3853))
|
||||
- Removed some excess logging messages. ([\#3855](https://github.com/matrix-org/synapse/issues/3855))
|
||||
- Speed up purge history for rooms that have been previously purged ([\#3856](https://github.com/matrix-org/synapse/issues/3856))
|
||||
- Refactor some HTTP timeout code. ([\#3857](https://github.com/matrix-org/synapse/issues/3857))
|
||||
- Fix running merged builds on CircleCI ([\#3858](https://github.com/matrix-org/synapse/issues/3858))
|
||||
- Fix typo in replication stream exception. ([\#3860](https://github.com/matrix-org/synapse/issues/3860))
|
||||
- Add in flight real time metrics for Measure blocks ([\#3871](https://github.com/matrix-org/synapse/issues/3871))
|
||||
- Disable buffering and automatic retrying in treq requests to prevent timeouts. ([\#3872](https://github.com/matrix-org/synapse/issues/3872))
|
||||
- mention jemalloc in the README ([\#3877](https://github.com/matrix-org/synapse/issues/3877))
|
||||
- Remove unmaintained "nuke-room-from-db.sh" script ([\#3888](https://github.com/matrix-org/synapse/issues/3888))
|
||||
|
||||
|
||||
Synapse 0.33.4 (2018-09-07)
|
||||
===========================
|
||||
|
||||
|
||||
@@ -30,12 +30,28 @@ use github's pull request workflow to review the contribution, and either ask
|
||||
you to make any refinements needed or merge it and make them ourselves. The
|
||||
changes will then land on master when we next do a release.
|
||||
|
||||
We use `Jenkins <http://matrix.org/jenkins>`_ and
|
||||
`Travis <https://travis-ci.org/matrix-org/synapse>`_ for continuous
|
||||
integration. All pull requests to synapse get automatically tested by Travis;
|
||||
the Jenkins builds require an adminstrator to start them. If your change
|
||||
breaks the build, this will be shown in github, so please keep an eye on the
|
||||
pull request for feedback.
|
||||
We use `CircleCI <https://circleci.com/gh/matrix-org>`_ and `Travis CI
|
||||
<https://travis-ci.org/matrix-org/synapse>`_ for continuous integration. All
|
||||
pull requests to synapse get automatically tested by Travis and CircleCI.
|
||||
If your change breaks the build, this will be shown in GitHub, so please
|
||||
keep an eye on the pull request for feedback.
|
||||
|
||||
To run unit tests in a local development environment, you can use:
|
||||
|
||||
- ``tox -e py27`` (requires tox to be installed by ``pip install tox``) for
|
||||
SQLite-backed Synapse on Python 2.7.
|
||||
- ``tox -e py35`` for SQLite-backed Synapse on Python 3.5.
|
||||
- ``tox -e py36`` for SQLite-backed Synapse on Python 3.6.
|
||||
- ``tox -e py27-postgres`` for PostgreSQL-backed Synapse on Python 2.7
|
||||
(requires a running local PostgreSQL with access to create databases).
|
||||
- ``./test_postgresql.sh`` for PostgreSQL-backed Synapse on Python 2.7
|
||||
(requires Docker). Entirely self-contained, recommended if you don't want to
|
||||
set up PostgreSQL yourself.
|
||||
|
||||
Docker images are available for running the integration tests (SyTest) locally,
|
||||
see the `documentation in the SyTest repo
|
||||
<https://github.com/matrix-org/sytest/blob/develop/docker/README.md>`_ for more
|
||||
information.
|
||||
|
||||
Code style
|
||||
~~~~~~~~~~
|
||||
@@ -77,7 +93,8 @@ AUTHORS.rst file for the project in question. Please feel free to include a
|
||||
change to AUTHORS.rst in your pull request to list yourself and a short
|
||||
description of the area(s) you've worked on. Also, we sometimes have swag to
|
||||
give away to contributors - if you feel that Matrix-branded apparel is missing
|
||||
from your life, please mail us your shipping address to matrix at matrix.org and we'll try to fix it :)
|
||||
from your life, please mail us your shipping address to matrix at matrix.org and
|
||||
we'll try to fix it :)
|
||||
|
||||
Sign off
|
||||
~~~~~~~~
|
||||
@@ -144,4 +161,9 @@ flag to ``git commit``, which uses the name and email set in your
|
||||
Conclusion
|
||||
~~~~~~~~~~
|
||||
|
||||
That's it! Matrix is a very open and collaborative project as you might expect given our obsession with open communication. If we're going to successfully matrix together all the fragmented communication technologies out there we are reliant on contributions and collaboration from the community to do so. So please get involved - and we hope you have as much fun hacking on Matrix as we do!
|
||||
That's it! Matrix is a very open and collaborative project as you might expect
|
||||
given our obsession with open communication. If we're going to successfully
|
||||
matrix together all the fragmented communication technologies out there we are
|
||||
reliant on contributions and collaboration from the community to do so. So
|
||||
please get involved - and we hope you have as much fun hacking on Matrix as we
|
||||
do!
|
||||
|
||||
@@ -28,6 +28,7 @@ exclude jenkins*.sh
|
||||
exclude jenkins*
|
||||
exclude Dockerfile
|
||||
exclude .dockerignore
|
||||
exclude test_postgresql.sh
|
||||
recursive-exclude jenkins *.sh
|
||||
|
||||
include pyproject.toml
|
||||
|
||||
48
README.rst
48
README.rst
@@ -157,7 +157,7 @@ if you prefer.
|
||||
|
||||
In case of problems, please see the _`Troubleshooting` section below.
|
||||
|
||||
There is an offical synapse image available at
|
||||
There is an offical synapse image available at
|
||||
https://hub.docker.com/r/matrixdotorg/synapse/tags/ which can be used with
|
||||
the docker-compose file available at `contrib/docker <contrib/docker>`_. Further information on
|
||||
this including configuration options is available in the README on
|
||||
@@ -459,37 +459,13 @@ https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/misc/matrix-
|
||||
|
||||
Windows Install
|
||||
---------------
|
||||
Synapse can be installed on Cygwin. It requires the following Cygwin packages:
|
||||
|
||||
- gcc
|
||||
- git
|
||||
- libffi-devel
|
||||
- openssl (and openssl-devel, python-openssl)
|
||||
- python
|
||||
- python-setuptools
|
||||
|
||||
The content repository requires additional packages and will be unable to process
|
||||
uploads without them:
|
||||
|
||||
- libjpeg8
|
||||
- libjpeg8-devel
|
||||
- zlib
|
||||
|
||||
If you choose to install Synapse without these packages, you will need to reinstall
|
||||
``pillow`` for changes to be applied, e.g. ``pip uninstall pillow`` ``pip install
|
||||
pillow --user``
|
||||
|
||||
Troubleshooting:
|
||||
|
||||
- You may need to upgrade ``setuptools`` to get this to work correctly:
|
||||
``pip install setuptools --upgrade``.
|
||||
- You may encounter errors indicating that ``ffi.h`` is missing, even with
|
||||
``libffi-devel`` installed. If you do, copy the ``.h`` files:
|
||||
``cp /usr/lib/libffi-3.0.13/include/*.h /usr/include``
|
||||
- You may need to install libsodium from source in order to install PyNacl. If
|
||||
you do, you may need to create a symlink to ``libsodium.a`` so ``ld`` can find
|
||||
it: ``ln -s /usr/local/lib/libsodium.a /usr/lib/libsodium.a``
|
||||
|
||||
If you wish to run or develop Synapse on Windows, the Windows Subsystem For
|
||||
Linux provides a Linux environment on Windows 10 which is capable of using the
|
||||
Debian, Fedora, or source installation methods. More information about WSL can
|
||||
be found at https://docs.microsoft.com/en-us/windows/wsl/install-win10 for
|
||||
Windows 10 and https://docs.microsoft.com/en-us/windows/wsl/install-on-server
|
||||
for Windows Server.
|
||||
|
||||
Troubleshooting
|
||||
===============
|
||||
@@ -908,7 +884,7 @@ to install using pip and a virtualenv::
|
||||
|
||||
virtualenv -p python2.7 env
|
||||
source env/bin/activate
|
||||
python synapse/python_dependencies.py | xargs pip install
|
||||
python -m synapse.python_dependencies | xargs pip install
|
||||
pip install lxml mock
|
||||
|
||||
This will run a process of downloading and installing all the needed
|
||||
@@ -963,5 +939,13 @@ variable. The default is 0.5, which can be decreased to reduce RAM usage
|
||||
in memory constrained enviroments, or increased if performance starts to
|
||||
degrade.
|
||||
|
||||
Using `libjemalloc <http://jemalloc.net/>`_ can also yield a significant
|
||||
improvement in overall amount, and especially in terms of giving back RAM
|
||||
to the OS. To use it, the library must simply be put in the LD_PRELOAD
|
||||
environment variable when launching Synapse. On Debian, this can be done
|
||||
by installing the ``libjemalloc1`` package and adding this line to
|
||||
``/etc/default/matrix-synapse``::
|
||||
|
||||
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1
|
||||
|
||||
.. _`key_management`: https://matrix.org/docs/spec/server_server/unstable.html#retrieving-server-keys
|
||||
|
||||
1
changelog.d/3578.bugfix
Normal file
1
changelog.d/3578.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix problem when playing media from Chrome using direct URL (thanks @remjey!)
|
||||
2
changelog.d/3699.misc
Normal file
2
changelog.d/3699.misc
Normal file
@@ -0,0 +1,2 @@
|
||||
Unit tests can now be run under PostgreSQL in Docker using
|
||||
``test_postgresql.sh``.
|
||||
@@ -1 +0,0 @@
|
||||
CircleCI tests now run on the potential merge of a PR.
|
||||
@@ -1 +0,0 @@
|
||||
http/ is now ported to Python 3.
|
||||
@@ -1 +0,0 @@
|
||||
Remove connection ID for replication prometheus metrics, as it creates a large number of new series.
|
||||
@@ -1 +0,0 @@
|
||||
Improve human readable error messages for threepid registration/account update
|
||||
@@ -1 +0,0 @@
|
||||
Implement `event_format` filter param in `/sync`
|
||||
1
changelog.d/3794.misc
Normal file
1
changelog.d/3794.misc
Normal file
@@ -0,0 +1 @@
|
||||
Speed up calculation of typing updates for replication
|
||||
@@ -1 +0,0 @@
|
||||
Make /sync slightly faster by avoiding needless copies
|
||||
@@ -1 +0,0 @@
|
||||
guest users should not be part of mau total
|
||||
@@ -1 +0,0 @@
|
||||
handlers/ is now ported to Python 3.
|
||||
@@ -1 +0,0 @@
|
||||
Bump dependency on pyopenssl 16.x, to avoid incompatibility with recent Twisted.
|
||||
@@ -1 +0,0 @@
|
||||
Limit the number of PDUs/EDUs per federation transaction
|
||||
@@ -1 +0,0 @@
|
||||
Only start postgres instance for postgres tests on Travis CI
|
||||
@@ -1 +0,0 @@
|
||||
tests/ is now ported to Python 3.
|
||||
@@ -1 +0,0 @@
|
||||
Fix existing room tags not coming down sync when joining a room
|
||||
@@ -1 +0,0 @@
|
||||
crypto/ is now ported to Python 3.
|
||||
@@ -1 +0,0 @@
|
||||
rest/ is now ported to Python 3.
|
||||
@@ -1 +0,0 @@
|
||||
Fix jwt import check
|
||||
@@ -1 +0,0 @@
|
||||
add some logging for the keyring queue
|
||||
@@ -1 +0,0 @@
|
||||
speed up lazy loading by 2-3x
|
||||
@@ -1 +0,0 @@
|
||||
Improved Dockerfile to remove build requirements after building reducing the image size.
|
||||
@@ -1 +0,0 @@
|
||||
fix VOIP crashes under Python 3 (#3821)
|
||||
1
changelog.d/3836.bugfix
Normal file
1
changelog.d/3836.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
support registering regular users non-interactively with register_new_matrix_user script
|
||||
@@ -1 +0,0 @@
|
||||
Disable lazy loading for incremental syncs for now
|
||||
@@ -1 +0,0 @@
|
||||
Fix manhole so that it works with latest openssh clients
|
||||
@@ -1 +0,0 @@
|
||||
Fix outbound requests occasionally wedging, which can result in federation breaking between servers.
|
||||
@@ -1 +0,0 @@
|
||||
Add synapse_admin_mau:registered_reserved_users metric to expose number of real reaserved users
|
||||
@@ -1 +0,0 @@
|
||||
federation/ is now ported to Python 3.
|
||||
@@ -1 +0,0 @@
|
||||
Show heroes if room name/canonical alias has been deleted
|
||||
@@ -1 +0,0 @@
|
||||
Log when we retry outbound requests
|
||||
1
changelog.d/3868.bugfix
Normal file
1
changelog.d/3868.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix broken invite email links for self hosted riots
|
||||
2
changelog.d/3873.misc
Normal file
2
changelog.d/3873.misc
Normal file
@@ -0,0 +1,2 @@
|
||||
Remove documentation regarding installation on Cygwin, the use of WSL is
|
||||
recommended instead.
|
||||
1
changelog.d/3879.bugfix
Normal file
1
changelog.d/3879.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Don't ratelimit autojoins
|
||||
1
changelog.d/3883.feature
Normal file
1
changelog.d/3883.feature
Normal file
@@ -0,0 +1 @@
|
||||
Adding the ability to change MAX_UPLOAD_SIZE for the docker container variables.
|
||||
1
changelog.d/3889.bugfix
Normal file
1
changelog.d/3889.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix 500 error when deleting unknown room alias
|
||||
1
changelog.d/3892.bugfix
Normal file
1
changelog.d/3892.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix some b'abcd' noise in logs and metrics
|
||||
1
changelog.d/3894.feature
Normal file
1
changelog.d/3894.feature
Normal file
@@ -0,0 +1 @@
|
||||
Report "python_version" in the phone home stats
|
||||
1
changelog.d/3895.bugfix
Normal file
1
changelog.d/3895.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix some b'abcd' noise in logs and metrics
|
||||
1
changelog.d/3897.misc
Normal file
1
changelog.d/3897.misc
Normal file
@@ -0,0 +1 @@
|
||||
Fix typo in README, synaspse -> synapse
|
||||
1
changelog.d/3899.bugfix
Normal file
1
changelog.d/3899.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
When we join a room, always try the server we used for the alias lookup first, to avoid unresponsive and out-of-date servers.
|
||||
1
changelog.d/3903.misc
Normal file
1
changelog.d/3903.misc
Normal file
@@ -0,0 +1 @@
|
||||
Increase the timeout when filling missing events in federation requests
|
||||
1
changelog.d/3904.misc
Normal file
1
changelog.d/3904.misc
Normal file
@@ -0,0 +1 @@
|
||||
Improve the logging when handling a federation transaction
|
||||
1
changelog.d/3906.misc
Normal file
1
changelog.d/3906.misc
Normal file
@@ -0,0 +1 @@
|
||||
Improve logging of outbound federation requests
|
||||
1
changelog.d/3907.bugfix
Normal file
1
changelog.d/3907.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix incorrect server-name indication for outgoing federation requests
|
||||
1
changelog.d/3908.bugfix
Normal file
1
changelog.d/3908.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix adding client IPs to the database failing on Python 3.
|
||||
1
changelog.d/3909.misc
Normal file
1
changelog.d/3909.misc
Normal file
@@ -0,0 +1 @@
|
||||
Improve logging of outbound federation requests
|
||||
1
changelog.d/3910.bugfix
Normal file
1
changelog.d/3910.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix bug where things occaisonally were not being timed out correctly.
|
||||
1
changelog.d/3911.misc
Normal file
1
changelog.d/3911.misc
Normal file
@@ -0,0 +1 @@
|
||||
Fix the docker image building on python 3
|
||||
1
changelog.d/3912.misc
Normal file
1
changelog.d/3912.misc
Normal file
@@ -0,0 +1 @@
|
||||
Add a regression test for logging failed HTTP requests on Python 3.
|
||||
1
changelog.d/3914.bugfix
Normal file
1
changelog.d/3914.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix bug where outbound federation would stop talking to some servers when using workers
|
||||
1
changelog.d/3916.feature
Normal file
1
changelog.d/3916.feature
Normal file
@@ -0,0 +1 @@
|
||||
Always LL ourselves if we're in a room
|
||||
1
changelog.d/3924.misc
Normal file
1
changelog.d/3924.misc
Normal file
@@ -0,0 +1 @@
|
||||
Comments and interface cleanup for on_receive_pdu
|
||||
1
changelog.d/3925.misc
Normal file
1
changelog.d/3925.misc
Normal file
@@ -0,0 +1 @@
|
||||
Fix spurious exceptions when remote http client closes conncetion
|
||||
1
changelog.d/3927.misc
Normal file
1
changelog.d/3927.misc
Normal file
@@ -0,0 +1 @@
|
||||
Log exceptions thrown by background tasks
|
||||
1
changelog.d/3932.bugfix
Normal file
1
changelog.d/3932.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix some instances of ExpiringCache not expiring cache items
|
||||
1
changelog.d/3936.bugfix
Normal file
1
changelog.d/3936.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix out-of-bounds error when LLing yourself
|
||||
1
changelog.d/3946.misc
Normal file
1
changelog.d/3946.misc
Normal file
@@ -0,0 +1 @@
|
||||
Automate pushes to docker hub
|
||||
1
changelog.d/3947.misc
Normal file
1
changelog.d/3947.misc
Normal file
@@ -0,0 +1 @@
|
||||
Require attrs 16.0.0 or later
|
||||
1
changelog.d/3948.misc
Normal file
1
changelog.d/3948.misc
Normal file
@@ -0,0 +1 @@
|
||||
Fix incompatibility with python3 on alpine
|
||||
1
changelog.d/3952.misc
Normal file
1
changelog.d/3952.misc
Normal file
@@ -0,0 +1 @@
|
||||
Run the test suite on the oldest supported versions of our dependencies in CI.
|
||||
1
changelog.d/3956.bugfix
Normal file
1
changelog.d/3956.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix exceptions from metrics handler
|
||||
1
changelog.d/3957.misc
Normal file
1
changelog.d/3957.misc
Normal file
@@ -0,0 +1 @@
|
||||
CircleCI now only runs merged jobs on PRs, and commit jobs on develop, master, and release branches.
|
||||
1
changelog.d/3958.misc
Normal file
1
changelog.d/3958.misc
Normal file
@@ -0,0 +1 @@
|
||||
Fix docstrings and add tests for state store methods
|
||||
1
changelog.d/3959.feature
Normal file
1
changelog.d/3959.feature
Normal file
@@ -0,0 +1 @@
|
||||
Include eventid in log lines when processing incoming federation transactions
|
||||
1
changelog.d/3961.bugfix
Normal file
1
changelog.d/3961.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix errors due to concurrent monthly_active_user upserts
|
||||
1
changelog.d/3963.misc
Normal file
1
changelog.d/3963.misc
Normal file
@@ -0,0 +1 @@
|
||||
fix docstring for FederationClient.get_state_for_room
|
||||
1
changelog.d/3965.misc
Normal file
1
changelog.d/3965.misc
Normal file
@@ -0,0 +1 @@
|
||||
Run notify_app_services as a bg process
|
||||
1
changelog.d/3966.misc
Normal file
1
changelog.d/3966.misc
Normal file
@@ -0,0 +1 @@
|
||||
Improve the logging when handling a federation transaction
|
||||
1
changelog.d/3967.misc
Normal file
1
changelog.d/3967.misc
Normal file
@@ -0,0 +1 @@
|
||||
Clarifications in FederationHandler
|
||||
1
changelog.d/3970.bugfix
Normal file
1
changelog.d/3970.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Replaced all occurences of e.message with str(e). Contributed by Schnuffle
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
||||
FROM docker.io/python:2-alpine3.8
|
||||
ARG PYTHON_VERSION=2
|
||||
FROM docker.io/python:${PYTHON_VERSION}-alpine3.8
|
||||
|
||||
COPY . /synapse
|
||||
|
||||
|
||||
12
docker/Dockerfile-pgtests
Normal file
12
docker/Dockerfile-pgtests
Normal file
@@ -0,0 +1,12 @@
|
||||
# Use the Sytest image that comes with a lot of the build dependencies
|
||||
# pre-installed
|
||||
FROM matrixdotorg/sytest:latest
|
||||
|
||||
# The Sytest image doesn't come with python, so install that
|
||||
RUN apt-get -qq install -y python python-dev python-pip
|
||||
|
||||
# We need tox to run the tests in run_pg_tests.sh
|
||||
RUN pip install tox
|
||||
|
||||
ADD run_pg_tests.sh /pg_tests.sh
|
||||
ENTRYPOINT /pg_tests.sh
|
||||
@@ -88,6 +88,7 @@ variables are available for configuration:
|
||||
* ``SYNAPSE_TURN_URIS``, set this variable to the coma-separated list of TURN
|
||||
uris to enable TURN for this homeserver.
|
||||
* ``SYNAPSE_TURN_SECRET``, set this to the TURN shared secret if required.
|
||||
* ``SYNAPSE_MAX_UPLOAD_SIZE``, set this variable to change the max upload size [default `10M`].
|
||||
|
||||
Shared secrets, that will be initialized to random values if not set:
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ federation_rc_concurrent: 3
|
||||
|
||||
media_store_path: "/data/media"
|
||||
uploads_path: "/data/uploads"
|
||||
max_upload_size: "10M"
|
||||
max_upload_size: "{{ SYNAPSE_MAX_UPLOAD_SIZE or "10M" }}"
|
||||
max_image_pixels: "32M"
|
||||
dynamic_thumbnails: false
|
||||
|
||||
|
||||
20
docker/run_pg_tests.sh
Executable file
20
docker/run_pg_tests.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script runs the PostgreSQL tests inside a Docker container. It expects
|
||||
# the relevant source files to be mounted into /src (done automatically by the
|
||||
# caller script). It will set up the database, run it, and then use the tox
|
||||
# configuration to run the tests.
|
||||
|
||||
set -e
|
||||
|
||||
# Set PGUSER so Synapse's tests know what user to connect to the database with
|
||||
export PGUSER=postgres
|
||||
|
||||
# Initialise & start the database
|
||||
su -c '/usr/lib/postgresql/9.6/bin/initdb -D /var/lib/postgresql/data -E "UTF-8" --lc-collate="en_US.UTF-8" --lc-ctype="en_US.UTF-8" --username=postgres' postgres
|
||||
su -c '/usr/lib/postgresql/9.6/bin/pg_ctl -w -D /var/lib/postgresql/data start' postgres
|
||||
|
||||
# Run the tests
|
||||
cd /src
|
||||
export TRIAL_FLAGS="-j 4"
|
||||
tox --workdir=/tmp -e py27-postgres
|
||||
@@ -5,6 +5,7 @@ import os
|
||||
import sys
|
||||
import subprocess
|
||||
import glob
|
||||
import codecs
|
||||
|
||||
# Utility functions
|
||||
convert = lambda src, dst, environ: open(dst, "w").write(jinja2.Template(open(src).read()).render(**environ))
|
||||
@@ -23,7 +24,7 @@ def generate_secrets(environ, secrets):
|
||||
with open(filename) as handle: value = handle.read()
|
||||
else:
|
||||
print("Generating a random secret for {}".format(name))
|
||||
value = os.urandom(32).encode("hex")
|
||||
value = codecs.encode(os.urandom(32), "hex").decode()
|
||||
with open(filename, "w") as handle: handle.write(value)
|
||||
environ[secret] = value
|
||||
|
||||
|
||||
@@ -21,4 +21,4 @@ try:
|
||||
verifier.verify(macaroon, key)
|
||||
print "Signature is correct"
|
||||
except Exception as e:
|
||||
print e.message
|
||||
print str(e)
|
||||
|
||||
9
scripts-dev/next_github_number.sh
Executable file
9
scripts-dev/next_github_number.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Fetch the current GitHub issue number, add one to it -- presto! The likely
|
||||
# next PR number.
|
||||
CURRENT_NUMBER=`curl -s "https://api.github.com/repos/matrix-org/synapse/issues?state=all&per_page=1" | jq -r ".[0].number"`
|
||||
CURRENT_NUMBER=$((CURRENT_NUMBER+1))
|
||||
echo $CURRENT_NUMBER
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
## CAUTION:
|
||||
## This script will remove (hopefully) all trace of the given room ID from
|
||||
## your homeserver.db
|
||||
|
||||
## Do not run it lightly.
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" == "-h" ] || [ "$1" == "" ]; then
|
||||
echo "Call with ROOM_ID as first option and then pipe it into the database. So for instance you might run"
|
||||
echo " nuke-room-from-db.sh <room_id> | sqlite3 homeserver.db"
|
||||
echo "or"
|
||||
echo " nuke-room-from-db.sh <room_id> | psql --dbname=synapse"
|
||||
exit
|
||||
fi
|
||||
|
||||
ROOMID="$1"
|
||||
|
||||
cat <<EOF
|
||||
DELETE FROM event_forward_extremities WHERE room_id = '$ROOMID';
|
||||
DELETE FROM event_backward_extremities WHERE room_id = '$ROOMID';
|
||||
DELETE FROM event_edges WHERE room_id = '$ROOMID';
|
||||
DELETE FROM room_depth WHERE room_id = '$ROOMID';
|
||||
DELETE FROM state_forward_extremities WHERE room_id = '$ROOMID';
|
||||
DELETE FROM events WHERE room_id = '$ROOMID';
|
||||
DELETE FROM event_json WHERE room_id = '$ROOMID';
|
||||
DELETE FROM state_events WHERE room_id = '$ROOMID';
|
||||
DELETE FROM current_state_events WHERE room_id = '$ROOMID';
|
||||
DELETE FROM room_memberships WHERE room_id = '$ROOMID';
|
||||
DELETE FROM feedback WHERE room_id = '$ROOMID';
|
||||
DELETE FROM topics WHERE room_id = '$ROOMID';
|
||||
DELETE FROM room_names WHERE room_id = '$ROOMID';
|
||||
DELETE FROM rooms WHERE room_id = '$ROOMID';
|
||||
DELETE FROM room_hosts WHERE room_id = '$ROOMID';
|
||||
DELETE FROM room_aliases WHERE room_id = '$ROOMID';
|
||||
DELETE FROM state_groups WHERE room_id = '$ROOMID';
|
||||
DELETE FROM state_groups_state WHERE room_id = '$ROOMID';
|
||||
DELETE FROM receipts_graph WHERE room_id = '$ROOMID';
|
||||
DELETE FROM receipts_linearized WHERE room_id = '$ROOMID';
|
||||
DELETE FROM event_search WHERE room_id = '$ROOMID';
|
||||
DELETE FROM guest_access WHERE room_id = '$ROOMID';
|
||||
DELETE FROM history_visibility WHERE room_id = '$ROOMID';
|
||||
DELETE FROM room_tags WHERE room_id = '$ROOMID';
|
||||
DELETE FROM room_tags_revisions WHERE room_id = '$ROOMID';
|
||||
DELETE FROM room_account_data WHERE room_id = '$ROOMID';
|
||||
DELETE FROM event_push_actions WHERE room_id = '$ROOMID';
|
||||
DELETE FROM local_invites WHERE room_id = '$ROOMID';
|
||||
DELETE FROM pusher_throttle WHERE room_id = '$ROOMID';
|
||||
DELETE FROM event_reports WHERE room_id = '$ROOMID';
|
||||
DELETE FROM public_room_list_stream WHERE room_id = '$ROOMID';
|
||||
DELETE FROM stream_ordering_to_exterm WHERE room_id = '$ROOMID';
|
||||
DELETE FROM event_auth WHERE room_id = '$ROOMID';
|
||||
DELETE FROM appservice_room_list WHERE room_id = '$ROOMID';
|
||||
VACUUM;
|
||||
EOF
|
||||
@@ -133,7 +133,7 @@ def register_new_user(user, password, server_location, shared_secret, admin):
|
||||
print "Passwords do not match"
|
||||
sys.exit(1)
|
||||
|
||||
if not admin:
|
||||
if admin is None:
|
||||
admin = raw_input("Make admin [no]: ")
|
||||
if admin in ("y", "yes", "true"):
|
||||
admin = True
|
||||
@@ -160,10 +160,16 @@ if __name__ == "__main__":
|
||||
default=None,
|
||||
help="New password for user. Will prompt if omitted.",
|
||||
)
|
||||
parser.add_argument(
|
||||
admin_group = parser.add_mutually_exclusive_group()
|
||||
admin_group.add_argument(
|
||||
"-a", "--admin",
|
||||
action="store_true",
|
||||
help="Register new user as an admin. Will prompt if omitted.",
|
||||
help="Register new user as an admin. Will prompt if --no-admin is not set either.",
|
||||
)
|
||||
admin_group.add_argument(
|
||||
"--no-admin",
|
||||
action="store_true",
|
||||
help="Register new user as a regular user. Will prompt if --admin is not set either.",
|
||||
)
|
||||
|
||||
group = parser.add_mutually_exclusive_group(required=True)
|
||||
@@ -197,4 +203,8 @@ if __name__ == "__main__":
|
||||
else:
|
||||
secret = args.shared_secret
|
||||
|
||||
register_new_user(args.user, args.password, args.server_url, secret, args.admin)
|
||||
admin = None
|
||||
if args.admin or args.no_admin:
|
||||
admin = args.admin
|
||||
|
||||
register_new_user(args.user, args.password, args.server_url, secret, admin)
|
||||
|
||||
@@ -17,4 +17,14 @@
|
||||
""" This is a reference implementation of a Matrix home server.
|
||||
"""
|
||||
|
||||
__version__ = "0.33.4"
|
||||
try:
|
||||
from twisted.internet import protocol
|
||||
from twisted.internet.protocol import Factory
|
||||
from twisted.names.dns import DNSDatagramProtocol
|
||||
protocol.Factory.noisy = False
|
||||
Factory.noisy = False
|
||||
DNSDatagramProtocol.noisy = False
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
__version__ = "0.33.5.1"
|
||||
|
||||
@@ -226,7 +226,7 @@ class Filtering(object):
|
||||
jsonschema.validate(user_filter_json, USER_FILTER_SCHEMA,
|
||||
format_checker=FormatChecker())
|
||||
except jsonschema.ValidationError as e:
|
||||
raise SynapseError(400, e.message)
|
||||
raise SynapseError(400, str(e))
|
||||
|
||||
|
||||
class FilterCollection(object):
|
||||
|
||||
@@ -24,7 +24,7 @@ try:
|
||||
python_dependencies.check_requirements()
|
||||
except python_dependencies.MissingRequirementError as e:
|
||||
message = "\n".join([
|
||||
"Missing Requirement: %s" % (e.message,),
|
||||
"Missing Requirement: %s" % (str(e),),
|
||||
"To install run:",
|
||||
" pip install --upgrade --force \"%s\"" % (e.dependency,),
|
||||
"",
|
||||
|
||||
@@ -136,7 +136,7 @@ def start(config_options):
|
||||
"Synapse appservice", config_options
|
||||
)
|
||||
except ConfigError as e:
|
||||
sys.stderr.write("\n" + e.message + "\n")
|
||||
sys.stderr.write("\n" + str(e) + "\n")
|
||||
sys.exit(1)
|
||||
|
||||
assert config.worker_app == "synapse.app.appservice"
|
||||
@@ -172,7 +172,6 @@ def start(config_options):
|
||||
|
||||
def start():
|
||||
ps.get_datastore().start_profiling()
|
||||
ps.get_state_handler().start_caching()
|
||||
|
||||
reactor.callWhenRunning(start)
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ def start(config_options):
|
||||
"Synapse client reader", config_options
|
||||
)
|
||||
except ConfigError as e:
|
||||
sys.stderr.write("\n" + e.message + "\n")
|
||||
sys.stderr.write("\n" + str(e) + "\n")
|
||||
sys.exit(1)
|
||||
|
||||
assert config.worker_app == "synapse.app.client_reader"
|
||||
@@ -181,7 +181,6 @@ def start(config_options):
|
||||
ss.start_listening(config.worker_listeners)
|
||||
|
||||
def start():
|
||||
ss.get_state_handler().start_caching()
|
||||
ss.get_datastore().start_profiling()
|
||||
|
||||
reactor.callWhenRunning(start)
|
||||
|
||||
@@ -169,7 +169,7 @@ def start(config_options):
|
||||
"Synapse event creator", config_options
|
||||
)
|
||||
except ConfigError as e:
|
||||
sys.stderr.write("\n" + e.message + "\n")
|
||||
sys.stderr.write("\n" + str(e) + "\n")
|
||||
sys.exit(1)
|
||||
|
||||
assert config.worker_app == "synapse.app.event_creator"
|
||||
@@ -199,7 +199,6 @@ def start(config_options):
|
||||
ss.start_listening(config.worker_listeners)
|
||||
|
||||
def start():
|
||||
ss.get_state_handler().start_caching()
|
||||
ss.get_datastore().start_profiling()
|
||||
|
||||
reactor.callWhenRunning(start)
|
||||
|
||||
@@ -140,7 +140,7 @@ def start(config_options):
|
||||
"Synapse federation reader", config_options
|
||||
)
|
||||
except ConfigError as e:
|
||||
sys.stderr.write("\n" + e.message + "\n")
|
||||
sys.stderr.write("\n" + str(e) + "\n")
|
||||
sys.exit(1)
|
||||
|
||||
assert config.worker_app == "synapse.app.federation_reader"
|
||||
@@ -168,7 +168,6 @@ def start(config_options):
|
||||
ss.start_listening(config.worker_listeners)
|
||||
|
||||
def start():
|
||||
ss.get_state_handler().start_caching()
|
||||
ss.get_datastore().start_profiling()
|
||||
|
||||
reactor.callWhenRunning(start)
|
||||
|
||||
@@ -160,7 +160,7 @@ def start(config_options):
|
||||
"Synapse federation sender", config_options
|
||||
)
|
||||
except ConfigError as e:
|
||||
sys.stderr.write("\n" + e.message + "\n")
|
||||
sys.stderr.write("\n" + str(e) + "\n")
|
||||
sys.exit(1)
|
||||
|
||||
assert config.worker_app == "synapse.app.federation_sender"
|
||||
@@ -201,7 +201,6 @@ def start(config_options):
|
||||
|
||||
def start():
|
||||
ps.get_datastore().start_profiling()
|
||||
ps.get_state_handler().start_caching()
|
||||
|
||||
reactor.callWhenRunning(start)
|
||||
_base.start_worker_reactor("synapse-federation-sender", config)
|
||||
|
||||
@@ -228,7 +228,7 @@ def start(config_options):
|
||||
"Synapse frontend proxy", config_options
|
||||
)
|
||||
except ConfigError as e:
|
||||
sys.stderr.write("\n" + e.message + "\n")
|
||||
sys.stderr.write("\n" + str(e) + "\n")
|
||||
sys.exit(1)
|
||||
|
||||
assert config.worker_app == "synapse.app.frontend_proxy"
|
||||
@@ -258,7 +258,6 @@ def start(config_options):
|
||||
ss.start_listening(config.worker_listeners)
|
||||
|
||||
def start():
|
||||
ss.get_state_handler().start_caching()
|
||||
ss.get_datastore().start_profiling()
|
||||
|
||||
reactor.callWhenRunning(start)
|
||||
|
||||
@@ -301,7 +301,7 @@ class SynapseHomeServer(HomeServer):
|
||||
try:
|
||||
database_engine.check_database(db_conn.cursor())
|
||||
except IncorrectDatabaseSetup as e:
|
||||
quit_with_error(e.message)
|
||||
quit_with_error(str(e))
|
||||
|
||||
|
||||
# Gauges to expose monthly active user control metrics
|
||||
@@ -328,7 +328,7 @@ def setup(config_options):
|
||||
config_options,
|
||||
)
|
||||
except ConfigError as e:
|
||||
sys.stderr.write("\n" + e.message + "\n")
|
||||
sys.stderr.write("\n" + str(e) + "\n")
|
||||
sys.exit(1)
|
||||
|
||||
if not config:
|
||||
@@ -384,7 +384,6 @@ def setup(config_options):
|
||||
|
||||
def start():
|
||||
hs.get_pusherpool().start()
|
||||
hs.get_state_handler().start_caching()
|
||||
hs.get_datastore().start_profiling()
|
||||
hs.get_datastore().start_doing_background_updates()
|
||||
hs.get_federation_client().start_get_pdu_cache()
|
||||
@@ -457,6 +456,10 @@ def run(hs):
|
||||
stats["homeserver"] = hs.config.server_name
|
||||
stats["timestamp"] = now
|
||||
stats["uptime_seconds"] = uptime
|
||||
version = sys.version_info
|
||||
stats["python_version"] = "{}.{}.{}".format(
|
||||
version.major, version.minor, version.micro
|
||||
)
|
||||
stats["total_users"] = yield hs.get_datastore().count_all_users()
|
||||
|
||||
total_nonbridged_users = yield hs.get_datastore().count_nonbridged_users()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user