aboutsummaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)Author
2023-03-03Updated instructions and references to monolith to their new names (#2994)Robin Westerik
Currently, the documentation makes use of the old names for the binary and configuration files. This updates the documentation so that users can follow the guide without issues again. These changes don't require any go unit tests because it does not modify any golang code. Signed-off-by: `Robin Westerik <gh@westerik.me>`
2023-03-01unix socket support (#2974)Boris Rybalkin
### Pull Request Checklist <!-- Please read https://matrix-org.github.io/dendrite/development/contributing before submitting your pull request --> * [x] I have added Go unit tests or [Complement integration tests](https://github.com/matrix-org/complement) for this PR _or_ I have justified why this PR doesn't need tests * [x] Pull request includes a [sign off below using a legally identifiable name](https://matrix-org.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed-off-by: `Boris Rybalkin <ribalkin@gmail.com>` I need this for Syncloud project (https://github.com/syncloud/platform) where I run multiple apps behind an nginx on the same RPi like device so unix socket is very convenient to not have port conflicts between apps. Also someone opened this Issue: https://github.com/matrix-org/dendrite/issues/2924 --------- Co-authored-by: kegsay <kegan@matrix.org> Co-authored-by: Till <2353100+S7evinK@users.noreply.github.com>
2023-03-01Refactor `StoreEvent`, add `MaybeRedactEvent`, create an `EventDatabase` (#2989)Till
This PR changes the following: - `StoreEvent` now only stores an event (and possibly prev event), instead of also doing redactions - Adds a `MaybeRedactEvent` (pulled out from `StoreEvent`), which should be called after storing events - a few other things
2023-02-24Fix lint errorDevon Hudson
2023-02-24Tweaks to pinecone demo to shutdown more cleanlyDevon Hudson
2023-02-24Refactor `StoreEvent` and create a new `RoomDatabase` interface (#2985)Till
This PR changes a few things: - It pulls out the creation of several NIDs from the `StoreEvent` function to make the functions more reusable - Uses more caching when using those NIDs to avoid DB round trips
2023-02-20Merge keyserver & userapi (#2972)Till
As discussed yesterday, a first draft of merging the keyserver and the userapi.
2023-02-14Remove polylith/API mode (#2967)Till
This removes most of the code used for polylith/API mode. This removes the `/api` internal endpoints entirely. Binary size change roughly 5%: ``` 51437560 Feb 13 10:15 dendrite-monolith-server # old 48759008 Feb 13 10:15 dendrite-monolith-server # new ```
2023-02-01Consolidate pinecone demo http server variationsDevon Hudson
2023-02-01Refactor common pinecone demo code to remove major duplicationDevon Hudson
2023-02-01Refactor pinecone demo to remove duplicate pinecone setupDevon Hudson
2023-02-01Refactor pinecone demo to remove duplicate key setupDevon Hudson
2023-02-01Refactor conduit type from pinecone demo into its own packageDevon Hudson
2023-02-01Refactor common relay sync struct to remove duplicationDevon Hudson
2023-01-29Add cmd line option to pinecone demo for enabling relayingDevon Hudson
2023-01-29Add pinecone demo toggle for dis/enabling relaying for other nodesDevon Hudson
2023-01-26Move relay arch into relayapi and add docs for new endpointsDevon Hudson
2023-01-23Initial Store & Forward Implementation (#2917)devonh
This adds store & forward relays into dendrite for p2p. A few things have changed: - new relay api serves new http endpoints for s&f federation - updated outbound federation queueing which will attempt to forward using s&f if appropriate - database entries to track s&f relays for other nodes
2023-01-23Use `t.TempDir` for SQLite databases, so tests don't rip out each others ↵Till
databases (#2950) This should hopefully finally fix issues about `disk I/O error` as seen [here](https://gitlab.alpinelinux.org/alpine/aports/-/jobs/955030/raw) Hopefully this will also fix `SSL accept attempt failed` issues by disabling HTTP keep alives when generating a config for CI.
2023-01-20Fix oversight in cmd/generate-config (#2946)Bernhard Feichtinger
The -dir argument was ignored for media_api->base_path. Signed-off-by: `Bernhard Feichtinger <43303168+BieHDC@users.noreply.github.com>`
2022-12-23Add clientapi tests (#2916)Till
This PR - adds several tests for the clientapi, mostly around `/register` and auth fallback. - removes the now deprecated `homeserver` field from responses to `/register` and `/login` - slightly refactors auth fallback handling
2022-12-12Cleanup stale device lists for users we don't share a room with anymore (#2857)Till
The stale device lists table might contain entries for users we don't share a room with anymore. This now asks the roomserver about left users and removes those entries from the table. Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-12-05Enable/Disable internal metrics (#2899)Till
Basically enables us to use `test.WithAllDatabases` when testing internal HTTP APIs, as this would otherwise result in Prometheus complaining about already registered metric names.
2022-12-02Test and CI related changes (#2896)Till
In an attempt to: - make on-boarding a bit easier (`go test ./...` should now not need additional postgres setup) - get code coverage faster, not only scheduled at night - test the `create-account` binary
2022-12-01Fix `dendrite-demo-pinecone`, `/_dendrite` namespace setupNeil Alexander
2022-12-01Expose `/_dendrite` and `/_synapse` on the P2P demo HTTP muxesNeil Alexander
2022-12-01Make `create-account` more verboseNeil Alexander
2022-11-18Add p2p wakeup broadcast handling to pinecone demos (#2841)devonh
Adds wakeup broadcast handling to the pinecone demos. This will reset their blacklist status and interrupt any ongoing federation queue backoffs currently in progress for this peer. The end result is that any queued events will quickly be sent to the peer if they had disconnected while attempting to send events to them.
2022-11-15Federation fixes for virtual hostingNeil Alexander
2022-11-11Run upgrade tests for SQLite too (#2875)Neil Alexander
This should hopefully catch problems with database migrations in SQLite as well as PostgreSQL.
2022-11-10Fix lint errorNeil Alexander
2022-11-10Improve logging in upgrade testsNeil Alexander
2022-11-02Add readme for dendrite-demo-pinecone (#2851)devonh
2022-11-02Multi-stage Docker builds (#2850)Neil Alexander
This builds on @S7evinK's work to make multi-stage Docker builds. Now that we can build SQLite without Cgo this should be much simpler and should make Docker builds in CI significantly faster. Co-authored-by: Till Faelligen <tfaelligen@gmail.com> Co-authored-by: Till Faelligen <davidf@element.io> Co-authored-by: Till Faelligen <2353100+S7evinK@users.noreply.github.com>
2022-11-02Fix `moderncsqlite` errors and rebase onto `main` (#2832)0x1a8510f2
This is #2819 but rebased on latest `main`. This PR is against main too as opposed to the `moderncsqlite` branch. The main change here is simply: ```go // add query parameters to the dsn if strings.Contains(dsn, "?") { dsn += "&" } else { dsn += "?" } // wait some time before erroring if the db is locked // https://gitlab.com/cznic/sqlite/-/issues/106#note_1058094993 dsn += "_pragma=busy_timeout%3d10000" ``` ### Pull Request Checklist <!-- Please read https://matrix-org.github.io/dendrite/development/contributing before submitting your pull request --> * [x] I have added tests for PR _or_ I have justified why this PR doesn't need tests. * [x] Pull request includes a [sign off below using a legally identifiable name](https://matrix-org.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed off privately. Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-10-26Update Yggdrasil demoNeil Alexander
2022-10-17Return error if we fail to read the response bodyTill Faelligen
2022-10-04Revert Docker changesNeil Alexander
2022-10-04Update Dockerfile (#2342)Till
Updates/adds a new multistage (build-kit) Dockerfile. (if accepted, could make `Dockerfile.monolith` and `Dockerfile.polylith` in `build/docker` obsolete) There's no huge difference between the dockerfiles, except this uses a non-root user when running the container, also doesn't copy the working directory to the image when building. Also adds vulnerabilities scans using [Trivy](https://github.com/aquasecurity/trivy) for the created docker images. (untested) Building images is done using ``` docker build . --target image-monolith -t dendrite-monolith docker build . --target image-polylith -t dendrite-polylith ``` As noted in the comments, only adds `dendrite-polylith-multi` to the polylith image and all required binaries to the monolith image. Probably needs some docs updating, if this is accepted. Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-10-03Update P2P base directoriesNeil Alexander
2022-10-03Hopefully fix P2P `--config` error (re. #2756)Neil Alexander
2022-10-02Use non-HTTPS as default URL, as most people will be running behind aTill Faelligen
reverse proxy
2022-09-27Update search docsNeil Alexander
2022-09-27Fulltext implementation using Bleve (#2675)Till
Based on #2480 This actually indexes events based on their event type. They are removed from the index if we receive a `m.room.redaction` event on the `OutputRoomEvent` stream. An admin endpoint is added to reindex all existing events. Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-09-23Add `-dir` option to `dendrite-demo-pinecone` and `dendrite-demo-yggdrasil`Neil Alexander
2022-09-15Hopefully fix `upgrade-tests` (#2717)Till
Wait for events to come down `/sync` before ending the test.
2022-09-14Fix Pinecone demo build errors after Pinecone updateNeil Alexander
2022-09-12P2P demo tweaksNeil Alexander
2022-09-05Optimise `resolve-state` toolNeil Alexander
2022-09-01Update P2P demosNeil Alexander