aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2022-04-04remove obsolete config entry "federation_certificates" (#2318)Sebastian Spaeth
* Remove all federation_certificates occurencs This configuration value has not been used since 2019 apparently, and indeed it is never really used in the code base. So remove all traces of it from the various configuration files. Also remove the unused variable FederationCertificatePaths Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> * setup/config/config_test.go: remove federation_sender config snippet The federation_sender: section was folded into the federation_api some time ago, and this seems to be the only leftover in the code base. So remove it.
2022-04-04Fix `dendritejs-pinecone` buildNeil Alexander
2022-04-04Enhanced calm at startup of Pinecone demosNeil Alexander
2022-04-04Update to matrix-org/pinecone@e526fa8Neil Alexander
2022-04-04Slower federation warm-up (#2320)Neil Alexander
* Wake destination queues gradually, rather than all at once * Delay device list updates too * Maximum two minute warmup period
2022-04-04Fix sign-off link in `CONTRIBUTING.md`Neil Alexander
2022-04-04Fix unlimitedSize uploads (#2317)S7evinK
2022-04-01Include joined and invite member counts in room summary (#2315)Neil Alexander
* Include joined and invite member counts in room summary This should fix #2314 and also fix the problem where some clients like Element Android, Fluffychat etc would display the wrong member count for a given room. * Improve SQLite query precision * Check existence of state key for membership events
2022-03-30Update Pinecone P2P demoNeil Alexander
2022-03-29Remove eduserver (#2306)S7evinK
* Move receipt sending to own JetStream producer * Move SendToDevice to producer * Remove most parts of the EDU server * Fix SendToDevice & copyrights * Move structs, cleanup EDU Server traces * Use HeadersOnly subscription * Missing file * Fix linter issues * Move consumers to own files * Rename durable consumer; Consumer cleanup * Docs/config cleanup
2022-03-28User directory for nearby Pinecone peers (P2P demo) (#2311)Neil Alexander
* User directory for nearby Pinecone peers * Fix mux routing * Use config to determine which server notices user to exclude
2022-03-28Fix account availability on registerNeil Alexander
2022-03-28P2P demo tweaksNeil Alexander
2022-03-28Ensure Dendrite has stopped in Pinecone demo `Stop()`Neil Alexander