Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

Commit 0191f7c

Browse files
authored
Merge branch 'main' into numeric-username-restriction
2 parents 153474a + c4528b2 commit 0191f7c

File tree

273 files changed

+6419
-3292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+6419
-3292
lines changed

.dockerignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
bin
2-
*.wasm
3-
.git
2+
*.wasm

.github/ISSUE_TEMPLATE/BUG_REPORT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ If you can identify any relevant log snippets from server logs, please include
6262
those (please be careful to remove any personal or private data). Please surround them with
6363
``` (three backticks, on a line on their own), so that they are formatted legibly.
6464
65-
Alternatively, please send logs to @kegan:matrix.org or @neilalexander:matrix.org
65+
Alternatively, please send logs to @kegan:matrix.org, @s7evink:matrix.org or @devonh:one.ems.host
6666
with a link to the respective Github issue, thanks!
6767
-->

.github/workflows/dendrite.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
with:
124124
# Optional: pass GITHUB_TOKEN to avoid rate limiting.
125125
token: ${{ secrets.GITHUB_TOKEN }}
126-
- run: go test -json -v ./... 2>&1 | gotestfmt
126+
- run: go test -json -v ./... 2>&1 | gotestfmt -hide all
127127
env:
128128
POSTGRES_HOST: localhost
129129
POSTGRES_USER: postgres
@@ -255,7 +255,7 @@ jobs:
255255
key: ${{ runner.os }}-go-stable-test-race-${{ hashFiles('**/go.sum') }}
256256
restore-keys: |
257257
${{ runner.os }}-go-stable-test-race-
258-
- run: go test -race -json -v -coverpkg=./... -coverprofile=cover.out $(go list ./... | grep -v /cmd/dendrite*) 2>&1 | gotestfmt
258+
- run: go test -race -json -v -coverpkg=./... -coverprofile=cover.out $(go list ./... | grep -v /cmd/dendrite*) 2>&1 | gotestfmt -hide all
259259
env:
260260
POSTGRES_HOST: localhost
261261
POSTGRES_USER: postgres
@@ -280,6 +280,8 @@ jobs:
280280
with:
281281
go-version: "stable"
282282
cache: true
283+
- name: Docker version
284+
run: docker version
283285
- name: Build upgrade-tests
284286
run: go build ./cmd/dendrite-upgrade-tests
285287
- name: Test upgrade (PostgreSQL)
@@ -300,6 +302,8 @@ jobs:
300302
with:
301303
go-version: "stable"
302304
cache: true
305+
- name: Docker version
306+
run: docker version
303307
- name: Build upgrade-tests
304308
run: go build ./cmd/dendrite-upgrade-tests
305309
- name: Test upgrade (PostgreSQL)
@@ -436,7 +440,7 @@ jobs:
436440
# Run Complement
437441
- run: |
438442
set -o pipefail &&
439-
go test -v -json -tags dendrite_blacklist ./tests/... 2>&1 | gotestfmt
443+
go test -v -json -tags dendrite_blacklist ./tests ./tests/csapi 2>&1 | gotestfmt -hide all
440444
shell: bash
441445
name: Run Complement Tests
442446
env:

.github/workflows/docker.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ jobs:
3232
if: github.event_name == 'release' # Only for GitHub releases
3333
run: |
3434
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
35-
echo "BUILD=$(git rev-parse --short HEAD || \"\")" >> $GITHUB_ENV
36-
BRANCH=$(git symbolic-ref --short HEAD | tr -d \/)
37-
[ ${BRANCH} == "main" ] && BRANCH=""
38-
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
3935
- name: Set up QEMU
4036
uses: docker/setup-qemu-action@v1
4137
- name: Set up Docker Buildx
@@ -57,10 +53,9 @@ jobs:
5753
id: docker_build_monolith
5854
uses: docker/build-push-action@v3
5955
with:
60-
cache-from: type=gha
61-
cache-to: type=gha,mode=max
56+
cache-from: type=registry,ref=ghcr.io/${{ env.GHCR_NAMESPACE }}/dendrite-monolith:buildcache
57+
cache-to: type=registry,ref=ghcr.io/${{ env.GHCR_NAMESPACE }}/dendrite-monolith:buildcache,mode=max
6258
context: .
63-
build-args: FLAGS=-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}
6459
platforms: ${{ env.PLATFORMS }}
6560
push: true
6661
tags: |
@@ -75,7 +70,6 @@ jobs:
7570
cache-from: type=gha
7671
cache-to: type=gha,mode=max
7772
context: .
78-
build-args: FLAGS=-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}
7973
platforms: ${{ env.PLATFORMS }}
8074
push: true
8175
tags: |
@@ -109,10 +103,6 @@ jobs:
109103
if: github.event_name == 'release' # Only for GitHub releases
110104
run: |
111105
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
112-
echo "BUILD=$(git rev-parse --short HEAD || \"\")" >> $GITHUB_ENV
113-
BRANCH=$(git symbolic-ref --short HEAD | tr -d \/)
114-
[ ${BRANCH} == "main" ] && BRANCH=""
115-
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
116106
- name: Set up QEMU
117107
uses: docker/setup-qemu-action@v1
118108
- name: Set up Docker Buildx
@@ -137,7 +127,6 @@ jobs:
137127
cache-from: type=gha
138128
cache-to: type=gha,mode=max
139129
context: .
140-
build-args: FLAGS=-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}
141130
file: ./build/docker/Dockerfile.demo-pinecone
142131
platforms: ${{ env.PLATFORMS }}
143132
push: true
@@ -153,7 +142,6 @@ jobs:
153142
cache-from: type=gha
154143
cache-to: type=gha,mode=max
155144
context: .
156-
build-args: FLAGS=-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}
157145
file: ./build/docker/Dockerfile.demo-pinecone
158146
platforms: ${{ env.PLATFORMS }}
159147
push: true
@@ -176,10 +164,6 @@ jobs:
176164
if: github.event_name == 'release' # Only for GitHub releases
177165
run: |
178166
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
179-
echo "BUILD=$(git rev-parse --short HEAD || \"\")" >> $GITHUB_ENV
180-
BRANCH=$(git symbolic-ref --short HEAD | tr -d \/)
181-
[ ${BRANCH} == "main" ] && BRANCH=""
182-
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
183167
- name: Set up QEMU
184168
uses: docker/setup-qemu-action@v1
185169
- name: Set up Docker Buildx
@@ -204,7 +188,6 @@ jobs:
204188
cache-from: type=gha
205189
cache-to: type=gha,mode=max
206190
context: .
207-
build-args: FLAGS=-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}
208191
file: ./build/docker/Dockerfile.demo-yggdrasil
209192
platforms: ${{ env.PLATFORMS }}
210193
push: true
@@ -220,7 +203,6 @@ jobs:
220203
cache-from: type=gha
221204
cache-to: type=gha,mode=max
222205
context: .
223-
build-args: FLAGS=-X github.com/matrix-org/dendrite/internal.branch=${{ env.BRANCH }} -X github.com/matrix-org/dendrite/internal.build=${{ env.BUILD }}
224206
file: ./build/docker/Dockerfile.demo-yggdrasil
225207
platforms: ${{ env.PLATFORMS }}
226208
push: true

.github/workflows/helm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
version: v3.10.0
3333

3434
- name: Run chart-releaser
35-
uses: helm/chart-releaser-action@v1.4.1
35+
uses: helm/chart-releaser-action@ed43eb303604cbc0eeec8390544f7748dc6c790d # specific commit, since `mark_as_latest` is not yet in a release
3636
env:
3737
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
3838
with:

.github/workflows/schedules.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
# See https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md specifically GOROOT_1_17_X64
129129
run: |
130130
sudo apt-get update && sudo apt-get install -y libolm3 libolm-dev
131-
go get -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
131+
go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
132132
- name: Run actions/checkout@v3 for dendrite
133133
uses: actions/checkout@v3
134134
with:

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ linters-settings:
180180
linters:
181181
enable:
182182
- errcheck
183-
- goconst
184183
- gocyclo
185184
- goimports # Does everything gofmt does
186185
- gosimple
@@ -211,6 +210,7 @@ linters:
211210
- stylecheck
212211
- typecheck # Should turn back on soon
213212
- unconvert # Should turn back on soon
213+
- goconst # Slightly annoying, as it reports "issues" in SQL statements
214214
disable-all: false
215215
presets:
216216
fast: false

CHANGES.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,91 @@
11
# Changelog
22

3+
## Dendrite 0.13.4 (2023-10-25)
4+
5+
Upgrading to this version is **highly** recommended, as it fixes a long-standing bug in the state resolution
6+
algorithm.
7+
8+
### Fixes:
9+
10+
- The "device list updater" now de-duplicates the servers to fetch devices from on startup. (This also
11+
avoids spamming the logs when shutting down.)
12+
- A bug in the state resolution algorithm has been fixed. This bug could result in users "being reset"
13+
out of rooms and other missing state events due to calculating the wrong state.
14+
- A bug when setting notifications from Element Android has been fixed by implementing MSC3987
15+
16+
### Features
17+
18+
- Updated dependencies
19+
- Internal NATS Server has been updated from v2.9.19 to v2.9.23
20+
21+
## Dendrite 0.13.3 (2023-09-28)
22+
23+
### Fixes:
24+
25+
- The `user_id` query parameter when authenticating is now used correctly (contributed by [tulir](https://github.com/tulir))
26+
- Invitations are now correctly pushed to devices
27+
- A bug which could result in the corruption of `m.direct` account data has been fixed
28+
29+
### Features
30+
31+
- [Sliding Sync proxy](https://github.com/matrix-org/sliding-sync) can be configured in the `/.well-known/matrix/client` response
32+
- Room version 11 is now supported
33+
- Clients can request the `federation` `event_format` when creating filters
34+
- Many under the hood improvements for [MSC4014: Pseudonymous Identities](https://github.com/matrix-org/matrix-spec-proposals/blob/kegan/pseudo-ids/proposals/4014-pseudonymous-identities.md)
35+
36+
### Other
37+
38+
- Dendrite now requires Go 1.20 if building from source
39+
40+
## Dendrite 0.13.2 (2023-08-23)
41+
42+
### Fixes:
43+
44+
- Migrations in SQLite are now prepared on the correct context (transaction or database)
45+
- The `InputRoomEvent` stream now has a maximum age of 24h, which should help with slow start up times of NATS JetStream (contributed by [neilalexander](https://github.com/neilalexander))
46+
- Event size checks are more in line with Synapse
47+
- Requests to `/messages` have been optimized, possibly reducing database round trips
48+
- Re-add the revision of Dendrite when building from source (Note: This only works if git is installed)
49+
- Getting local members to notify has been optimized, which should significantly reduce memory allocation and cache usage
50+
- When getting queried about user profiles, we now return HTTP404 if the user/profiles does not exist
51+
- Background federated joins should now be fixed and not timeout after a short time
52+
- Database connections are now correctly re-used
53+
- Restored the old behavior of the `/purgeRoom` admin endpoint (does not evacuate the room before purging)
54+
- Don't expose information about the system when trying to download files that don't exist
55+
56+
### Features
57+
58+
- Further improvements and fixes for [MSC4014: Pseudonymous Identities](https://github.com/matrix-org/matrix-spec-proposals/blob/kegan/pseudo-ids/proposals/4014-pseudonymous-identities.md)
59+
- Lookup correct prev events in the sync API
60+
- Populate `prev_sender` correctly in the sync API
61+
- Event federation should work better
62+
- Added new `dendrite_up` Prometheus metric, containing the version of Dendrite
63+
- Space summaries ([MSC2946](https://github.com/matrix-org/matrix-spec-proposals/pull/2946)) have been moved from MSC to being natively supported
64+
- For easier issue investigation, logs for application services now contain the application service ID (contributed by [maxberger](https://github.com/maxberger))
65+
- The default room version to use when creating rooms can now be configured using `room_server.default_room_version`
66+
67+
## Dendrite 0.13.1 (2023-07-06)
68+
69+
This releases fixes a long-standing "off-by-one" error which could result in state resets. Upgrading to this version is **highly** recommended.
70+
71+
When deduplicating state events, we were checking if the event in question was already in a state snapshot. If it was in a previous state snapshot, we would
72+
then remove it from the list of events to store. If this happened, we were, unfortunately, skipping the next event to check. This resulted in
73+
events getting stored in state snapshots where they may not be needed. When we now compared two of those state snapshots, one of them
74+
contained the skipped event, while the other didn't. This difference possibly shouldn't exist, resulting in unexpected state resets and explains
75+
reports of missing state events as well.
76+
77+
Rooms where a state reset occurred earlier should, hopefully, reconcile over time.
78+
79+
### Fixes:
80+
81+
- A long-standing "off-by-one" error has been fixed, which could result in state resets
82+
- Roomserver Prometheus Metrics are available again
83+
84+
### Features
85+
86+
- Updated dependencies
87+
- Internal NATS Server has been updated from v2.9.15 to v2.9.19
88+
389
## Dendrite 0.13.0 (2023-06-30)
490

591
### Features

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#
44
# base installs required dependencies and runs go mod download to cache dependencies
55
#
6-
FROM --platform=${BUILDPLATFORM} docker.io/golang:1.20-alpine AS base
7-
RUN apk --update --no-cache add bash build-base curl
6+
FROM --platform=${BUILDPLATFORM} docker.io/golang:1.21-alpine AS base
7+
RUN apk --update --no-cache add bash build-base curl git
88

99
#
1010
# build creates all needed binaries
@@ -13,15 +13,14 @@ FROM --platform=${BUILDPLATFORM} base AS build
1313
WORKDIR /src
1414
ARG TARGETOS
1515
ARG TARGETARCH
16-
ARG FLAGS
1716
RUN --mount=target=. \
1817
--mount=type=cache,target=/root/.cache/go-build \
1918
--mount=type=cache,target=/go/pkg/mod \
2019
USERARCH=`go env GOARCH` \
2120
GOARCH="$TARGETARCH" \
2221
GOOS="linux" \
2322
CGO_ENABLED=$([ "$TARGETARCH" = "$USERARCH" ] && echo "1" || echo "0") \
24-
go build -v -ldflags="${FLAGS}" -trimpath -o /out/ ./cmd/...
23+
go build -v -trimpath -o /out/ ./cmd/...
2524

2625

2726
#

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If you have further questions, please take a look at [our FAQ](docs/FAQ.md) or j
3636
See the [Planning your Installation](https://matrix-org.github.io/dendrite/installation/planning) page for
3737
more information on requirements.
3838

39-
To build Dendrite, you will need Go 1.18 or later.
39+
To build Dendrite, you will need Go 1.20 or later.
4040

4141
For a usable federating Dendrite deployment, you will also need:
4242

0 commit comments

Comments
 (0)