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

Commit f52d028

Browse files
committed
Merge branch 'main' of github.com:matrix-org/dendrite into gh-pages
2 parents e19d2b1 + 317b101 commit f52d028

Some content is hidden

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

46 files changed

+467
-141
lines changed

.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ jobs:
440440
# Run Complement
441441
- run: |
442442
set -o pipefail &&
443-
go test -v -json -tags dendrite_blacklist ./tests/... 2>&1 | gotestfmt -hide all
443+
go test -v -json -tags dendrite_blacklist ./tests ./tests/csapi 2>&1 | gotestfmt -hide all
444444
shell: bash
445445
name: Run Complement Tests
446446
env:

.github/workflows/docker.yml

Lines changed: 0 additions & 18 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
@@ -60,7 +56,6 @@ jobs:
6056
cache-from: type=registry,ref=ghcr.io/${{ env.GHCR_NAMESPACE }}/dendrite-monolith:buildcache
6157
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

.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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
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+
321
## Dendrite 0.13.3 (2023-09-28)
422

523
### Fixes:

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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
6+
FROM --platform=${BUILDPLATFORM} docker.io/golang:1.21-alpine AS base
77
RUN apk --update --no-cache add bash build-base curl git
88

99
#
@@ -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
#

build/docker/Dockerfile.demo-yggdrasil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/golang:1.19-alpine AS base
1+
FROM docker.io/golang:1.21-alpine AS base
22

33
#
44
# Needs to be separate from the main Dockerfile for OpenShift,

build/scripts/complement.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ tar -xzf master.tar.gz
1515

1616
# Run the tests!
1717
cd complement-master
18-
COMPLEMENT_BASE_IMAGE=complement-dendrite:latest go test -v -count=1 ./tests
18+
COMPLEMENT_BASE_IMAGE=complement-dendrite:latest go test -v -count=1 ./tests ./tests/csapi
1919

clientapi/clientapi_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ func TestPushRules(t *testing.T) {
14181418
validateFunc: func(t *testing.T, respBody *bytes.Buffer) {
14191419
actions := gjson.GetBytes(respBody.Bytes(), "actions").Array()
14201420
// only a basic check
1421-
assert.Equal(t, 1, len(actions))
1421+
assert.Equal(t, 0, len(actions))
14221422
},
14231423
},
14241424
{

clientapi/routing/profile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func updateProfile(
300300
}, e
301301
}
302302

303-
if err := api.SendEvents(ctx, rsAPI, api.KindNew, events, device.UserDomain(), domain, domain, nil, true); err != nil {
303+
if err := api.SendEvents(ctx, rsAPI, api.KindNew, events, device.UserDomain(), domain, domain, nil, false); err != nil {
304304
util.GetLogger(ctx).WithError(err).Error("SendEvents failed")
305305
return util.JSONResponse{
306306
Code: http.StatusInternalServerError,

0 commit comments

Comments
 (0)