From 0bf5104bbbfb34cf869e74bcc17a039db176e935 Mon Sep 17 00:00:00 2001 From: kegsay Date: Fri, 21 Jan 2022 14:23:37 +0000 Subject: [PATCH 1/5] Fix #2027 by gracefully handling stub rooms (#2100) The server ACL code on startup will grab all known rooms from the rooms_table and then call `GetStateEvent` with each found room ID to find the server ACL event. This can fail for stub rooms, which will be present in the rooms table. Previously this would result in an error being returned and the server failing to start (!). Now we just return no event for stub rooms. --- roomserver/storage/shared/storage.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roomserver/storage/shared/storage.go b/roomserver/storage/shared/storage.go index f49536f4e..d4c5ebb5b 100644 --- a/roomserver/storage/shared/storage.go +++ b/roomserver/storage/shared/storage.go @@ -842,9 +842,13 @@ func (d *Database) GetStateEvent(ctx context.Context, roomID, evType, stateKey s if err != nil { return nil, err } - if roomInfo == nil || roomInfo.IsStub { + if roomInfo == nil { return nil, fmt.Errorf("room %s doesn't exist", roomID) } + // e.g invited rooms + if roomInfo.IsStub { + return nil, nil + } eventTypeNID, err := d.EventTypesTable.SelectEventTypeNID(ctx, nil, evType) if err == sql.ErrNoRows { // No rooms have an event of this type, otherwise we'd have an event type NID From 3c92b55bec57519dfd5b5a0f06c32b3ae85f5710 Mon Sep 17 00:00:00 2001 From: FORCHA Date: Fri, 21 Jan 2022 15:37:59 +0100 Subject: [PATCH 2/5] Update monolith-sample.conf (#2087) * Update monolith-sample.conf -Replaced undefined monolith value with server_name (my.hostname.com) value in reference tho ths issue https://github.com/matrix-org/dendrite/issues/2078 * Update monolith-sample.conf Changed IP to location of monolith server Co-authored-by: kegsay --- docs/nginx/monolith-sample.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/nginx/monolith-sample.conf b/docs/nginx/monolith-sample.conf index 0344aa96c..360eb9255 100644 --- a/docs/nginx/monolith-sample.conf +++ b/docs/nginx/monolith-sample.conf @@ -1,3 +1,7 @@ +#change IP to location of monolith server +upstream monolith{ + server 127.0.0.1:8008; +} server { listen 443 ssl; # IPv4 listen [::]:443 ssl; # IPv6 @@ -23,6 +27,6 @@ server { } location /_matrix { - proxy_pass http://monolith:8008; + proxy_pass http://monolith; } } From cd1391fc62d9801b2246e38e3491f52fba585fff Mon Sep 17 00:00:00 2001 From: kegsay Date: Fri, 21 Jan 2022 14:46:47 +0000 Subject: [PATCH 3/5] Document log levels (#2101) --- dendrite-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/dendrite-config.yaml b/dendrite-config.yaml index 7593988f3..38b146d70 100644 --- a/dendrite-config.yaml +++ b/dendrite-config.yaml @@ -368,6 +368,7 @@ logging: - type: std level: info - type: file + # The logging level, must be one of debug, info, warn, error, fatal, panic. level: info params: path: ./logs From 96bf4aa8383e13624b823806b07a5878c8b3ade3 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 21 Jan 2022 14:59:47 +0000 Subject: [PATCH 4/5] Add `Forward extremities remain so even after the next events are populated as outliers` to `sytest-whitelist` --- sytest-whitelist | 1 + 1 file changed, 1 insertion(+) diff --git a/sytest-whitelist b/sytest-whitelist index 558eb29a6..f11cd96bf 100644 --- a/sytest-whitelist +++ b/sytest-whitelist @@ -588,3 +588,4 @@ User can invite remote user to room with version 9 Remote user can backfill in a room with version 9 Can reject invites over federation for rooms with version 9 Can receive redactions from regular users over federation in room version 9 +Forward extremities remain so even after the next events are populated as outliers From de38be469a23813921d01bef3e14e95faab2a59e Mon Sep 17 00:00:00 2001 From: kegsay Date: Fri, 21 Jan 2022 16:24:31 +0000 Subject: [PATCH 5/5] Expand issue template (#2103) --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 48 ++++++++++++++++++---------- .github/PULL_REQUEST_TEMPLATE.md | 3 +- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md index 68ae922a3..206713e04 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -4,34 +4,50 @@ about: Create a report to help us improve --- - + ### Background information - + - **Dendrite version or git SHA**: - **Monolith or Polylith?**: - **SQLite3 or Postgres?**: - **Running in Docker?**: -- **`go version`**: +- **`go version`**: +- **Client used (if applicable)**: - ### Description - + - **What** is the problem: + - **Who** is affected: + - **How** is this bug manifesting: + - **When** did this first appear: + + ### Steps to reproduce + - list the steps - that reproduce the bug diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 92253214a..1204582e2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,8 +1,7 @@ ### Pull Request Checklist - + -* [ ] I have added any new tests that need to pass to `sytest-whitelist` as specified in [docs/sytest.md](https://github.com/matrix-org/dendrite/blob/master/docs/sytest.md) * [ ] Pull request includes a [sign off](https://github.com/matrix-org/dendrite/blob/master/docs/CONTRIBUTING.md#sign-off) Signed-off-by: `Your Name `