83 Commits

Author SHA1 Message Date
Kegan Dougal
941b8d8a60 Use the same go version in tests as in the Dockerfile (1.19).. again 2023-02-02 12:11:14 +00:00
Kegan Dougal
ac6d7d1845 Use the same go version in tests as in the Dockerfile (1.19) 2023-02-02 12:07:44 +00:00
Kegan Dougal
ed14c8d7bd Maybe add M1 Mac support in pre-built docker images 2023-02-01 11:04:36 +00:00
David Baker
e51b842d5b
Oops, wrong repo! 2023-02-01 09:57:29 +00:00
David Baker
94204625e2
Update docker.yml 2023-02-01 09:56:25 +00:00
kegsay
f2efb3caa9
Point to correct docker repo 2023-01-23 17:29:13 +00:00
Till Faelligen
c0fe778c4a
Re-enable building/pushing docker images 2023-01-13 20:15:05 +01:00
Till Faelligen
0e4d3e44f0
Disable building docker images for now 2023-01-12 19:15:28 +01:00
Till Faelligen
ccf2b5423f
Remove build target 2023-01-12 18:25:49 +01:00
Till Faelligen
a6e6d6db90
Remove sliding-sync target 2023-01-12 18:08:43 +01:00
Till Faelligen
c29cc77843
Enable buildkit 2023-01-12 08:53:14 +01:00
Till Faelligen
558a089090
Add GHA docker image workflow 2023-01-12 08:41:15 +01:00
Kegan Dougal
3070292fba Fix failing receipts test; use a newer synapse version 2022-12-15 10:11:46 +00:00
Kegan Dougal
be8543a21a add extensions for typing and receipts; bugfixes and additional perf improvements
Features:
 - Add `typing` extension.
 - Add `receipts` extension.
 - Add comprehensive prometheus `/metrics` activated via `SYNCV3_PROM`.
 - Add `SYNCV3_PPROF` support.
 - Add `by_notification_level` sort order.
 - Add `include_old_rooms` support.
 - Add support for `$ME` and `$LAZY`.
 - Add correct filtering when `*,*` is used as `required_state`.
 - Add `num_live` to each room response to indicate how many timeline entries are live.

Bug fixes:
 - Use a stricter comparison function on ranges: fixes an issue whereby UTs fail on go1.19 due to change in sorting algorithm.
 - Send back an `errcode` on HTTP errors (e.g expired sessions).
 - Remove `unsigned.txn_id` on insertion into the DB. Otherwise other users would see other users txn IDs :(
 - Improve range delta algorithm: previously it didn't handle cases like `[0,20] -> [20,30]` and would panic.
 - Send HTTP 400 for invalid range requests.
 - Don't publish no-op unread counts which just adds extra noise.
 - Fix leaking DB connections which could eventually consume all available connections.
 - Ensure we always unblock WaitUntilInitialSync even on invalid access tokens. Other code relies on WaitUntilInitialSync() actually returning at _some_ point e.g on startup we have N workers which bound the number of concurrent pollers made at any one time, we need to not just hog a worker forever.

Improvements:
 - Greatly improve startup times of sync3 handlers by improving `JoinedRoomsTracker`: a modest amount of data would take ~28s to create the handler, now it takes 4s.
 - Massively improve initial initial v3 sync times, by refactoring `JoinedRoomsTracker`, from ~47s to <1s.
 - Add `SlidingSyncUntil...` in tests to reduce races.
 - Tweak the API shape of JoinedUsersForRoom to reduce state block processing time for large rooms from 63s to 39s.
 - Add trace task for initial syncs.
 - Include the proxy version in UA strings.
 - HTTP errors now wait 1s before returning to stop clients tight-looping on error.
 - Pending event buffer is now 2000.
 - Index the room ID first to cull the most events when returning timeline entries. Speeds up `SelectLatestEventsBetween` by a factor of 8.
 - Remove cancelled `m.room_key_requests` from the to-device inbox. Cuts down the amount of events in the inbox by ~94% for very large (20k+) inboxes, ~50% for moderate sized (200 events) inboxes. Adds book-keeping to remember the unacked to-device position for each client.
2022-12-14 18:53:55 +00:00
Kegan Dougal
7ac03c46ca Add end-to-end spaces test; tweak e2e script; fix embarrassing negation bug
- Tests exercise multiple pre-configured spaces as well as adding/removing children on the fly.
- E2E run-tests.sh script now uses `$@` to pass through args to `go test` for running e2e tests with timeouts/single tests/etc
- Spaces are deleted when there is no valid `via` key, not when there is(!)
2022-07-29 16:04:12 +01:00
Kegan Dougal
cc9a35926f Exclude tests-e2e in integration tests 2022-07-25 17:58:04 +01:00
Kegan Dougal
1e8ca38f79 e2e tests: add prev_batch tests
Uses a client theived from Complement since it does exactly what I want.
2022-07-25 17:51:26 +01:00
Kegan Dougal
f4e5bca26c Bump go version; rename GHA jobs 2022-07-25 15:13:24 +01:00
Kegan Dougal
75c3579f9e refactor: move integration tests to tests-integration directory
Add tests-e2ee directory for end-to-end tests which require a synapse
server.
2022-07-25 15:06:13 +01:00
Kegan Dougal
f9f03ab96d localhost not synapse 2022-07-25 14:32:10 +01:00
Kegan Dougal
2c6592a772 Debug logging for hostname resolution 2022-07-25 14:24:53 +01:00
Kegan Dougal
f43a1d4196 Possible working synapse service 2022-07-25 14:16:35 +01:00
Kegan Dougal
5915f9448c Try fruitlessly to run commands directly in options 2022-07-22 18:35:32 +01:00
Kegan Dougal
7d5ec22f25 This probably won't work but let's check 2022-07-22 18:27:23 +01:00
Kegan Dougal
d8a8035998 Latest tags maybe 2022-07-22 18:19:41 +01:00
Kegan Dougal
0c5225dfa2 test e2e build with synapse service 2022-07-22 18:18:25 +01:00
Kegan Dougal
2246cb5436 Add CI for checking /client; prep for new version 2022-07-14 15:35:52 +01:00
Kegan Dougal
95bd30feb9 Add test coverage to CI 2022-04-12 12:46:02 +01:00
Kegan Dougal
6e55f7f608 tests: make a consistent test env for both local and CI runs
- Only have a single database for all tests, like CI.
- Calling `PrepareDBConnectionString` drops all tables before returning
  the string.
- Tests must be run with no concurrency else they will step on each other
  due to the previous point.

This should prevent cases where local tests pass but CI fails.
2021-11-09 10:15:48 +00:00
Kegan Dougal
33cf1542aa Add Assert() function which works like C assert()
Particularly as the server expands into multiple lists and
filters, having a way to quickly detect off-by-one index
errors is important, so add an assert() function which
will panic() if SYNCV3_DEBUG=1 else log an angry message.
2021-11-08 13:04:03 +00:00
Kegan Dougal
cc22c99a03 Maybe run it locally 2021-06-03 15:29:46 +01:00
Kegan Dougal
9568457743 Kick GH actions 2021-06-03 15:25:17 +01:00
Kegan Dougal
8d640a7c16 GH action support 2021-06-03 15:23:07 +01:00