summary refs log tree commit diff
path: root/synapse (follow)
Commit message (Collapse)AuthorAgeFilesLines
* handle empty backups according to latest spec proposal (#4123)Hubert Chathi2018-11-052-10/+33
| | | fixes #4056
* Tests for user consent resource (#4140)Amber Brown2018-11-061-1/+1
|
* Add helpers for getting prev and auth events (#4139)Erik Johnston2018-11-068-44/+60
| | | | | | | * Add helpers for getting prev and auth events This is in preparation for allowing the event format to change between room versions.
* Set the encoding to UTF8 in the default logconfig (#4138)Amber Brown2018-11-031-0/+1
|
* Merge pull request #4137 from matrix-org/erikj/clean_up_eventsErik Johnston2018-11-023-7/+4
|\ | | | | Clean up event accesses and tests
| * Clean up event accesses and testsErik Johnston2018-11-023-7/+4
| | | | | | | | | | This is in preparation to refactor FrozenEvent to support different event formats for different room versions
* | Fix typing being reset causing infinite syncs (#4127)Amber Brown2018-11-032-4/+24
| |
* | Merge pull request #4132 from matrix-org/rav/fix_device_list_lockingRichard van der Hoff2018-11-023-11/+128
|\ \ | | | | | | Fix locked upsert on device_lists_remote_cache
| * | Add unique indexes to a couple of tablesRichard van der Hoff2018-11-023-6/+88
| | | | | | | | | | | | | | | The indexes on device_lists_remote_extremeties can be unique, and they therefore should, to ensure that the db remains consistent.
| * | Remove redundant database locks for device list updatesRichard van der Hoff2018-11-021-5/+40
| | | | | | | | | | | | We can rely on the application-level per-user linearizer.
* | | Merge pull request #4133 from matrix-org/travis/fix-terms-authRichard van der Hoff2018-11-021-1/+1
|\ \ \ | | | | | | | | Fix logic error that prevented guests from seeing the privacy policy
| * | | Fix logic error that prevented guests from seeing the privacy policyTravis Ralston2018-11-011-1/+1
| |/ /
* | | Merge pull request #4135 from matrix-org/erikj/fix_state_res_noneErik Johnston2018-11-021-0/+4
|\ \ \ | |/ / |/| | Fix None exception in state res v2
| * | Fix None exception in state res v2Erik Johnston2018-11-021-0/+4
| |/
* | Merge pull request #4004 from matrix-org/travis/login-termsTravis Ralston2018-11-015-17/+135
|\ \ | |/ |/| Add m.login.terms to the registration flow
| * Include a version query string arg for the consent routeTravis Ralston2018-10-312-3/+8
| |
| * Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-3145-879/+1761
| |\
| * \ Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-2446-503/+1136
| |\ \
| * \ \ Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-1821-106/+472
| |\ \ \
| * | | | pep8Travis Ralston2018-10-153-14/+3
| | | | |
| * | | | Ensure the terms params are actually providedTravis Ralston2018-10-151-0/+1
| | | | |
| * | | | Python is hardTravis Ralston2018-10-151-5/+6
| | | | |
| * | | | Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-1510-3/+1047
| |\ \ \ \
| * | | | | Update login terms structure for the proposed language supportTravis Ralston2018-10-121-4/+7
| | | | | |
| * | | | | Rely on the lack of ?u to represent public accessTravis Ralston2018-10-122-10/+6
| | | | | | | | | | | | | | | | | | also general cleanup
| * | | | | Merge branch 'develop' into travis/login-termsTravis Ralston2018-10-1218-125/+224
| |\ \ \ \ \
| * | | | | | Use a flag rather than a new route for the public policyTravis Ralston2018-10-033-17/+25
| | | | | | | | | | | | | | | | | | | | | This also means that the template now has optional parameters, which will need to be documented somehow.
| * | | | | | Auto-consent to the privacy policy if the user registered with termsTravis Ralston2018-10-031-0/+6
| | | | | | |
| * | | | | | Make the terms flow requriedTravis Ralston2018-10-031-4/+4
| | | | | | |
| * | | | | | Flesh out the fallback auth for termsTravis Ralston2018-10-031-7/+67
| | | | | | |
| * | | | | | Supply params for terms auth stageTravis Ralston2018-10-031-0/+9
| | | | | | | | | | | | | | | | | | | | | As per https://github.com/matrix-org/matrix-doc/pull/1692
| * | | | | | Incorporate Dave's work for GDPR login flowsTravis Ralston2018-10-034-0/+40
| | | | | | | | | | | | | | | | | | | | | As per https://github.com/vector-im/riot-web/issues/7168#issuecomment-419996117
* | | | | | | Merge pull request #4128 from matrix-org/erikj/state_res_v2_versionErik Johnston2018-11-012-2/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add STATE_V2_TEST room version
| * | | | | | | Add STATE_V2_TEST room versionErik Johnston2018-11-012-2/+7
| | |_|_|_|_|/ | |/| | | | |
* | | | | | | Merge branch 'master' into developAmber Brown2018-11-011-1/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | versionAmber Brown2018-11-011-1/+1
| | | | | | |
| * | | | | | version bumpAmber Brown2018-10-311-1/+1
| | | | | | |
| * | | | | | Fix search 500ing (#4122)Amber Brown2018-10-311-2/+6
| | | | | | |
| * | | | | | version bumpAmber Brown2018-10-291-1/+1
| | | | | | |
* | | | | | | Merge pull request #4101 from matrix-org/rav/aliases_for_upgradesRichard van der Hoff2018-10-312-14/+140
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Attempt to move room aliases on room upgrades
| * | | | | | | Avoid else clause on exception for clarityRichard van der Hoff2018-10-311-2/+1
| | | | | | | |
| * | | | | | | Attempt to move room aliases on room upgradesRichard van der Hoff2018-10-312-14/+141
| | | | | | | |
* | | | | | | | Log some bits about event creation (#4121)Richard van der Hoff2018-10-312-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found these helpful in debugging my room upgrade tests.
* | | | | | | | Remove fetching keys via the deprecated v1 kex method (#4120)Amber Brown2018-10-312-106/+12
| | | | | | | |
* | | | | | | | Remove deprecated v1 key exchange endpoint (#4119)Amber Brown2018-10-314-113/+1
| | | | | | | |
* | | | | | | | Fix search 500ing (#4122)Amber Brown2018-10-311-2/+6
| | | | | | | |
* | | | | | | | Remove the unused /pull federation API (#4118)Amber Brown2018-10-312-14/+0
| | | | | | | |
* | | | | | | | Merge pull request #4006 from matrix-org/erikj/purge_state_groupsErik Johnston2018-10-304-48/+137
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Delete unreferenced state groups during purge
| * | | | | | | | Move _find_unreferenced_groupsErik Johnston2018-10-292-81/+83
| | | | | | | | |
| * | | | | | | | Fix set operations thinkoErik Johnston2018-10-291-3/+4
| | | | | | | | |
| * | | | | | | | Don't make temporary listErik Johnston2018-10-291-3/+2
| | | | | | | | |
| * | | | | | | | Make SQL a bit cleanerErik Johnston2018-10-291-3/+2
| | | | | | | | |
| * | | | | | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-10-2659-948/+2189
| |\ \ \ \ \ \ \ \ | | | |/ / / / / / | | |/| | | | | | | | | | | | | | | erikj/purge_state_groups
| * | | | | | | | pep8Erik Johnston2018-10-191-1/+1
| | | | | | | | |
| * | | | | | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-10-1949-250/+1763
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | erikj/purge_state_groups
| * | | | | | | | | Batch process handling state groupsErik Johnston2018-10-192-101/+92
| | | | | | | | | |
| * | | | | | | | | Fix up commentsErik Johnston2018-10-121-3/+3
| | | | | | | | | |
| * | | | | | | | | Add state_group index to event_to_state_groupsErik Johnston2018-10-043-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed to efficiently check for unreferenced state groups during purge.
| * | | | | | | | | Delete unreferened state groups during purgeErik Johnston2018-10-042-6/+77
| | | | | | | | | |
* | | | | | | | | | Write some tests for the email pusher (#4095)Amber Brown2018-10-303-6/+14
| | | | | | | | | |
* | | | | | | | | | Deduplicate device updates sent over replicationErik Johnston2018-10-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently send several kHz of device list updates over replication occisonally, which often causes the replications streams to lag and then get dropped. A lot of those updates will actually be duplicates, since we don't send e.g. device_ids across replication, so let's deduplicate it when we pull them out of the database.
* | | | | | | | | | Don't truncate command name in metricsErik Johnston2018-10-291-2/+2
| | | | | | | | | |
* | | | | | | | | | Delete the disused & unspecced identicon functionality (#4106)Amber Brown2018-10-294-74/+0
| |_|_|/ / / / / / |/| | | | | | | |
* | | | | | | | | Merge pull request #4100 from matrix-org/rav/room_upgrade_avatarRichard van der Hoff2018-10-291-1/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Remember to copy the avatar on room upgrades
| * | | | | | | | | Remember to copy the avatar on room upgradesRichard van der Hoff2018-10-261-1/+2
| | | | | | | | | |
* | | | | | | | | | Merge pull request #4099 from matrix-org/rav/upgrade_odd_plsRichard van der Hoff2018-10-291-44/+81
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Better handling of odd PLs during room upgrades
| * | | | | | | | | | Better handling of odd PLs during room upgradesRichard van der Hoff2018-10-271-44/+81
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes handling of rooms where we have permission to send the tombstone, but not other state. We need to (a) fail more gracefully when we can't send the PLs in the old room, and (b) not set the PLs in the new room until we are done with the other stuff.
* | | | | | | | | | Merge pull request #4091 from matrix-org/rav/room_version_upgradesRichard van der Hoff2018-10-297-38/+323
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Room version upgrade support
| * | | | | | | | | optimise state copyingRichard van der Hoff2018-10-261-7/+5
| | | | | | | | | |
| * | | | | | | | | Address review commentsRichard van der Hoff2018-10-262-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve comments, get old room state from the context we already have
| * | | | | | | | | restrict PLs in old roomRichard van der Hoff2018-10-251-1/+43
| | | | | | | | | |
| * | | | | | | | | copy stateRichard van der Hoff2018-10-251-11/+26
| | | | | | | | | |
| * | | | | | | | | preserve PLsRichard van der Hoff2018-10-251-1/+7
| | | | | | | | | |
| * | | | | | | | | preserve room visibilityRichard van der Hoff2018-10-252-4/+6
| | | | | | | | | |
| * | | | | | | | | Basic initial support for room upgradesRichard van der Hoff2018-10-255-0/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently just creates a new, empty, room, and sends a tombstone in the old room.
| * | | | | | | | | Allow power_level_content_override=None for _send_events_for_new_roomRichard van der Hoff2018-10-251-5/+6
| | | | | | | | | |
| * | | | | | | | | Make room_member_handler a member of RoomCreationHandlerRichard van der Hoff2018-10-252-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... to save passing it into `_send_events_for_new_room`
| * | | | | | | | | Factor _generate_room_id out of create_roomRichard van der Hoff2018-10-251-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we're going to need this for room upgrades.
* | | | | | | | | | Make the replication logger quieter (#4108)Amber Brown2018-10-291-1/+1
| |_|_|/ / / / / / |/| | | | | | | |
* | | | | | | | | Port register_new_matrix_user to Python 3 and add tests (#4085)Amber Brown2018-10-262-0/+215
|/ / / / / / / /
* | | | | | | | Refactor state group lookup to reduce DB hits (#4011)Erik Johnston2018-10-259-420/+603
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when fetching state groups from the data store we make two hits two the database: once for members and once for non-members (unless request is filtered to one or the other). This adds needless load to the datbase, so this PR refactors the lookup to make only a single database hit.
* | | | | | | | Merge pull request #4051 from matrix-org/erikj/alias_disallow_listErik Johnston2018-10-255-15/+140
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add config option to control alias creation
| * \ \ \ \ \ \ \ Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-10-2546-443/+1124
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | erikj/alias_disallow_list
| * | | | | | | | | Use allow/denyErik Johnston2018-10-251-6/+6
| | | | | | | | | |
| * | | | | | | | | Use match rather than searchErik Johnston2018-10-241-2/+3
| | | | | | | | | |
| * | | | | | | | | Anchor returned regex to start and end of stringErik Johnston2018-10-191-2/+6
| | | | | | | | | |
| * | | | | | | | | Add config option to control alias creationErik Johnston2018-10-195-15/+135
| | | | | | | | | |
* | | | | | | | | | Merge pull request #4081 from matrix-org/neilj/fix_mau_initNeil Johnson2018-10-254-31/+84
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | fix race condiftion in calling initialise_reserved_users
| * | | | | | | | | add new lineNeil Johnson2018-10-251-0/+1
| | | | | | | | | |
| * | | | | | | | | improve commentsNeil Johnson2018-10-251-6/+6
| | | | | | | | | |
| * | | | | | | | | fix style inconsistenciesNeil Johnson2018-10-242-15/+47
| | | | | | | | | |
| * | | | | | | | | commit transaction before closingNeil Johnson2018-10-241-0/+1
| | | | | | | | | |
| * | | | | | | | | Merge branch 'develop' of github.com:matrix-org/synapse into neilj/fix_mau_initNeil Johnson2018-10-2431-368/+994
| |\ \ \ \ \ \ \ \ \ | | | |_|_|_|_|_|_|/ | | |/| | | | | | |
| * | | | | | | | | remove white spaceNeil Johnson2018-10-231-2/+1
| | | | | | | | | |
| * | | | | | | | | fix race condiftion in calling initialise_reserved_usersNeil Johnson2018-10-233-25/+45
| | | | | | | | | |
* | | | | | | | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Neil Johnson2018-10-2583-676/+2779
|\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | matthew/autocreate_autojoin
| * | | | | | | | | Merge remote-tracking branch 'origin/develop' into ↵Richard van der Hoff2018-10-2412-67/+665
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rav/fix_event_filter_validation
| | * \ \ \ \ \ \ \ \ Merge pull request #4082 from matrix-org/rav/fix_pep8Richard van der Hoff2018-10-246-6/+6
| | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix a number of flake8 errors
| | | * | | | | | | | | Fix a number of flake8 errorsRichard van der Hoff2018-10-246-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broadly three things here: * disable W504 which seems a bit whacko * remove a bunch of `as e` expressions from exception handlers that don't use them * use `r""` for strings which include backslashes Also, we don't use pep8 any more, so we can get rid of the duplicate config there.
| | * | | | | | | | | | Merge pull request #4040 from matrix-org/erikj/states_res_v2_rebaseErik Johnston2018-10-246-61/+659
| | |\ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / / | | |/| | | | | | | | | Add v2 state resolution algorithm
| | | * | | | | | | | | CommentErik Johnston2018-10-241-2/+5
| | | | | | | | | | | |
| | | * | | | | | | | | Rename resolve_events_with_factoryErik Johnston2018-10-244-11/+11
| | | | | | | | | | | |
| | | * | | | | | | | | Update event_auth table for rejected eventsErik Johnston2018-10-161-15/+21
| | | | | | | | | | | |
| | | * | | | | | | | | Fix up use of resolve_events_with_factoryErik Johnston2018-10-161-13/+10
| | | | | | | | | | | |
| | | * | | | | | | | | User event.sender rather than alias event.user_idErik Johnston2018-10-161-1/+1
| | | | | | | | | | | |
| | | * | | | | | | | | Add v2 state res algorithm.Erik Johnston2018-10-163-24/+616
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We hook this up to the vdh test room version.
| * | | | | | | | | | | Allow backslashes in event field filtersRichard van der Hoff2018-10-241-1/+4
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a bug introduced in https://github.com/matrix-org/synapse/pull/1783 which meant that single backslashes were not allowed in event field filters. The intention here is to allow single-backslashes, but disallow double-backslashes.
| * | | | | | | | | | Merge pull request #4075 from matrix-org/rav/fix_pusher_logcontextsRichard van der Hoff2018-10-247-141/+141
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Clean up the way logcontexts and threads work in the pushers
| | * | | | | | | | | | Fix start_pushers vs _start_pushers confusionRichard van der Hoff2018-10-241-3/+3
| | | | | | | | | | | |
| | * | | | | | | | | | sanity-check the is_processing flagRichard van der Hoff2018-10-242-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and rename it, for even more sanity
| | * | | | | | | | | | Run PusherPool.start as a background processRichard van der Hoff2018-10-221-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't do anything with the result, so this is needed to give this code a logcontext.
| | * | | | | | | | | | Make on_started synchronous tooRichard van der Hoff2018-10-223-11/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings it into line with on_new_notifications and on_new_receipts. It requires a little bit of hoop-jumping in EmailPusher to load the throttle params before the first loop.
| | * | | | | | | | | | Remove redundant run_as_background_process() from pusherpoolRichard van der Hoff2018-10-227-50/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `on_new_notifications` and `on_new_receipts` in `HttpPusher` and `EmailPusher` now always return synchronously, so we can remove the `defer.gatherResults` on their results, and the `run_as_background_process` wrappers can be removed too because the PusherPool methods will now complete quickly enough.
| | * | | | | | | | | | Give pushers their own background logcontextRichard van der Hoff2018-10-222-58/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each pusher has its own loop which runs for as long as it has work to do. This should run in its own background thread with its own logcontext, as other similar loops elsewhere in the system do - which means that CPU usage is consistently attributed to that loop, rather than to whatever request happened to start the loop.
| | * | | | | | | | | | move get_all_pushers call downRichard van der Hoff2018-10-221-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simplifies the interface to _start_pushers
| | * | | | | | | | | | Factor PusherPool._start_pusher out of _start_pushersRichard van der Hoff2018-10-221-18/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and use it from start_pusher_by_id. This mostly simplifies start_pusher_by_id.
| | * | | | | | | | | | Rename _refresh_pusherRichard van der Hoff2018-10-222-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is public (or at least, called from outside the class), so ought to have a better name.
| * | | | | | | | | | | Merge pull request #4063 from matrix-org/erikj/cleaup_alias_creationErik Johnston2018-10-243-64/+55
| |\ \ \ \ \ \ \ \ \ \ \ | | | |_|_|/ / / / / / / | | |/| | | | | | | | | Clean up room alias creation
| | * | | | | | | | | | Clean up room alias creationErik Johnston2018-10-193-64/+55
| | | |_|_|_|_|_|_|_|/ | | |/| | | | | | | |
| * | | | | | | | | | Merge pull request #3969 from turt2live/travis/fix-federated-group-requestsTravis Ralston2018-10-232-8/+22
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Handle HttpResponseException more safely for federated groups
| | * | | | | | | | | | Comments helpTravis Ralston2018-10-231-0/+5
| | | | | | | | | | | |
| | * | | | | | | | | | isortTravis Ralston2018-10-121-1/+1
| | | | | | | | | | | |
| | * | | | | | | | | | More sane handling of group errors and pep8Travis Ralston2018-10-121-4/+5
| | | | | | | | | | | |
| | * | | | | | | | | | Merge branch 'develop' into travis/fix-federated-group-requestsTravis Ralston2018-10-1249-314/+590
| | |\ \ \ \ \ \ \ \ \ \ | | | | |_|_|_|_|_|_|/ / | | | |/| | | | | | | |
| | * | | | | | | | | | Remove debugging statementTravis Ralston2018-09-261-1/+0
| | | | | | | | | | | |
| | * | | | | | | | | | Handle HttpResponseException more safely for federated groupsTravis Ralston2018-09-261-2/+11
| | | | | | | | | | | |
| | * | | | | | | | | | Fix exception documentation in matrixfederationclient.pyTravis Ralston2018-09-261-6/+6
| | | | | | | | | | | |
| * | | | | | | | | | | Give some more things logcontexts (#4077)Richard van der Hoff2018-10-232-7/+11
| | | | | | | | | | | |
| * | | | | | | | | | | Correctly account for cpu usage by background threads (#4074)Richard van der Hoff2018-10-235-80/+96
| | |_|_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrap calls to deferToThread() in a thing which uses a child logcontext to attribute CPU usage to the right request. While we're in the area, remove the logcontext_tracer stuff, which is never used, and afaik doesn't work. Fixes #4064
| * | | | | | | | | | Merge pull request #4076 from matrix-org/rav/fix_init_logcontextsRichard van der Hoff2018-10-221-8/+22
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Run MAU queries as background processes
| | * | | | | | | | | | Run MAU queries as background processesRichard van der Hoff2018-10-201-8/+22
| | | |_|_|/ / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #3820
| * | | | | | | | | | Merge pull request #4073 from matrix-org/rav/require_psutilRichard van der Hoff2018-10-222-10/+5
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Make psutil an explicit dependency
| | * | | | | | | | | | Make psutil an explicit dependencyRichard van der Hoff2018-10-192-10/+5
| | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of #4027, we require psutil to be installed, so it should be in our dependency list. We can also remove some of the conditional import code introduced by #992. Fixes #4062.
| * / / / / / / / / / Make scripts/ and scripts-dev/ pass pyflakes (and the rest of the codebase ↵Amber Brown2018-10-209-71/+70
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on py3) (#4068)
| * | | | | | | | | Merge pull request #4069 from matrix-org/rav/fix_email_templates_4065Richard van der Hoff2018-10-192-28/+20
| |\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ / / | |/| | | | | | | | Calculate absolute path for email templates
| | * | | | | | | | Calculate absolute path for email templatesRichard van der Hoff2018-10-192-28/+20
| | | | | | | | | |
| * | | | | | | | | Fix manhole on py3 (pt 2) (#4067)Amber Brown2018-10-191-0/+2
| | | | | | | | | |
| * | | | | | | | | Make the metrics less racy (#4061)Amber Brown2018-10-192-16/+21
| | | | | | | | | |
| * | | | | | | | | make a bytestringAmber Brown2018-10-191-2/+2
| | |_|_|/ / / / / | |/| | | | | | |
| * | | | | | | | Merge branch 'master' into developRichard van der Hoff2018-10-1811-5/+369
| |\| | | | | | |
| | * | | | | | | 0.33.7 v0.33.7Richard van der Hoff2018-10-181-1/+1
| | | | | | | | |
| | * | | | | | | v0.33.7rc2Richard van der Hoff2018-10-171-1/+1
| | | | | | | | |
| | * | | | | | | Fix incorrect truncation in get_missing_eventsRichard van der Hoff2018-10-174-35/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's quite important that get_missing_events returns the *latest* events in the room; however we were pulling event ids out of the database until we got *at least* 10, and then taking the *earliest* of the results. We also shouldn't really be relying on depth, and should be checking the room_id.
| | * | | | | | | Put the warning blob at the top of the fileRichard van der Hoff2018-10-171-6/+9
| | | | | | | | |
| | * | | | | | | Ship the email templates as package_dataRichard van der Hoff2018-10-1710-4/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | move the example email templates into the synapse package so that they can be used as package data, which should mean that all of the packaging mechanisms (pip, docker, debian, arch, etc) should now come with the example templates. In order to grandfather in people who relied on the templates being in the old place, check for that situation and fall back to using the defaults if the templates directory does not exist.
| | * | | | | | | version bumpAmber Brown2018-10-151-1/+1
| | | |_|_|_|_|/ | | |/| | | | |
| * | | | | | | Fix bug where we raised StopIteration in a generatorErik Johnston2018-10-171-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This made python 3.7 unhappy
| * | | | | | | Fix roomlist since tokens on Python 3 (#4046)Will Hunt2018-10-172-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | Thanks @Half-Shot !!!
| * | | | | | | Fix incorrect truncation in get_missing_eventsRichard van der Hoff2018-10-164-35/+25
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's quite important that get_missing_events returns the *latest* events in the room; however we were pulling event ids out of the database until we got *at least* 10, and then taking the *earliest* of the results. We also shouldn't really be relying on depth, and should be checking the room_id.
| * | | | | | Various cleanups in the federation client code (#4031)Richard van der Hoff2018-10-163-61/+63
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Improve logging: log things in the right order, include destination and txids in all log lines, don't log successful responses twice - Fix the docstring on TransportLayerClient.send_transaction - Don't use treq.request, which is overcomplicated for our purposes: just use a twisted.web.client.Agent. - simplify the logic for setting up the bodyProducer - fix bytes/str confusions
| * | | | | Merge pull request #4019 from matrix-org/dbkr/e2e_backupsDavid Baker2018-10-158-0/+1044
| |\ \ \ \ \ | | | | | | | | | | | | | | E2E backups
| | * | | | | missed oneDavid Baker2018-10-121-0/+1
| | | | | | |
| | * | | | | Linting soothes the savage PEP8 monsterDavid Baker2018-10-121-4/+9
| | | | | | |
| | * | | | | Misc PR feedback bitsDavid Baker2018-10-121-2/+2
| | | | | | |
| | * | | | | Don't mangle exceptionsDavid Baker2018-10-121-4/+2
| | | | | | |
| | * | | | | Split /room_keys/version into 2 servletsDavid Baker2018-10-121-9/+21
| | | | | | |
| | * | | | | PR feedback pt. 1David Baker2018-10-123-29/+22
| | | | | | |
| | * | | | | Fix mergefailDavid Baker2018-10-091-1/+1
| | | | | | |
| | * | | | | isortDavid Baker2018-10-091-1/+1
| | | | | | |
| | * | | | | Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backupsDavid Baker2018-10-09115-1523/+2315
| | |\ \ \ \ \
| | * | | | | | Apparently this blank line is Very ImportantDavid Baker2018-10-091-0/+1
| | | | | | | |
| | * | | | | | be python3 compatibleDavid Baker2018-10-091-2/+3
| | | | | | | |
| | * | | | | | Don't reuse backup versionsDavid Baker2018-10-052-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we don't actually delete the keys, just mark the versions as deleted in the db rather than actually deleting them, then we won't reuse versions. Fixes https://github.com/vector-im/riot-web/issues/7448
| | * | | | | | WIP e2e key backupsDavid Baker2018-09-132-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continues from uhoreg's branch This just fixed the errcode on /room_keys/version if no backup and updates the schema delta to be on the latest so it gets run
| | * | | | | | try to make flake8 and isort happyHubert Chathi2018-09-064-4/+10
| | | | | | | |
| | * | | | | | update to newer Synapse APIsHubert Chathi2018-08-241-1/+1
| | | | | | | |
| | * | | | | | Merge branch 'develop' into e2e_backupsHubert Chathi2018-08-24116-1483/+3715
| | |\ \ \ \ \ \
| | * | | | | | | allow session_data to be any JSON instead of just a stringHubert Chathi2018-08-211-2/+4
| | | | | | | | |
| | * | | | | | | allow auth_data to be any JSON instead of a stringHubert Chathi2018-08-211-2/+5
| | | | | | | | |
| | * | | | | | | missing importMatthew Hodgson2018-08-121-1/+1
| | | | | | | | |
| | * | | | | | | missing importMatthew Hodgson2018-08-121-0/+1
| | | | | | | | |
| | * | | | | | | use parse_stringMatthew Hodgson2018-08-121-3/+3
| | | | | | | | |
| | * | | | | | | 404 nicely if you try to interact with a missing current versionMatthew Hodgson2018-08-121-16/+35
| | | | | | | | |
| | * | | | | | | support DELETE /version with no argsMatthew Hodgson2018-08-122-3/+4
| | | | | | | | |
| | * | | | | | | flake8Matthew Hodgson2018-08-121-1/+1
| | | | | | | | |
| | * | | | | | | implement remaining tests and make them workMatthew Hodgson2018-08-123-8/+36
| | | | | | | | |
| | * | | | | | | fix idiocies and so make tests passMatthew Hodgson2018-08-122-3/+4
| | | | | | | | |
| | * | | | | | | don't needlessly return user_idMatthew Hodgson2018-08-121-1/+0
| | | | | | | | |
| | * | | | | | | improve docstringMatthew Hodgson2018-08-121-1/+5
| | | | | | | | |
| | * | | | | | | switch get_current_version_info back to being get_version_infoMatthew Hodgson2018-08-121-4/+7
| | | | | | | | |
| | * | | | | | | fix flakesMatthew Hodgson2018-08-122-4/+6
| | | | | | | | |
| | * | | | | | | fix typosMatthew Hodgson2018-08-122-2/+3
| | | | | | | | |
| | * | | | | | | add a tonne of docstring; make upload_room_keys properly assert versionMatthew Hodgson2018-08-122-9/+113
| | | | | | | | |
| | * | | | | | | add a tonne of docstring; make upload_room_keys properly assert versionMatthew Hodgson2018-08-121-20/+31
| | | | | | | | |
| | * | | | | | | more docstring for the e2e_room_keys restMatthew Hodgson2018-08-122-2/+51
| | | | | | | | |
| | * | | | | | | add storage docstring; remove unused set_e2e_room_keysMatthew Hodgson2018-08-121-36/+83
| | | | | | | | |
| | * | | | | | | fix factoring out of _should_replace_room_keyMatthew Hodgson2018-08-121-3/+4
| | | | | | | | |
| | * | | | | | | rename room_key_version table correctly, and fix opt argsMatthew Hodgson2018-08-122-16/+16
| | | | | | | | |
| | * | | | | | | blindly incorporate PR review - needs testing & fixingMatthew Hodgson2018-08-125-79/+99
| | | | | | | | |
| | * | | | | | | make /room_keys/version workMatthew Hodgson2018-08-124-15/+38
| | | | | | | | |
| | * | | | | | | implement /room_keys/version too (untested)Matthew Hodgson2018-08-125-6/+171
| | | | | | | | |
| | * | | | | | | document the APIMatthew Hodgson2018-08-121-0/+133
| | | | | | | | |
| | * | | | | | | make it work and fix pep8Matthew Hodgson2018-08-127-82/+134
| | | | | | | | |
| | * | | | | | | interim WIP checkin; doesn't build yetMatthew Hodgson2018-08-123-19/+84
| | | | | | | | |
| | * | | | | | | total WIP skeleton for /room_keys APIMatthew Hodgson2018-08-124-0/+289
| | | | | | | | |
| * | | | | | | | synapse/app: frontend_proxy.py: actually make workers work on py3Ivan Shapovalov2018-10-141-2/+2
| | | | | | | | |
| * | | | | | | | synapse/visibility.py: fix SyntaxError on py3.7Ivan Shapovalov2018-10-141-1/+1
| | |_|_|_|/ / / | |/| | | | | |
| * | | | | | | Make workers work on Py3 (#4027)Amber Brown2018-10-1311-61/+62
| | | | | | | |
| * | | | | | | Comments on get_all_new_events_streamRichard van der Hoff2018-10-121-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | just some docstrings to clarify the behaviour here
| * | | | | | | Add description to counter metricErik Johnston2018-10-101-1/+5
| | | | | | | |
| * | | | | | | Track number of non-empty sync responses insteadErik Johnston2018-10-101-9/+15
| | | | | | | |
| * | | | | | | Append _total to metric and fix up spellingErik Johnston2018-10-101-2/+2
| | | | | | | |
| * | | | | | | Add metric to count lazy member sync requestsErik Johnston2018-10-091-6/+20
| | | | | | | |
| * | | | | | | Merge pull request #4008 from matrix-org/erikj/log_looping_exceptionsErik Johnston2018-10-092-13/+35
| |\ \ \ \ \ \ \ | | |_|_|/ / / / | |/| | | | | | Log looping call exceptions
| | * | | | | | Remove unnecessary extra function call layerErik Johnston2018-10-082-31/+16
| | | | | | | |
| | * | | | | | Use errback pattern and catch async failuresErik Johnston2018-10-082-15/+35
| | | | | | | |
| | * | | | | | Log looping call exceptionsErik Johnston2018-10-051-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a looping call function errors, then it kills the loop entirely. Currently it throws away the exception logs, so we should make it actually log them. Fixes #3929
| * | | | | | | Optimisation for filter_events_for_serverRichard van der Hoff2018-10-081-7/+6
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're better off hashing just the event_id than the whole ((type, state_key), event_id) tuple - so use a dict instead of a set. Also, iteritems > items.
* | | | | | | isortNeil Johnson2018-10-241-2/+1
| | | | | | |
* | | | | | | remove trailing whiter spaceNeil Johnson2018-10-241-1/+1
| | | | | | |
* | | | | | | fix tupleRichard van der Hoff2018-10-241-1/+2
| | | | | | | | | | | | | | | | | | | | | Co-Authored-By: neilisfragile <neil@matrix.org>
* | | | | | | remove errant exception and styleNeil Johnson2018-10-232-6/+6
| | | | | | |
* | | | | | | clean up config error logic and importsNeil Johnson2018-10-172-19/+20
| | | | | | |
* | | | | | | no need to join room if creatorNeil Johnson2018-10-131-1/+2
| | | | | | |
* | | | | | | improve auto room join logic, comments and testsNeil Johnson2018-10-122-4/+18
| | | | | | |
* | | | | | | Merge branch 'develop' into matthew/autocreate_autojoinNeil Johnson2018-10-0417-130/+240
|\| | | | | |
| * | | | | | Merge pull request #3995 from matrix-org/rav/no_deextrem_outliersRichard van der Hoff2018-10-041-33/+69
| |\ \ \ \ \ \ | | |_|_|_|/ / | |/| | | | | Fix bug in forward_extremity update logic
| | * | | | | actually exclude outliersRichard van der Hoff2018-10-031-1/+2
| | | | | | |
| | * | | | | remove debuggingRichard van der Hoff2018-10-021-10/+0
| | | | | | |
| | * | | | | Fix bug in forward_extremity update logicRichard van der Hoff2018-10-021-33/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An event does not stop being a forward_extremity just because an outlier or rejected event refers to it.
| * | | | | | Merge branch 'master' into developAmber Brown2018-10-042-2/+5
| |\ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | |
| | * | | | | full versionAmber Brown2018-10-041-1/+1
| | | | | | |
| | * | | | | Pin to prometheus_client<0.4 to avoid renaming all of our metricsRichard van der Hoff2018-10-031-1/+4
| | | | | | |
| | * | | | | versionAmber Brown2018-10-031-1/+1
| | |/ / / /
| * | | | | Merge pull request #3999 from matrix-org/erikj/fix_3pid_invite_rejetionErik Johnston2018-10-031-5/+2
| |\ \ \ \ \ | | | | | | | | | | | | | | Fix handling of rejected threepid invites
| | * | | | | Sanitise error messages when user doesn't have permission to inviteErik Johnston2018-10-031-5/+2
| | | | | | |
| | * | | | | Fix handling of rejected threepid invitesErik Johnston2018-10-031-1/+1
| | |/ / / /
| * | | | | Merge pull request #3996 from matrix-org/erikj/fix_bg_iterationErik Johnston2018-10-031-2/+6
| |\ \ \ \ \ | | | | | | | | | | | | | | Fix exception in background metrics collection
| | * | | | | Fix exception in background metrics collectionErik Johnston2018-10-031-2/+6
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | We attempted to iterate through a list on a separate thread without doing the necessary copying.
| * / / / / Fix exception handling in fetching remote profilesErik Johnston2018-10-031-6/+2
| |/ / / /
| * | | | Fix bug when invalidating destination retry timingsErik Johnston2018-10-021-1/+1
| | | | |
| * | | | Merge pull request #3960 from matrix-org/rav/fix_missing_create_event_errorRichard van der Hoff2018-10-021-2/+2
| |\ \ \ \ | | | | | | | | | | | | Fix error handling for missing auth_event
| | * \ \ \ Merge branch 'develop' into rav/fix_missing_create_event_errorRichard van der Hoff2018-10-0130-142/+299
| | |\ \ \ \
| | * | | | | Fix error handling for missing auth_eventRichard van der Hoff2018-09-261-2/+2
| | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we were authorizing an event, if there was no `m.room.create` in its auth_events, we would raise a SynapseError with a cryptic message, which then meant that we would bail out of processing any incoming events, rather than storing a rejection for the faulty event and moving on. We should treat the absent event the same as any other auth failure, by raising an AuthError, so that the event is marked as rejected.
| * | | | | Disable frozen dicts by default (#3987)Amber Brown2018-10-021-3/+10
| | | | | |
| * | | | | Fix error when logging incomplete requestsErik Johnston2018-10-021-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a connection is lost before a request is read from Request, Twisted sets `method` (and `uri`) attributes to dummy values. These dummy values have incorrect types (i.e. they're not bytes), and so things like `__repr__` would raise an exception. To fix this we had a helper method to return the method with a consistent type.
| * | | | | Merge pull request #3989 from matrix-org/rav/better_stacktracesRichard van der Hoff2018-10-022-22/+23
| |\ \ \ \ \ | | | | | | | | | | | | | | Avoid reraise, to improve stacktraces
| | * | | | | Avoid reraise, to improve stacktracesRichard van der Hoff2018-10-012-22/+23
| | | |/ / / | | |/| | |
| * | | | | Merge pull request #3986 from matrix-org/erikj/fix_sync_with_redacted_stateErik Johnston2018-10-021-2/+2
| |\ \ \ \ \ | | |/ / / / | |/| | | | Fix lazy loaded sync with rejected state events
| | * | | | Fix lazy loaded sync with rejected state eventsErik Johnston2018-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, we assume that the name and canonical alias events in the state have not been rejected. In practice this may not be the case (though we should probably think about fixing that) so lets ensure that we gracefully handle that case, rather than 404'ing the sync request like we do now.
| * | | | | Merge pull request #3968 from matrix-org/rav/fix_federation_errorsRichard van der Hoff2018-10-011-12/+46
| |\ \ \ \ \ | | | | | | | | | | | | | | Fix exceptions when handling incoming transactions
| | * \ \ \ \ Merge remote-tracking branch 'origin/develop' into rav/fix_federation_errorsRichard van der Hoff2018-09-2720-36/+60
| | |\ \ \ \ \
| | * | | | | | Include event when resolving state for missing prevsRichard van der Hoff2018-09-271-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a forward extremity for a room as `E`, and you receive `A`, `B`, s.t. `A -> B -> E`, and `B` also points to an unknown event `X`, then we need to do state res between `X` and `E`. When that happens, we need to make sure we include `X` in the state that goes into the state res alg. Fixes #3934.
| | * | | | | | Include state from remote servers in pdu handlingRichard van der Hoff2018-09-271-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we've fetched state events from remote servers in order to resolve the state for a new event, we need to actually pass those events into resolve_events_with_factory (so that it can do the state res) and then persist the ones we need - otherwise other bits of the codebase get confused about why we have state groups pointing to non-existent events.
| | * | | | | | Fix "unhashable type: 'list'" exception in federation handlingRichard van der Hoff2018-09-271-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_state_groups returns a map from state_group_id to a list of FrozenEvents, so was very much the wrong thing to be putting as one of the entries in the list passed to resolve_events_with_factory (which expects maps from (event_type, state_key) to event id). We actually want get_state_groups_ids().values() rather than get_state_groups(). This fixes the main problem in #3923, but there are other problems with this bit of code which get discovered once you do so.
| * | | | | | | Fix userconsent on Python 3 (#3938)Amber Brown2018-10-021-1/+1
| | |_|/ / / / | |/| | | | |
| * | | | | | Merge pull request #3933 from matrix-org/erikj/destination_retry_cacheErik Johnston2018-10-012-3/+44
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Add a five minute cache to get_destination_retry_timings
| | * | | | | | Correctly match 'dict.pop' apiErik Johnston2018-10-011-3/+11
| | | | | | | |
| | * | | | | | Don't update eviction metrics on explicit removalErik Johnston2018-10-011-5/+0
| | | | | | | |
| | * | | | | | Merge remote-tracking branch 'origin/develop' into erikj/destination_retry_cacheRichard van der Hoff2018-09-2827-403/+248
| | |\ \ \ \ \ \ | | | | |/ / / / | | | |/| | | |