aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-21Remove libp2p demos (#2337)Neil Alexander
* Remove libp2p demos * Put it back
2022-04-20Update test listNeil Alexander
2022-04-20Eliminate more SQL no row errors in sync API (#2363)Neil Alexander
* Handle `sql.ErrNoRows` in main `/sync` codepaths * Catch more
2022-04-20Lazy loading fixes (#2362)Neil Alexander
* Return some more usefully wrapped errors when doing sync * Remove unnecessary error check * Couple of guards around `sql.ErrNoRows` * Nolint
2022-04-20Update to NATS Server v2.8.0 and nats.go v1.14.0 (#2359)Neil Alexander
2022-04-19Use unix not secondKegan Dougal
2022-04-19Add newly passing test to listNeil Alexander
2022-04-19Update `go-sqlite3-js` to matrix-org/go-sqlite3-js#2 (SQLite 3.36.0)Neil Alexander
2022-04-19Change `pushkey_ts` to be seconds (fix #2354) (#2358)Neil Alexander
2022-04-19Make sure resp.Username is defined before hashing. Fixes #2356 (#2357)fcwoknhenuxdfiyv-nextcloud
Co-authored-by: Jason Quigley <jason@onecha.net>
2022-04-19Implement lazy loading on `/sync` (#2346)Till
* Initial work on lazyloading * Partially implement lazy loading on /sync * Rename methods * Make missing tests pass * Preallocate slice, even if it will end up with fewer values * Let the cache handle the user mapping * Linter * Cap cache growth
2022-04-14Refactor media storage layer, add tests (#2352)Till
* Refactor mediaapi storage layer * Verify filetype before trying to create thumbnails * Add media api storage tests * Fix returned values
2022-04-13Use default sync filter if specified filter is not found (should fix #2350) ↵Neil Alexander
(#2351)
2022-04-13Precompute values for `userIDSet` in sync notifier (#2348)Neil Alexander
* Precompute values for `userIDSet` in sync notifier * Mutexes * Fixes * Sensible initial value * Update syncapi/notifier/notifier.go Co-authored-by: Till <2353100+S7evinK@users.noreply.github.com> * Placate the almighty linter Co-authored-by: Till <2353100+S7evinK@users.noreply.github.com>
2022-04-13Make `/messages` filterable (#2347)Till
* Make /messages filterable Fix bug when determining if an event contains an URL * Add newly passing test * Fix test
2022-04-11Add database namespacing for unit tests (#2340)kegsay
* Add database namespacing for unit tests Background: Running `go test ./...` will run tests in different packages concurrently. This can be stopped or limited by using `-p 1` (no concurrency). We want concurrency, but this causes problems when running Postgres DBs in CI. The problem is that, in CI, we have 1x postgres server exposing 1x postgres DB, which we wipe clean at the end of each test via `defer close()`. When tests run concurrently, calls to `close()` will delete data/tables which other tests are currently using, causing havoc. Fix this by: - Creating a database per package. - Namespacing the database name by a hash of the current working directory (the directory containing those `_test.go` files) This is exactly what SQLite does, quite unintentionally, via the use of `file:dendrite_test.db`, which dumps the file into the current working directory which is the package running the tests, hence deleting the file is safe when running concurrently. * Linting * Don't create the database in a txn * dupe db is not an error
2022-04-11Correctly use provided filters (#2339)Till
* Apply filters correctly * Fix issues; Use prepareWithFilters * Update gmsl & tests * go.mod.. * PR comments
2022-04-09Remove dead code in the sync api (#2341)kegsay
2022-04-08syncapi: add more tests; fix more bugs (#2338)kegsay
* syncapi: add more tests; fix more bugs bugfixes: - The postgres impl of TopologyTable.SelectEventIDsInRange did not use the provided txn - The postgres impl of EventsTable.SelectEvents did not preserve the ordering of the input event IDs in the output events slice - The sqlite impl of EventsTable.SelectEvents did not use a bulk `IN ($1)` query. Added tests: - `TestGetEventsInRangeWithTopologyToken` - `TestOutputRoomEventsTable` - `TestTopologyTable` * -p 1 for now
2022-04-08Update to matrix-org/pinecone@2999ea2Neil Alexander
2022-04-08Update to matrix-org/pinecone@9b3963248c9bdc22cf0789bc3ca58e8f274371e6Neil Alexander
2022-04-08Use connection manager in Pinecone demosNeil Alexander
2022-04-08Update dependencies (#2336)Neil Alexander
2022-04-08Add metrics for internal API requests (#2310)Till
* Add response size and requests total to internal handler * Move MustRegister calls to New* funcs * Move MustRegister back to init * Init at some place, minimize changes
2022-04-08Remove `client-api-proxy` and `federation-api-proxy` (closes #928) (#2335)Neil Alexander
2022-04-08Fix data race in `TestCorrectStreamWakeup` (#2334)Neil Alexander
2022-04-08Prevent setting push rules via account data endpoint (#2333)Neil Alexander
2022-04-08Handle QueryAccountAvailabilityPath in internal user API (#2332)PiotrKozimor
2022-04-08Add test infrastructure code for dendrite unit/integ tests (#2331)kegsay
* Add test infrastructure code for dendrite unit/integ tests Start re-enabling some syncapi storage tests in the process. * Linting * Add postgres service to unit tests * dendrite not syncv3 * Skip test which doesn't work * Linting * Add `jetstream.PrepareForTests` Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-04-07Dendrite 0.8.1v0.8.1Neil Alexander
2022-04-07Fix lock contention in sync notifierNeil Alexander
2022-04-07Version 0.8.0 (#2330)v0.8.0Neil Alexander
* Version 0.8.0 * Update changelog again
2022-04-07Send avatar updates asynchronously, same as display name updatesNeil Alexander
2022-04-07Add possibility to ignore users (#2329)Till
* Add ignore users * Ignore users in pushrules Add passing tests * Update sytest lists * Store ignore knowledge in the sync API * Fix copyrights Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-04-07Simplify presence stringification (should help with ↵Neil Alexander
vector-im/element-android#5712)
2022-04-06Fix bug where state events could be requested twice in appservices (#2328)Neil Alexander
* Fix bug where state events could be requested twice (should fix #2305) * Avoid a pointless HTTP request if possible
2022-04-06Update README.mdNeil Alexander
2022-04-06Sync notifier tweaks (#2327)Neil Alexander
* Micro-optimisations, lock fixes * Refactor `SharedUsers` * Reuse map to reduce allocations/GC pressure * oh yeah, initialise it * Leave room for the user ID we'll no doubt append afterward
2022-04-06Reduce allocations in `/sync` presence stream (#2326)Neil Alexander
* Reduce allocations on presence * Try to reduce allocations further * Tweak `IsSharedUser` some more * Take map lock
2022-04-06Add presence module V2 (#2312)Till
* Syncapi presence * Clientapi http presence handler * Why is this here? * Missing files * FederationAPI presence implementation * Add new presence stream * Pinecone update * Pinecone update * Add passing tests * Make linter happy * Add presence producer * Add presence config option * Set user to unavailable after x minutes * Only set currently_active if online Avoid unneeded presence updates when syncing * Tweaks * Query devices for last_active_ts Fixes & tweaks * Export SharedUsers/SharedUsers * Presence stream in MemoryStorage * Remove status_msg_nil * Fix sytest crashes * Make presence types const and use stringer for it * Change options to allow inbound/outbound presence * Fix option & typo * Update configs Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-04-06Reduce the number of allocations made by `localRoomMembers` when consuming ↵Neil Alexander
stream events for push notifications (#2324)
2022-04-05Nuke a couple of tests for nowNeil Alexander
2022-04-05Update the "Are We Synapse Yet?" listNeil Alexander
2022-04-05Merge branch 'main' of github.com:matrix-org/dendriteNeil Alexander
2022-04-05Update to matrix-org/gomatrixserverlib#300Neil Alexander
2022-04-05Add Are We Synapse Yet to GHA (#2321)Till
* Add Are We Synapse Yet to GHA * Better output & add comments
2022-04-05Update sytest-whitelist againNeil Alexander
2022-04-05build.sh to build.cmd (#2319)Emanuele Aliberti
* build.sh to build.cmd convert and adapt for Windows users * remove hardwired GO ARCH * silence cmd.exe * update directions for Windows * Update INSTALL.md Co-authored-by: emanuele.aliberti <emanuele.aliberti@mtka.eu> Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-04-05Added /upgrade endpoint (#2307)David Spenler
* Added /upgrade endpoint * fix * Fix lints * More lint lifex * Move room upgrading to the roomserver * Remove extraneous arg * Fix HTTP API for `PerformUpgrade` * Reduce number of API calls in `generateInitialEvents`, preserve membership fields * Refactor `generateInitialEvents` to preserve old state events for all but the essential room setup events * Handle ban events in the state transfer * Refactor and comment `createTemporaryPowerLevels` * Only send two power levels if we needed to override the levels, preserve miscellaneous fields in the create event * Fix copyrights * Review comments @S7evinK * Update sytest whitelist * Specify empty state keys, use `EventLevel`, remove unnecessary check on state copy * Add comment to `restrictOldRoomPowerLevels` * Ensure canonical aliases exist before clearing * Copy invites as well as bans * Fix return error on `m.room.tombstone` handling in client API * Relax checks for well-formedness of join rules, membership event etc Co-authored-by: Alex Kursell <alex@awk.run> Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com> Co-authored-by: kegsay <kegan@matrix.org>
2022-04-04Update to matrix-org/gomatrixserverlib#299Neil Alexander