Erik Johnston
717687e1fc
Get an auth query one at a time
2015-02-12 14:39:31 +00:00
Erik Johnston
a566ed2f0e
Bump webclient version
2015-02-12 10:49:07 +00:00
Erik Johnston
83d41f25d8
Set database schema version in delta
2015-02-12 10:05:47 +00:00
Erik Johnston
ff2a2ae56e
Bump version
2015-02-12 10:02:06 +00:00
Erik Johnston
8bbdf32849
Convert get_rooms to use runInteraction so the transacion has a more helpful description
2015-02-11 18:56:13 +00:00
Erik Johnston
2bf0e85f3d
Use encode_canonical_json for http client
2015-02-11 17:34:23 +00:00
Erik Johnston
e9e54449f5
Use encode_canonical_json for pushes
2015-02-11 17:32:42 +00:00
Erik Johnston
af89456c3c
Update dependency links
2015-02-11 17:15:16 +00:00
Erik Johnston
c52e8d395b
Merge pull request #61 from matrix-org/timeout-federation-requests
...
Timeout federation requests
2015-02-11 17:10:33 +00:00
Erik Johnston
021d93db11
Merge pull request #62 from matrix-org/state-chache
...
State chache
2015-02-11 17:10:28 +00:00
Erik Johnston
a793a0b810
Bump syutil version
2015-02-11 17:02:52 +00:00
Erik Johnston
42bc56dad3
Merge branch 'develop' of github.com:matrix-org/synapse into use-simplejson
2015-02-11 17:01:38 +00:00
Mark Haines
9c24cff6ef
Allow newer versions of syutil
2015-02-11 17:00:32 +00:00
Erik Johnston
7eef84a95b
pyflakes
2015-02-11 16:52:22 +00:00
Erik Johnston
76935078d1
Remove more debug logging
2015-02-11 16:51:22 +00:00
Erik Johnston
ed877d6585
Remove debug logging
2015-02-11 16:50:46 +00:00
Erik Johnston
ef276e8770
Fix so timing out connections to actually work.
2015-02-11 16:48:05 +00:00
Kegan Dougal
f2fdcb7c4b
Merge branch 'develop' into application-services
2015-02-11 16:43:26 +00:00
Kegan Dougal
f518324426
Minor tweaks based on PR feedback.
2015-02-11 16:41:16 +00:00
Paul "LeoNerd" Evans
b164e0896c
Merge branch 'bugs/SYN-264' into develop
2015-02-11 16:23:30 +00:00
Paul "LeoNerd" Evans
7f47ba7383
Added another TODO note
2015-02-11 16:18:21 +00:00
Erik Johnston
41a9a76a99
Merge branch 'develop' of github.com:matrix-org/synapse into timeout-federation-requests
2015-02-11 16:12:59 +00:00
Paul "LeoNerd" Evans
45b56609ae
Cache the result of a get_rooms_for_user query, to make user_rooms_intersect() much lighter in the read-common case
2015-02-11 16:04:08 +00:00
Paul "LeoNerd" Evans
7be0f6594e
First step of making user_rooms_intersect() faster - implement in intersection logic in Python code terms of a DB query that is cacheable per user
2015-02-11 15:53:56 +00:00
Erik Johnston
ddb816cf60
Don't unfreeze when using FreezeEvent.get_dict, as we are using a JSONEncoder that understands FrozenDict
2015-02-11 15:44:28 +00:00
Mark Haines
ddc25cf4e2
Invalidate the cache for an event if it is redacted
2015-02-11 15:23:28 +00:00
Mark Haines
aff892ce79
Fix formatting
2015-02-11 15:02:35 +00:00
Mark Haines
f5a70e0d2e
Add a cache for get_event
2015-02-11 15:01:15 +00:00
Mark Haines
d8324d5a2b
Add a lru cache class
2015-02-11 14:52:23 +00:00
Erik Johnston
4ebbaf0d43
Blunty replace json with simplejson
2015-02-11 14:23:10 +00:00
Kegan Dougal
14d413752b
Fix newline on __init__
2015-02-11 10:53:47 +00:00
Kegan Dougal
fd40d992ad
PEP8-ify
2015-02-11 10:41:33 +00:00
Kegan Dougal
8beb613916
Add newline to EOF
2015-02-11 10:36:48 +00:00
Kegan Dougal
c7783d6fee
Notify ASes for events sent by other users in a room which an AS user is a part of.
2015-02-11 10:36:08 +00:00
Erik Johnston
5758dafb4e
Merge branch 'develop' of github.com:matrix-org/synapse into state-chache
2015-02-11 10:35:13 +00:00
Erik Johnston
6370cffbbf
Fix bug where variable was not always defined
2015-02-11 10:34:41 +00:00
Erik Johnston
fb233dc40b
Merge branch 'develop' of github.com:matrix-org/synapse into timeout-federation-requests
2015-02-11 10:33:19 +00:00
Erik Johnston
05b961d7e3
PEP8
2015-02-11 10:28:46 +00:00
Erik Johnston
dcf52469e8
Move time_bound_deferred into Clock
2015-02-11 10:25:06 +00:00
Erik Johnston
8c83cc471b
Merge branch 'master' of github.com:matrix-org/synapse into develop
2015-02-11 10:20:43 +00:00
Kegan Dougal
9978c5c103
Merge branch 'develop' into application-services
2015-02-11 10:03:24 +00:00
Erik Johnston
0e6b3e4e40
Time out HTTP federation requests
2015-02-10 18:17:27 +00:00
Mark Haines
5e54365234
Merge branch 'develop' into single_source_version_and_dependencies
2015-02-10 18:13:25 +00:00
Mark Haines
84a769cdb7
Fix code-style
2015-02-10 17:58:36 +00:00
Mark Haines
7ed971d9b2
Single source version and python dependencies, prevent people accidentally installing with easy_install, use scripts rather than entry_points to install synctl
2015-02-10 17:42:36 +00:00
Erik Johnston
eae0842bc1
Merge branch 'develop' of github.com:matrix-org/synapse into state-chache
2015-02-10 17:34:51 +00:00
Erik Johnston
c8e1da930d
Log all the exits from _attempt_new_transaction
2015-02-10 17:30:46 +00:00
Erik Johnston
b61a308b27
Bump version
2015-02-10 16:37:12 +00:00
Erik Johnston
e8d4a31475
Fix prune_events to work with nested dicts
2015-02-10 16:36:51 +00:00
Mark Haines
b085fac735
Code-style fixes
2015-02-10 16:30:48 +00:00
Erik Johnston
093e34e301
Merge branch 'develop' of github.com:matrix-org/synapse into state-chache
2015-02-10 15:46:48 +00:00
Erik Johnston
697ab75a34
Sign auth_chains when returned by /state/ requests
2015-02-10 15:46:24 +00:00
Erik Johnston
f8abbae99f
Remove unnecessary logging
2015-02-10 15:45:50 +00:00
Erik Johnston
794fe2ca45
Merge branch 'develop' of github.com:matrix-org/synapse into state-chache
2015-02-10 15:23:08 +00:00
Mark Haines
f88d3ee8ae
Merge pull request #58 from matrix-org/get_event_counters
...
Add performance counters for different stages of loading events
2015-02-10 15:15:20 +00:00
Mark Haines
fda4422bc9
Fix pyflakes
2015-02-10 14:54:07 +00:00
Mark Haines
d7c7efb691
Add performance counters for different stages of loading events
2015-02-10 14:50:53 +00:00
Erik Johnston
91f0e41153
Merge branch 'develop' of github.com:matrix-org/synapse into state-chache
2015-02-10 14:30:26 +00:00
Erik Johnston
f91345bdb5
yaml.load expects strings to be a yaml rather than file
2015-02-10 13:57:31 +00:00
Erik Johnston
30595b466f
Use yaml logging config format because it is much nicer
2015-02-10 13:50:33 +00:00
Erik Johnston
c86ebe7673
Merge branch 'develop' of github.com:matrix-org/synapse into state-chache
...
Conflicts:
synapse/app/homeserver.py
synapse/state.py
2015-02-10 11:04:37 +00:00
Erik Johnston
2b042ad67f
Oops, we do want to defer.return regardless of whether we are caching or not
2015-02-10 11:03:16 +00:00
Erik Johnston
d19e2ed02f
Move construction of object within if block
2015-02-10 11:01:15 +00:00
Erik Johnston
b90d377af4
Merge branch 'release-v0.6.2' of github.com:matrix-org/synapse into develop
2015-02-10 10:33:35 +00:00
Mark Haines
8ce100c7b4
Convert directory paths to absolute paths before daemonizing
2015-02-09 18:30:00 +00:00
Mark Haines
5c5f5c1f0e
Merge pull request #56 from matrix-org/room_initial_sync_perf
...
During room intial sync, only calculate current state once.
2015-02-09 18:09:30 +00:00
Erik Johnston
375eba6a18
Merge pull request #57 from matrix-org/transaction_counters
...
Transaction counters
2015-02-09 18:08:08 +00:00
Mark Haines
0c4536da8f
Use the transaction 'desc' rather than 'name', increment the txn_ids in
...
txn names
2015-02-09 18:06:31 +00:00
Mark Haines
347b497db0
Formatting
2015-02-09 17:57:09 +00:00
Mark Haines
3a5ad7dbd5
Performance counters for database transaction names
2015-02-09 17:55:56 +00:00
Erik Johnston
d94f682a4c
During room intial sync, only calculate current state once.
2015-02-09 17:41:29 +00:00
David Baker
8f616684a3
Need to use re.search if looking for matches not at the start of the string. Also comparisons with None should be 'is'.
2015-02-09 17:01:40 +00:00
Matthew Hodgson
0b725f5c4f
oops
2015-02-09 16:48:31 +00:00
Matthew Hodgson
bd2373277d
oops
2015-02-09 16:48:09 +00:00
Matthew Hodgson
a578251b48
only do word-boundary patches on bodies for now
2015-02-09 16:44:47 +00:00
Kegan Dougal
53557fc532
Merge branch 'develop' into application-services
2015-02-09 15:20:56 +00:00
Kegan Dougal
f7cac2f7b6
Fix bugs so lazy room joining works as intended.
2015-02-09 15:01:28 +00:00
Erik Johnston
76c5a5c2f6
Merge pull request #55 from matrix-org/profiling
...
Profiling
2015-02-09 15:01:26 +00:00
Erik Johnston
c4ee4ce93e
Fix typo
2015-02-09 15:00:37 +00:00
Erik Johnston
ef995e6946
Add looping_call to Clock
2015-02-09 14:47:59 +00:00
Erik Johnston
66fde49f07
Log database time every 10s and log as percentage
2015-02-09 14:45:15 +00:00
Erik Johnston
75656712e3
Time how long we're spending on the database thread
2015-02-09 14:22:52 +00:00
David Baker
784d714a3f
Fix server default rule injection (downwards, not upwards!)
2015-02-09 14:17:52 +00:00
Kegan Dougal
5a7dd05818
Modify auth.get_user_by_req for authing appservices directly.
...
Add logic to map the appservice token to the autogenned appservice user ID.
Add unit tests for all forms of get_user_by_req (user/appservice,
valid/bad/missing tokens)
2015-02-09 14:14:15 +00:00
Erik Johnston
24cc6979fb
Log when we receive a request, when we send a response and how long it took to process it.
2015-02-09 13:46:22 +00:00
Kegan Dougal
ac3183caaa
Register a user account for the AS when the AS registers. Add 'sender' column to AS table.
2015-02-09 12:03:37 +00:00
Matthew Hodgson
ecb0f78063
glob *s should probably be non-greedy
2015-02-08 02:37:35 +00:00
Matthew Hodgson
c2afc2ad90
oops
2015-02-08 00:37:03 +00:00
Matthew Hodgson
8be07e0db4
kill off fnmatch in favour of word-boundary based push alerts (untested)
2015-02-08 00:34:34 +00:00
Matthew Hodgson
37b6b880ef
don't give up if we can't create default avatars during tests
2015-02-07 21:24:08 +00:00
Matthew Hodgson
582019f870
...and here's the actual impl. git fail.
2015-02-07 13:32:14 +00:00
Matthew Hodgson
e117bc3fc5
thou shalt specify a content-length
2015-02-07 12:56:21 +00:00
Matthew Hodgson
34c39398fa
i hate weakly typed languages
2015-02-07 12:55:13 +00:00
Kegan Dougal
73a680b2a8
Add errcodes for appservice registrations.
2015-02-06 17:10:04 +00:00
Erik Johnston
af613824e4
Merge branch 'develop' of github.com:matrix-org/synapse into state-chache
2015-02-06 16:59:00 +00:00
Erik Johnston
5bf318e9a6
Bug fixes.
2015-02-06 16:52:22 +00:00
Erik Johnston
b4886264a3
Bugfix cache layer
2015-02-06 16:17:05 +00:00
Erik Johnston
c4e3029d55
Add cache layer to state group resolution
2015-02-06 16:08:13 +00:00
Mark Haines
20db147ef3
SYN-258: get_recent_events_for_room only accepts stream tokens, convert the topological token to a stream token before passing it to get_recent_events_for_room
2015-02-06 16:01:04 +00:00
Mark Haines
55a186485c
SYN-258: get_recent_events_for_room only accepts stream tokens, convert the topological token to a stream token before passing it to get_recent_events_for_room
2015-02-06 15:58:40 +00:00
Erik Johnston
cc0532a4bf
Explicitly list the RejectedReasons that we can prove
2015-02-06 15:16:26 +00:00
Erik Johnston
0cd66885e3
Move delta/v13.sql to delta/v12.sql
2015-02-06 14:38:04 +00:00
Erik Johnston
e890ce223c
Don't query auth if the only difference is events that were rejected due to auth.
2015-02-06 14:16:50 +00:00
Erik Johnston
c78b5fb1f1
Make seen_ids a set
2015-02-06 13:52:16 +00:00
Kegan Dougal
0995810273
Pyflakes: unused variable.
2015-02-06 11:45:19 +00:00
Kegan Dougal
c3ae8def75
Grant ASes the ability to delete aliases in their own namespace.
2015-02-06 11:32:07 +00:00
Kegan Dougal
e426df8e10
Grant ASes the ability to create alias in their own namespace.
...
Add a new errcode type M_EXCLUSIVE when users try to create aliases inside
AS namespaces, and when ASes try to create aliases outside their own
namespace.
2015-02-06 10:57:14 +00:00
Erik Johnston
9f2573eea1
Return body of response in HttpResponseException
2015-02-06 10:55:01 +00:00
Erik Johnston
3737329d9b
Handle the fact the list.remove raises if element doesn't exist
2015-02-06 10:53:18 +00:00
Kegan Dougal
0227618d3c
Add m.login.application_service registration procedure.
...
This allows known application services to register any user ID under their
own user namespace(s).
2015-02-05 17:29:27 +00:00
Kegan Dougal
11e6b3d18b
Dependency inject ApplicationServiceApi when creating ApplicationServicesHandler.
2015-02-05 17:04:59 +00:00
Kegan Dougal
a3c6010718
Add delta sql file.
2015-02-05 16:48:57 +00:00
Kegan Dougal
cab4c73088
Prevent user IDs in AS namespaces being created/deleted by humans.
2015-02-05 16:46:56 +00:00
Kegan Dougal
e9484d6a95
Prevent aliases in AS namespaces being created/deleted by users. Check with ASes when queried for room aliases via federation.
2015-02-05 16:29:56 +00:00
Kegan Dougal
c20281ee33
Merge branch 'develop' into application-services
2015-02-05 16:11:34 +00:00
David Baker
a93fa42bce
priority class now dealt with in namespaced rule_id
2015-02-05 15:45:16 +00:00
Kegan Dougal
fc8bcc809d
Merge branch 'develop' into application-services
2015-02-05 15:32:45 +00:00
Kegan Dougal
5b99b471b2
Fix unit tests.
2015-02-05 15:12:36 +00:00
David Baker
aaf50bf6f3
Give server default rules the 'default' attribute and fix various brokenness.
2015-02-05 15:11:38 +00:00
Kegan Dougal
c163357f38
Add CS extension for masquerading as users within the namespaces specified by the AS.
2015-02-05 15:00:33 +00:00
David Baker
2df41aa138
Server default rules now of all kinds rather than all being at lowest prio.
2015-02-05 14:46:37 +00:00
David Baker
f90782a658
namespace rule IDs to be unique within their scope and rule type.
2015-02-05 14:46:37 +00:00
Kegan Dougal
951690e54d
Merge branch 'develop' into application-services
2015-02-05 14:28:03 +00:00
Kegan Dougal
c71456117d
Fix user query checks. HS>AS pushing now works.
2015-02-05 14:17:08 +00:00
Erik Johnston
8f5b858a1b
Merge branch 'develop' of github.com:matrix-org/synapse into federation_client_retries
2015-02-05 13:50:28 +00:00
Erik Johnston
e9c85a4d5a
Connection errors in twisted aren't RuntimeErrors
2015-02-05 13:50:15 +00:00
Erik Johnston
e1515c3e91
Pass through list of room hosts from room alias query to federation so that it can retry against different room hosts
2015-02-05 13:44:42 +00:00
Kegan Dougal
0613666d9c
Serialize events before sending to ASes
2015-02-05 13:42:35 +00:00
Kegan Dougal
51d63ac329
Glue AS work to general event notifications. Add more exception handling when poking ASes.
2015-02-05 13:19:46 +00:00
Erik Johnston
26a041541b
SYN-202: Log as WARN the 404 'Presence information not visible' errors instead of as ERROR since they were spamming the logs
2015-02-05 13:17:05 +00:00
Kegan Dougal
b932600653
Add unknown room alias check. Call it from directory_handler.get_association
2015-02-05 11:47:11 +00:00
Kegan Dougal
f0c730252f
Add unknown user ID check. Use store.get_aliases_for_room(room_id) when searching for services by alias.
2015-02-05 11:25:32 +00:00
Kegan Dougal
27091f146a
Add hs_token column and generate a different token f.e application service.
2015-02-05 10:08:12 +00:00
Kegan Dougal
a1a4960baf
Impl push_bulk function
2015-02-05 09:43:22 +00:00
Erik Johnston
77e5ae22a9
Ver bump
2015-02-04 23:51:34 +00:00
Erik Johnston
19ebdc321d
Pull in python_dependencies.py from develop
2015-02-04 23:51:02 +00:00
Kegan Dougal
543e84fe70
Add SimpleHttpClient.put_json with the same semantics as get_json.
2015-02-04 17:39:51 +00:00
Erik Johnston
8046df6efa
Merge branch 'develop' of github.com:matrix-org/synapse into federation_client_retries
2015-02-04 17:37:34 +00:00
Kegan Dougal
6d3e4f4d0a
Update user/alias query APIs to use new format of SimpleHttpClient.get_json
2015-02-04 17:32:44 +00:00
Kegan Dougal
96d4bf9012
Modify API for SimpleHttpClient.get_json and update usages.
...
Previously, this would only return the HTTP body as JSON, and discard other
response information (e.g. the HTTP response code). This has now been changed
to throw a CodeMessageException on a non-2xx response, with the response code
and body, which can then be parsed as JSON.
Affected modules include:
- Registration/Login (when using an email for IS auth)
2015-02-04 17:07:31 +00:00
Kegan Dougal
aa8cce58bf
Add query_user/alias APIs.
2015-02-04 16:44:53 +00:00
Erik Johnston
d45e2302ed
Merge branch 'signature_failures' of github.com:matrix-org/synapse into federation_client_retries
2015-02-04 16:30:15 +00:00
Erik Johnston
ae46f10fc5
Apply sanity to the transport client interface. Convert 'make_join' and 'send_join' to accept iterables of destinations
2015-02-04 16:28:12 +00:00
David Baker
2e77ba637a
More s/instance_handle/profile_tag/
2015-02-04 16:24:15 +00:00
Kegan Dougal
ce8bc642ae
Merge branch 'develop' into application-services
2015-02-04 15:31:02 +00:00
Kegan Dougal
89f2e8fbdf
Fix bug in store defer. Add more unit tests.
2015-02-04 15:21:03 +00:00
Erik Johnston
95e2d2d36d
When returning lists of servers from alias lookups, put the current server first in the list
2015-02-04 15:02:23 +00:00
Erik Johnston
650e32d455
Change context.auth_events to what the auth_events would be bases on context.current_state, rather than based on the auth_events from the event.
2015-02-04 14:06:46 +00:00
Erik Johnston
ff78eded01
Retry make_join
2015-02-04 13:55:10 +00:00
Kegan Dougal
525a218b2b
Begin to add unit tests for appservice glue and regex testing.
2015-02-04 12:24:20 +00:00