Devon Hudson
da4033e9f0
Bump gmsl
2023-05-24 10:57:17 -06:00
Devon Hudson
a4fc905f8d
Pull context out of invite input structs
2023-05-24 10:28:34 -06:00
Devon Hudson
d93f03c445
Pull in latest gmsl changes
2023-05-24 10:01:15 -06:00
Devon Hudson
08d8a91f7e
Merge branch 'main' into invite-refactor
2023-05-24 09:57:56 -06:00
Devon Hudson
60653878d7
Refactor invite to consolidate shared logic
2023-05-24 09:55:55 -06:00
Till
11b557097c
Drop reference_sha column ( #3083 )
...
Companion PR to https://github.com/matrix-org/gomatrixserverlib/pull/383
2023-05-24 12:14:42 +02:00
Devon Hudson
d4abc57ee0
Move outbound invite logic over to gmsl
2023-05-23 22:07:54 -06:00
Devon Hudson
7ba7f8de29
Move outbound fed invite into gmsl function
2023-05-23 21:48:14 -06:00
Devon Hudson
8b5a211431
Fix linter error
2023-05-23 15:20:25 -06:00
Devon Hudson
e678912a80
Refactor PerformInvite to remove duplication
2023-05-23 15:16:28 -06:00
Devon Hudson
b426961d84
Fix linter errors
2023-05-23 13:29:11 -06:00
Devon Hudson
e573010cd2
Pull changes from main
2023-05-23 13:23:27 -06:00
devonh
63156b7a29
Merge branch 'main' into invite-refactor
2023-05-23 19:16:58 +00:00
Devon Hudson
35cc764849
Fix error return bug with invite endpoints
2023-05-23 13:11:25 -06:00
Devon Hudson
85c31551b7
Migrate handleInvite over to gmsl
2023-05-23 11:42:36 -06:00
Till
5d6221d191
Move MakeLeave to GMSL ( #3085 )
...
Basically the same API shape as for `/make_join`
https://github.com/matrix-org/gomatrixserverlib/pull/385
2023-05-23 19:37:04 +02:00
Devon Hudson
c753aa455a
Refactor invite interfaces to be more ergonomic
2023-05-23 11:03:32 -06:00
Devon Hudson
586ee2c349
Refactor HandleInvite to conform to the api shape gmsl will use
2023-05-23 10:48:38 -06:00
Devon Hudson
44c8d3d789
Migrate roomserver invite matrix logic to fed endpoint
2023-05-22 19:34:55 -06:00
Devon Hudson
34ab631184
Refactor HandleInvite to make it easier to move to gmsl
2023-05-19 16:37:09 -06:00
Devon Hudson
822b5c8b18
Remove redundant logic
2023-05-19 15:14:06 -06:00
Devon Hudson
94cebe28d8
Refactor HandleInvite naming for clarity
2023-05-19 15:10:44 -06:00
Devon Hudson
da26e2afb5
Change HandleInvite api to only take required args
2023-05-19 15:00:55 -06:00
Devon Hudson
b639082703
Split out handling federation invite from locally generated invites
2023-05-19 14:41:49 -06:00
devonh
2eae8dc489
Move SendJoin logic to GMSL ( #3084 )
...
Moves the core matrix logic for handling the send_join endpoint over to
gmsl.
2023-05-19 16:27:01 +00:00
Devon Hudson
027a9b8ce0
Fix bug with nil interface return & add test
2023-05-18 13:41:47 -06:00
dependabot[bot]
345f025ee3
Bump github.com/docker/distribution from 2.8.1+incompatible to 2.8.2+incompatible ( #3082 )
...
Bumps
[github.com/docker/distribution](https://github.com/docker/distribution )
from 2.8.1+incompatible to 2.8.2+incompatible.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/distribution/releases ">github.com/docker/distribution's
releases</a>.</em></p>
<blockquote>
<h2>v2.8.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Revert registry/client: set <code>Accept: identity</code> header
when getting layers by <a
href="https://github.com/ndeloof "><code>@ndeloof</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3783 ">distribution/distribution#3783</a></li>
<li>Parse <code>http</code> forbidden as denied by <a
href="https://github.com/vvoland "><code>@vvoland</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3914 ">distribution/distribution#3914</a></li>
<li>Fix <a
href="https://www.cve.org/CVERecord?id=CVE-2022-28391 ">CVE-2022-28391</a>
by bumping alpine from 3.14 to 3.16 by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> (<a
href="https://redirect.github.com/distribution/distribution/pull/3650 ">#3650</a>)</li>
<li>Fix <a
href="https://www.cve.org/CVERecord?id=CVE-2023-2253 ">CVE-2023-2253</a>
runaway allocation on /v2/_catalog by <a
href="https://github.com/josegomezr "><code>@josegomezr</code></a> <a
href="521ea3d973 "><code>521ea3d9</code></a></li>
<li>Fix panic in inmemory driver by <a
href="https://github.com/wy65701436 "><code>@wy65701436</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3815 ">distribution/distribution#3815</a></li>
<li>bump up golang version (alternative) by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3903 ">distribution/distribution#3903</a></li>
<li>Dockerfile: update xx to v1.2.1 by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3907 ">distribution/distribution#3907</a></li>
<li>update to go1.19.9 by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3908 ">distribution/distribution#3908</a></li>
<li>Add code to handle pagination of parts. Fixes max layer size of 10GB
bug by <a
href="https://github.com/DavidSpek "><code>@DavidSpek</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3893 ">distribution/distribution#3893</a></li>
<li>Dockerfile: fix filenames of artifacts by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3911 ">distribution/distribution#3911</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/distribution/distribution/compare/v2.8.1...v2.8.2 ">https://github.com/distribution/distribution/compare/v2.8.1...v2.8.2 </a></p>
<h2>v2.8.2-beta.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix <a
href="https://www.cve.org/CVERecord?id=CVE-2022-28391 ">CVE-2022-28391</a>
by bumping alpine from 3.14 to 3.16 by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> (<a
href="https://redirect.github.com/distribution/distribution/pull/3650 ">#3650</a>)</li>
<li>Fix <a
href="https://www.cve.org/CVERecord?id=CVE-2023-2253 ">CVE-2023-2253</a>
runaway allocation on /v2/_catalog by <a
href="https://github.com/josegomezr "><code>@josegomezr</code></a> <a
href="521ea3d973 "><code>521ea3d9</code></a></li>
<li>Fix panic in inmemory driver by <a
href="https://github.com/wy65701436 "><code>@wy65701436</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3815 ">distribution/distribution#3815</a></li>
<li>bump up golang version (alternative) by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3903 ">distribution/distribution#3903</a></li>
<li>Dockerfile: update xx to v1.2.1 by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3907 ">distribution/distribution#3907</a></li>
<li>update to go1.19.9 by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3908 ">distribution/distribution#3908</a></li>
<li>Add code to handle pagination of parts. Fixes max layer size of 10GB
bug by <a
href="https://github.com/DavidSpek "><code>@DavidSpek</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3893 ">distribution/distribution#3893</a></li>
<li>Dockerfile: fix filenames of artifacts by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3911 ">distribution/distribution#3911</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/distribution/distribution/compare/v2.8.1...v2.8.2-beta.2 ">https://github.com/distribution/distribution/compare/v2.8.1...v2.8.2-beta.2 </a></p>
<h2>v2.8.2-beta.1</h2>
<h3><strong>NOTE: This is a pre-release that does not contain any
artifacts!</strong></h3>
<h2>What's Changed</h2>
<ul>
<li>Fix runaway allocation on /v2/_catalog by <a
href="https://github.com/josegomezr "><code>@josegomezr</code></a> <a
href="521ea3d973 "><code>521ea3d9</code></a></li>
<li>Fix CVE-2022-28391 by bumping alpine from 3.14 to 3.16 by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3650 ">distribution/distribution#3650</a></li>
<li>Fix panic in inmemory driver by <a
href="https://github.com/wy65701436 "><code>@wy65701436</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3815 ">distribution/distribution#3815</a></li>
<li>bump up golang version (alternative) by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3903 ">distribution/distribution#3903</a></li>
<li>Dockerfile: update xx to v1.2.1 by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3907 ">distribution/distribution#3907</a></li>
<li>update to go1.19.9 by <a
href="https://github.com/thaJeztah "><code>@thaJeztah</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3908 ">distribution/distribution#3908</a></li>
<li>Add code to handle pagination of parts. Fixes max layer size of 10GB
bug by <a
href="https://github.com/DavidSpek "><code>@DavidSpek</code></a> in <a
href="https://redirect.github.com/distribution/distribution/pull/3893 ">distribution/distribution#3893</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/distribution/distribution/compare/v2.8.1...v2.8.2-beta.1 ">https://github.com/distribution/distribution/compare/v2.8.1...v2.8.2-beta.1 </a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7c354a4b40 "><code>7c354a4</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/distribution/issues/3915 ">#3915</a>
from distribution/2.8.2-release-notes</li>
<li><a
href="a173a9c625 "><code>a173a9c</code></a>
Add v2.8.2 release notes</li>
<li><a
href="4894d35ecc "><code>4894d35</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/distribution/issues/3914 ">#3914</a>
from vvoland/handle-forbidden-28</li>
<li><a
href="f067f66d3d "><code>f067f66</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/distribution/issues/3783 ">#3783</a>
from ndeloof/accept-encoding-28</li>
<li><a
href="483ad69da3 "><code>483ad69</code></a>
registry/errors: Parse http forbidden as denied</li>
<li><a
href="2b0f84df21 "><code>2b0f84d</code></a>
Revert "registry/client: set Accept: identity header when getting
layers"</li>
<li><a
href="320d6a141f "><code>320d6a1</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/distribution/issues/3912 ">#3912</a>
from distribution/2.8.2-beta.2-release-notes</li>
<li><a
href="5f3ca1b2fb "><code>5f3ca1b</code></a>
Add release notes for 2.8.2-beta.2 release</li>
<li><a
href="cb840f63b3 "><code>cb840f6</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/distribution/issues/3911 ">#3911</a>
from thaJeztah/2.8_backport_fix_releaser_filenames</li>
<li><a
href="e884644fff "><code>e884644</code></a>
Dockerfile: fix filenames of artifacts</li>
<li>Additional commits viewable in <a
href="https://github.com/docker/distribution/compare/v2.8.1...v2.8.2 ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/matrix-org/dendrite/network/alerts ).
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 17:44:59 +02:00
devonh
67d6876857
Move MakeJoin logic to GMSL ( #3081 )
2023-05-17 00:33:27 +00:00
devonh
0489d16f95
Move json errors over to gmsl ( #3080 )
2023-05-09 22:46:49 +00:00
devonh
a49c9f01e2
Only require room version instead of room info for db.Events() ( #3079 )
...
This reduces the API requirements for the Events database to align with
what is actually required.
2023-05-08 19:25:44 +00:00
kegsay
2b34f88fde
Use ProtoEvent where needed instead of EventBuilder ( #3075 )
...
They are fundamentally different concepts, so should be represented as
such. Proto events are exchanged in /make_xxx calls over federation, and
made as "fledgling" events in /createRoom and general event sending.
*Building* events is a reasonably complex VERSION SPECIFIC process which
needs amongst other things, auth event providers, prev events, signing
keys, etc.
Requires https://github.com/matrix-org/gomatrixserverlib/pull/379
2023-05-04 11:17:42 +01:00
Devon Hudson
d5c11a3c86
Fix flaky test in process context
2023-05-03 18:21:33 -06:00
Devon Hudson
99b143d4d0
Fix flaky test in clientapi
2023-05-03 18:21:10 -06:00
kegsay
6284790f98
Use PDU in even more places ( #3074 )
...
- No longer rely on *Event returning from NewEventFrom... functions
Requires https://github.com/matrix-org/gomatrixserverlib/pull/377
2023-05-03 10:21:27 +01:00
genofire
9b98e5a102
fix(helm): do not deploy screenshot to cluster (just dashboard) ( #3063 )
...
### 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: `Your Name <your@email.example.org>`
Signed-off-by: genofire <geno+dev@fireorbit.de>
Co-authored-by: kegsay <kegan@matrix.org>
2023-05-02 17:29:21 +01:00
kegsay
f5b3144dc3
Use PDU not *Event in HeaderedEvent ( #3073 )
...
Requires https://github.com/matrix-org/gomatrixserverlib/pull/376
This has numerous upsides:
- Less type casting to `*Event` is required.
- Making Dendrite work with `PDU` interfaces means we can swap out Event
impls more easily.
- Tests which represent weird event shapes are easier to write.
Part of a series of refactors on GMSL.
2023-05-02 15:03:16 +01:00
Devon Hudson
696cbb70b8
Pass federation API to roomserver in PurgeRoom tests
2023-05-01 21:28:10 -06:00
Devon Hudson
b00e272e6f
Use new gmsl to use new String() API
2023-04-28 13:31:21 -06:00
Till
9e9617ff84
Add key backup tests ( #3071 )
...
Also slightly refactors the functions and methods to rely less on the
req/res pattern we had for polylith.
Returns `M_WRONG_ROOM_KEYS_VERSION` for some endpoints as per the spec
2023-04-28 17:49:38 +02:00
Till
6b47cf0f6a
Remove PerformError ( #3066 )
...
This removes `PerformError`, which was needed when we still had
polylith.
This removes quite a bunch of
```go
if err != nil {
return err
}
if err := res.Error; err != nil {
return err.JSONResponse()
}
```
Hopefully can be read commit by commit. [skip ci]
2023-04-28 17:46:01 +02:00
kegsay
1432743d1a
Use PDU in more places ( #3072 )
2023-04-28 16:00:22 +01:00
Devon Hudson
d23d0369cc
Pass RoomID to gmsl.PerformJoin
2023-04-27 18:34:43 -06:00
kegsay
6171310307
Use PDU interface ( #3070 )
...
We only use it in a few places currently, enough to get things to
compile and run. We should be using it in much more places.
Similarly, in some places we cast []PDU back to []*Event, we need to not
do that. Likewise, in some places we cast PDU to *Event, we need to not
do that. For now though, hopefully this is a start.
2023-04-27 16:35:19 +01:00
Till
c6457cd4e5
Add CS API /keys tests ( #3069 )
...
This is slightly cheating, as the heavy lifting, with regards to key
generation, is done using `mautrix/go`.
2023-04-27 16:43:28 +02:00
kegsay
b189edf4f4
Remove gmsl.HeaderedEvent ( #3068 )
...
Replaced with types.HeaderedEvent _for now_. In reality we want to move
them all to gmsl.Event and only use HeaderedEvent when we _need_ to
bundle the version/event ID with the event (seriailsation boundaries,
and even then only when we don't have the room version).
Requires https://github.com/matrix-org/gomatrixserverlib/pull/373
2023-04-27 12:54:20 +01:00
Till
2475cf4b61
Add some roomserver UTs ( #3067 )
...
Adds tests for `QueryRestrictedJoinAllowed`, `IsServerAllowed` and
`PerformRoomUpgrade`. Refactors the `QueryRoomVersionForRoom` method to
accept a string and return a `gmsl.RoomVersion` instead of req/resp
structs.
Adds some more caching for `GetStateEvent`
This should also fix #2912 by ignoring state events belonging to other
users.
2023-04-27 08:07:13 +02:00
devonh
dd5e47a9a7
Move high level room joining logic to GMSL ( #3065 )
...
GMSL PR: https://github.com/matrix-org/gomatrixserverlib/pull/372
2023-04-27 00:43:46 +00:00
devonh
ed19efc5d7
Move fedclient interface over to gmsl ( #3061 )
...
Companion PR: https://github.com/matrix-org/gomatrixserverlib/pull/366
2023-04-24 16:23:25 +00:00
kegsay
4679098a64
Use IRoomVersion ( #3064 )
...
This is a step towards allowing arbitrary room version impls.
2023-04-24 11:50:37 +01:00
kegsay
1647213fac
Implement new RoomVersionImpl API ( #3062 )
...
As outlined in https://github.com/matrix-org/gomatrixserverlib/pull/368
The main change Dendrite side is that `RoomVersion` no longer has any
methods on it. Instead, you need to bounce via `gmsl.GetRoomVersion`.
It's very interesting to see where exactly Dendrite cares about this.
For some places it's creating events (fine) but others are way more
specific. Those areas will need to migrate to GMSL at some point.
2023-04-21 17:06:29 +01:00