aboutsummaryrefslogtreecommitdiff
path: root/.github
AgeCommit message (Collapse)Author
2022-08-23Complement QoL changes (#2663)Till
This PR does the following: - adds a `keysize` parameter to `generate-keys`, so we can use lower sized keys when running in CI - updates the Complement docker files to use BuildKit (requires Docker >18.09) - uses `exec` when executing `dendrite-monotlith-server`, making it PID 1 inside docker, which results in Dendrite actually receiving the `SIGTERM` signal send by Docker. (Making it faster when running tests with Complement, as we don't take 10 seconds to timeout)
2022-08-18Enable `workflow_dispatch` in GHANeil Alexander
2022-08-12Protect user_interactive reads and writes with locks (#2635)Tak Wai Wong
* Protect user_interactive reads and writes with locks * Ignore golangci-lint false positive * fix lint Co-authored-by: Tak Wai Wong <tak@hntlabs.com>
2022-08-11Update `golangci-lint` component in GHA workflowNeil Alexander
2022-08-03Disable stack protector on Linux CI build pipelines for now (to avoid ↵Neil Alexander
`relocation target __stack_chk_fail_local not defined` errors)
2022-08-03Test Go 1.19 in CINeil Alexander
2022-07-25Update database migrations, remove goose (#2264)Till
* Add new db migration * Update migrations Remove goose * Add possibility to test direct upgrades * Try to fix WASM test * Add checks for specific migrations * Remove AddMigration Use WithTransaction Add Dendrite version to table * Fix linter issues * Update tests * Update comments, outdent if * Namespace migrations * Add direct upgrade tests, skipping over one version * Split migrations * Update go version in CI * Fix copy&paste mistake * Use contexts in migrations Co-authored-by: kegsay <kegan@matrix.org> Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-07-11Ristretto cache (#2563)Neil Alexander
* Try Ristretto cache * Tweak * It's beautiful * Update GMSL * More strict keyable interface * Fix that some more * Make less panicky * Don't enforce mutability checks for now * Determine mutability using deep equality * Tweaks * Namespace keys * Make federation caches mutable * Update cost estimation, add metric * Update GMSL * Estimate cost for metrics better * Reduce counters a bit * Try caching events * Some guards * Try again * Try this * Use separate caches for hopefully better hash distribution * Fix bug with admitting events into cache * Try to fix bugs * Check nil * Try that again * Preserve order jeezo this is messy * thanks VS Code for doing exactly the wrong thing * Try this again * Be more specific * aaaaargh * One more time * That might be better * Stronger sorting * Cache expiries, async publishing of EDUs * Put it back * Use a shared cache again * Cost estimation fixes * Update ristretto * Reduce counters a bit * Clean up a bit * Update GMSL * 1GB * Configurable cache sizees * Tweaks * Add `config.DataUnit` for specifying friendly cache sizes * Various tweaks * Update GMSL * Add back some lazy loading caching * Include key in cost * Include key in cost * Tweak max age handling, config key name * Only register prometheus metrics if requested * Review comments @S7evinK * Don't return errors when creating caches (it is better just to crash since otherwise we'll `nil`-pointer exception everywhere) * Review comments * Update sample configs * Update GHA Workflow * Update Complement images to Go 1.18 * Remove the cache test from the federation API as we no longer guarantee immediate cache admission * Don't check the caches in the renewal test * Possibly fix the upgrade tests * Update to matrix-org/gomatrixserverlib#322 * Update documentation to refer to Go 1.18
2022-07-01Disable WebAssembly builds for nowNeil Alexander
2022-04-26Checkout correct branch for SytestTill Faelligen
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-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-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-05Add Are We Synapse Yet to GHA (#2321)Till
* Add Are We Synapse Yet to GHA * Better output & add comments
2022-03-25Pass DOCKER_TOKEN secret into Docker workflowNeil Alexander
2022-03-25One final tweak to the GHA pipelineNeil Alexander
2022-03-25Give packages permission to `update-docker-images`Neil Alexander
2022-03-25Use correct path nameNeil Alexander
2022-03-25Factor Docker step into own jobNeil Alexander
2022-03-25Specify branch name in Docker flowNeil Alexander
2022-03-25Fix Docker flowNeil Alexander
2022-03-25Chain Docker update onto `main`Neil Alexander
2022-03-25Update Docker workflow some moreNeil Alexander
2022-03-24Use `github.actor` for GHCR uploadNeil Alexander
2022-03-24Fix Docker flowNeil Alexander
2022-03-24Allow manual Docker tasks in GHANeil Alexander
2022-03-24Upload Docker images for releases to both Docker Hub and GitHub Container ↵Neil Alexander
Registry (#2299) * Upload Docker images for releases to both Docker Hub and GitHub Container Registry * Build current images on `:main` tag * Use Dendrite flow to trigger Docker flow for `:main` * Tweaks * Fix references to `env.GHCR_NAMESPACE`
2022-03-24Update dendrite.ymlNeil Alexander
2022-03-24Update `on` section of GHA workflowNeil Alexander
2022-03-24Check for success of initial tests on GHANeil Alexander
2022-03-24Hopefully fail `Initial tests passed` if they actually failed (#2298)Neil Alexander
2022-03-24Move CI to Github Actions (#2297)S7evinK
* Initial test * Move CI to GHA * Naming * Always report all linter issues * Remove if true * Test complement in different variations * Try again * Move Complement back after initial tests and readd timeout Make linting fail further checks Remove CodeQL * Update and rename tests.yml to dendrite.yml Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-03-23Update PR template (#2294)kegsay
2022-03-01Make complement go fast (#2240)kegsay
2022-02-11Don't allow parallel complement tests (#2169)kegsay
Fixes flakiness seemingly. See https://github.com/matrix-org/synapse/pull/11910
2022-02-08Various updates for renaming the `master` branch to `main`Neil Alexander
2022-01-24Add Complement to GHA (#2108)kegsay
* Add Complement to GHA * Only run on push on master
2022-01-21Expand issue template (#2103)kegsay
2021-12-09Set @matrix-org/dendrite-core as repository code ownerNeil Alexander
2021-07-20Add startup testing for Wasm Pinecone build (#1910)J. Ryan Stinnett
* Only include go-sqlite3 on the relevant binaries * The driver name is always sqlite3 now * Update to matrix-org/go-sqlite3-js@e537baa * Add initial Wasm test harness * Upgrade go-sqlite3-js This fixes an error about semicolons in single statements. * Add browser-like WebSocket API for testing * Upgrade go-sqlite3-js This upgrade includes printing panic messages next to stacks. * Run for all PRs targeting any branch * Use manual Node caching * Temporarily run for all pushes * Use npm ci instead of install * Use HTTPS auth for repo packages * Match path style from build.sh * update utp Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2021-01-18Use dendritegithub for Docker Hub imagesNeil Alexander
2021-01-18Version 0.3.6v0.3.6Neil Alexander
2021-01-18Update GHA Docker Hub buildsNeil Alexander
Squashed commit of the following: commit 4a61aa711473deece2adf415cfd65501dbca63b2 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Mon Jan 18 12:19:24 2021 +0000 Set back to matrixdotorg on published releases commit 6d1ac53f2c0c9b30e1e70c0bb1559e1b8ec874a2 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Mon Jan 18 11:55:28 2021 +0000 Rename commit 258999f7fb7b655b3a02a06a7ea05e66fb7740fb Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Mon Jan 18 11:52:26 2021 +0000 Refactor multi-stage builds commit c7ab8e476939899571e7b5668860dec372b9b60f Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Mon Jan 18 11:13:19 2021 +0000 Let's try this again
2021-01-18Build docker branch onlyNeil Alexander
2021-01-18Update docker-build-and-push.ymlNeil Alexander
2021-01-18GitHub action for automatic multiarch Docker build (#1613)TR_SLimey
* Create docker-build-and-push.yml * Switched to using official Docker buildx action * Added comment to docker-build-and-push.yml In case something needs to be tweaked in the future, the link contains some examples and explanations which would be useful * Run only on release (and produce release tags) As this workflow takes quite a lot of time, and [pushing to master happens frequently](https://github.com/matrix-org/dendrite/pull/1613#issuecomment-746086980), the container will now only be built when a release is created, and the builds will also be correctly tagged. * Add latest tag, test at neilalexander/dendrite* Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2020-10-02Update PULL_REQUEST_TEMPLATE.mdNeil Alexander
2020-10-01Add custom issue templates; fixes #1421 (#1460)Kegsay
2020-09-30CodeQL analysisNeil Alexander
2020-09-24Update all usages of tx.Stmt to sqlutil.TxStmt (#1423)Sam
* Replace all usages of txn.Stmt with sqlutil.TxStmt Signed-off-by: Sam Day <me@samcday.com> * Fix sign off link in PR template. Signed-off-by: Sam Day <me@samcday.com> Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>