Richard van der Hoff
7c2f8881a9
Ensure that all config options have sensible defaults
...
This will enable us to skip the unintuitive behaviour where the generated
config and default config are the same thing.
2019-06-24 14:14:52 +01:00
Richard van der Hoff
367a8263b3
Remove unused Config.config_dir_path attribute
...
This is no longer used and only serves to confuse.
2019-06-24 13:51:22 +01:00
Richard van der Hoff
edea4bb5be
Allow configuration of the path used for ACME account keys.
...
Because sticking it in the same place as the config isn't necessarily the right
thing to do.
2019-06-24 13:51:22 +01:00
Richard van der Hoff
c3c6b00d95
Pass config_dir_path and data_dir_path into Config.read_config. ( #5522 )
...
* Pull config_dir_path and data_dir_path calculation out of read_config_files
* Pass config_dir_path and data_dir_path into read_config
2019-06-24 11:34:45 +01:00
Richard van der Hoff
21bf4318b5
Factor acme bits out to a separate file ( #5521 )
...
This makes some of the conditional-import hoop-jumping easier.
2019-06-24 11:33:56 +01:00
Richard van der Hoff
c753c098dd
Merge pull request #5498 from matrix-org/rav/fix_clock_reversal
...
Use monotonic clock where possible for metrics
2019-06-24 09:55:12 +01:00
Richard van der Hoff
6cda36777b
Drop support for cpu_affinity ( #5525 )
...
This has no useful purpose on python3, and is generally a source of confusion.
2019-06-22 11:01:55 +10:00
Richard van der Hoff
e1a795758c
Improve help and cmdline option names for --generate-config options ( #5512 )
...
* group the arguments together into a group
* add new names "--generate-missing-config" and "--config-directory" for
existing cmdline options "--generate-keys" and "--keys-dir", which better
reflect their purposes.
2019-06-21 18:50:43 +01:00
Richard van der Hoff
03cea2b0fe
Refactor Config parser and add some comments. ( #5511 )
...
Add some comments, and simplify `read_config_files`.
2019-06-21 17:43:38 +01:00
Richard van der Hoff
37933a3bf8
Improve logging when generating config files ( #5510 )
...
Make it a bit clearer what's going on.
2019-06-21 17:14:56 +01:00
Andrew Morgan
5d6644efe0
Only import jinja2 when needed ( #5514 )
...
Fixes https://github.com/matrix-org/synapse/issues/5431
`jinja2` was being imported even when it wasn't strictly necessary. This made it required to run Synapse, even if the functionality that required it wasn't enabled. This was causing new Synapse installations to crash on startup.
Email modules are now required.
2019-06-21 16:52:09 +01:00
Richard van der Hoff
0e8b35f7b0
Fix "Unexpected entry in 'full_schemas'" log warning ( #5509 )
...
There is a README.txt which always sets off this warning, which is a bit
alarming when you first start synapse. I don't think we need to warn about
this.
2019-06-21 15:11:57 +01:00
Richard van der Hoff
2f8491daef
Fix logging error when a tampered event is detected. ( #5500 )
2019-06-21 15:11:42 +01:00
Erik Johnston
7eadb74056
Fix /messages on worker when no token supplied
2019-06-21 14:15:59 +01:00
Erik Johnston
f3ab533374
Support pagination API in client_reader worker
2019-06-21 10:43:12 +01:00
Erik Johnston
7456698241
Merge pull request #5476 from matrix-org/erikj/histogram_extremities
...
Add metrics for length of new extremities persisted.
2019-06-21 09:58:54 +01:00
Neil Johnson
f47969f42a
Improve email notification logging ( #5502 )
2019-06-20 15:14:26 +01:00
Erik Johnston
f8bd30af2a
Black
2019-06-20 13:10:06 +01:00
Erik Johnston
45f28a9d2f
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/histogram_extremities
2019-06-20 11:59:14 +01:00
Amber Brown
32e7c9e7f2
Run Black. ( #5482 )
2019-06-20 19:32:02 +10:00
Richard van der Hoff
15bf32e062
Use monotonic clock where possible for metrics
...
Fixes intermittent errors observed on Apple hardware which were caused by
time.clock() appearing to go backwards when called from different threads.
Also fixes a bug where database activity times were logged as 1/1000 of their
correct ratio due to confusion between milliseconds and seconds.
2019-06-19 21:09:43 +01:00
Erik Johnston
7dcf984075
Merge pull request #5042 from matrix-org/erikj/fix_get_missing_events_error
...
Handle the case of `get_missing_events` failing
2019-06-19 13:20:09 +01:00
Erik Johnston
e0be8d7016
Merge pull request #5480 from matrix-org/erikj/extremities_dummy_events
...
Add experimental option to reduce extremities.
2019-06-19 13:19:18 +01:00
Erik Johnston
65787b0f7c
Add descriptions and remove redundant set(..)
2019-06-19 11:49:39 +01:00
Erik Johnston
554609288b
Run as background process and fix comments
2019-06-19 11:33:03 +01:00
Brendan Abolivier
092e36457a
Fix typo in deactivation background job
2019-06-19 11:09:41 +01:00
David Baker
f2d2ae03da
Add some logging to 3pid invite sig verification ( #5015 )
...
I had to add quite a lot of logging to diagnose a problem with 3pid
invites - we only logged the one failure which isn't all that
informative.
NB. I'm not convinced the logic of this loop is right: I think it
should just accept a single valid signature from a trusted source
rather than fail if *any* signature is invalid. Also it should
probably not skip the rest of middle loop if a check fails? However,
I'm deliberately not changing the logic here.
2019-06-18 22:51:24 +01:00
Erik Johnston
2b20d0fb59
Fix logline
2019-06-18 16:12:53 +01:00
Erik Johnston
19b80fe68a
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/fix_get_missing_events_error
2019-06-18 16:11:43 +01:00
Erik Johnston
b42f90470f
Add experimental option to reduce extremities.
...
Adds new config option `cleanup_extremities_with_dummy_events` which
periodically sends dummy events to rooms with more than 10 extremities.
THIS IS REALLY EXPERIMENTAL.
2019-06-18 15:02:18 +01:00
Erik Johnston
16a3124b76
Only count non-cache state resolution
2019-06-18 13:02:06 +01:00
Erik Johnston
c9385dd238
Use consistent buckets
2019-06-18 12:43:41 +01:00
Brendan Abolivier
d6328e03fd
Merge pull request #5477 from matrix-org/babolivier/third_party_rules_3pid
...
Add third party rules hook for 3PID invites
2019-06-17 18:08:31 +01:00
Brendan Abolivier
33ea87be39
Make check_threepid_can_be_invited async
2019-06-17 17:39:38 +01:00
Brendan Abolivier
112cf5a73a
Add third party rules hook for 3PID invites
2019-06-17 17:39:09 +01:00
Erik Johnston
8353ddd951
Merge pull request #5479 from matrix-org/erikj/add_create_room_hook_develop
...
Add third party rules hook into create room
2019-06-17 17:30:05 +01:00
Erik Johnston
ff88d36dcb
Add metric fo number of state groups in resolution
2019-06-17 17:02:53 +01:00
Erik Johnston
499d4a32cd
Add metrics for len of new extremities persisted.
...
Of new events being persisted add metrics for total size of forward
extremities and number of unchanged, "stale" extremities.
2019-06-17 17:02:48 +01:00
Erik Johnston
187d2837a9
Add third party rules hook into create room
2019-06-17 16:41:19 +01:00
Amber Brown
eba7caf09f
Remove Postgres 9.4 support ( #5448 )
2019-06-18 00:59:00 +10:00
Erik Johnston
6840ebeef8
Merge pull request #5385 from matrix-org/erikj/reduce_http_exceptions
...
Handle HttpResponseException when using federation client.
2019-06-17 13:54:47 +01:00
Erik Johnston
dd927b29e1
Merge pull request #5388 from matrix-org/erikj/fix_email_push
...
Fix email notifications for unnamed rooms with multiple people
2019-06-17 13:54:35 +01:00
Erik Johnston
414d2ca3a6
Merge pull request #5389 from matrix-org/erikj/renew_attestations_on_master
...
Only start background group attestation renewals on master
2019-06-17 13:54:29 +01:00
Erik Johnston
a9dab970b8
Merge pull request #5464 from matrix-org/erikj/3pid_remote_invite_state
...
Fix 3PID invite room state over federation.
2019-06-17 10:18:28 +01:00
Brendan Abolivier
f12e1f029c
Merge pull request #5440 from matrix-org/babolivier/third_party_event_rules
...
Allow server admins to define implementations of extra rules for allowing or denying incoming events
2019-06-14 19:37:59 +01:00
Erik Johnston
9ca4ae7131
Merge pull request #5461 from matrix-org/erikj/histograms_are_cumalitive
...
Prometheus histograms are cumalative
2019-06-14 18:21:42 +01:00
Brendan Abolivier
f874b16b2e
Add plugin APIs for implementations of custom event rules.
2019-06-14 18:16:03 +01:00
Brendan Abolivier
14db086428
Merge pull request #5465 from matrix-org/babolivier/fix_deactivation_bg_job
...
Fix background job for deactivated flag
2019-06-14 18:12:56 +01:00
Erik Johnston
304a1376c2
Fix 3PID invite room state over federation.
...
Fixes that when a user exchanges a 3PID invite for a proper invite over
federation it does not include the `invite_room_state` key.
This was due to synapse incorrectly sending out two invite requests.
2019-06-14 16:19:11 +01:00
Brendan Abolivier
e0b77b004d
Fix background job for deactivated flag
2019-06-14 16:00:45 +01:00