Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSC3912: Redaction of related events #3912

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

@babolivier babolivier changed the title MSCXXXX: Relation-based redactions MSC3912: Relation-based redactions Oct 18, 2022
@uhoreg uhoreg added proposal A matrix spec change proposal client-server Client-Server API kind:maintenance MSC which clarifies/updates existing spec needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Oct 18, 2022
bradtgmurray added a commit to beeper/synapse-legacy-fork that referenced this pull request Nov 22, 2022
Synapse 1.72.0 (2022-11-22)
===========================

Please note that Synapse now only supports PostgreSQL 11+, because PostgreSQL 10 has reached end-of-life, c.f. our [Deprecation Policy](https://github.com/matrix-org/synapse/blob/develop/docs/deprecation_policy.md).

Bugfixes
--------

- Update forgotten references to legacy metrics in the included Grafana dashboard. ([\matrix-org#14477](matrix-org#14477))

Synapse 1.72.0rc1 (2022-11-16)
==============================

Features
--------

- Add experimental support for [MSC3912](matrix-org/matrix-spec-proposals#3912): Relation-based redactions. ([\matrix-org#14260](matrix-org#14260))
- Build Debian packages for Ubuntu 22.10 (Kinetic Kudu). ([\matrix-org#14396](matrix-org#14396))
- Add an [Admin API](https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/index.html) endpoint for user lookup based on third-party ID (3PID). Contributed by @ashfame. ([\matrix-org#14405](matrix-org#14405))
- Faster joins: include heroes' membership events in the partial join response, for rooms without a name or canonical alias. ([\matrix-org#14442](matrix-org#14442))

Bugfixes
--------

- Faster joins: do not block creation of or queries for room aliases during the resync. ([\matrix-org#14292](matrix-org#14292))
- Fix a bug introduced in Synapse 1.64.0rc1 which could cause log spam when fetching events from other homeservers. ([\matrix-org#14347](matrix-org#14347))
- Fix a bug introduced in 1.66 which would not send certain pushrules to clients. Contributed by Nico. ([\matrix-org#14356](matrix-org#14356))
- Fix a bug introduced in v1.71.0rc1 where the power level event was incorrectly created during initial room creation. ([\matrix-org#14361](matrix-org#14361))
- Fix the refresh token endpoint to be under /r0 and /v3 instead of /v1. Contributed by Tulir @ Beeper. ([\matrix-org#14364](matrix-org#14364))
- Fix a long-standing bug where Synapse would raise an error when encountering an unrecognised field in a `/sync` filter, instead of ignoring it for forward compatibility. ([\matrix-org#14369](matrix-org#14369))
- Fix a background database update, introduced in Synapse 1.64.0, which could cause poor database performance. ([\matrix-org#14374](matrix-org#14374))
- Fix PostgreSQL sometimes using table scans for queries against the `event_search` table, taking a long time and a large amount of IO. ([\matrix-org#14409](matrix-org#14409))
- Fix rendering of some HTML templates (including emails). Introduced in v1.71.0. ([\matrix-org#14448](matrix-org#14448))
- Fix a bug introduced in Synapse 1.70.0 where the background updates to add non-thread unique indexes on receipts could fail when upgrading from 1.67.0 or earlier. ([\matrix-org#14453](matrix-org#14453))

Updates to the Docker image
---------------------------

- Add all Stream Writer worker types to `configure_workers_and_start.py`. ([\matrix-org#14197](matrix-org#14197))
- Remove references to legacy worker types in the multi-worker Dockerfile. ([\matrix-org#14294](matrix-org#14294))

Improved Documentation
----------------------

- Upload documentation PRs to Netlify. ([\matrix-org#12947](matrix-org#12947), [\matrix-org#14370](matrix-org#14370))
- Add addtional TURN server configuration example based on [eturnal](https://github.com/processone/eturnal) and adjust general TURN server doc structure. ([\matrix-org#14293](matrix-org#14293))
- Add example on how to load balance /sync requests. Contributed by [aceArt](https://aceart.de). ([\matrix-org#14297](matrix-org#14297))
- Edit sample Nginx reverse proxy configuration to use HTTP/1.1. Contributed by Brad Jones. ([\matrix-org#14414](matrix-org#14414))

Deprecations and Removals
-------------------------

- Remove support for PostgreSQL 10. ([\matrix-org#14392](matrix-org#14392), [\matrix-org#14397](matrix-org#14397))

Internal Changes
----------------

- Run unit tests against Python 3.11. ([\matrix-org#13812](matrix-org#13812))
- Add TLS support for generic worker endpoints. ([\matrix-org#14128](matrix-org#14128), [\matrix-org#14455](matrix-org#14455))
- Switch to a maintained action for installing Rust in CI. ([\matrix-org#14313](matrix-org#14313))
- Add override ability to `complement.sh` command line script to request certain types of workers. ([\matrix-org#14324](matrix-org#14324))
- Enabling testing of [MSC3874](matrix-org/matrix-spec-proposals#3874) (filtering of `/messages` by relation type) in complement. ([\matrix-org#14339](matrix-org#14339))
- Concisely log a failure to resolve state due to missing `prev_events`. ([\matrix-org#14346](matrix-org#14346))
- Use a maintained Github action to install Rust. ([\matrix-org#14351](matrix-org#14351))
- Cleanup old worker datastore classes. Contributed by Nick @ Beeper (@Fizzadar). ([\matrix-org#14375](matrix-org#14375))
- Test against PostgreSQL 15 in CI. ([\matrix-org#14394](matrix-org#14394))
- Remove unreachable code. ([\matrix-org#14410](matrix-org#14410))
- Clean-up event persistence code. ([\matrix-org#14411](matrix-org#14411))
- Update docstring to clarify that `get_partial_state_events_batch` does not just give you completely arbitrary partial-state events. ([\matrix-org#14417](matrix-org#14417))
- Fix mypy errors introduced by bumping the locked version of `attrs` and `gitpython`. ([\matrix-org#14433](matrix-org#14433))
- Make Dependabot only bump Rust deps in the lock file. ([\matrix-org#14434](matrix-org#14434))
- Fix an incorrect stub return type for `PushRuleEvaluator.run`. ([\matrix-org#14451](matrix-org#14451))
- Improve performance of `/context` in large rooms. ([\matrix-org#14461](matrix-org#14461))
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Nov 27, 2022
Synapse 1.72.0 (2022-11-22)
===========================

Please note that Synapse now only supports PostgreSQL 11+, because
PostgreSQL 10 has reached end-of-life, c.f. our [Deprecation
Policy](https://github.com/matrix-org/synapse/blob/develop/docs/deprecation_policy.md).

Features
--------

- Add experimental support for
  [MSC3912](matrix-org/matrix-spec-proposals#3912):
  Relation-based
  redactions. ([\#14260](matrix-org/synapse#14260))

- Build Debian packages for Ubuntu 22.10 (Kinetic
  Kudu). ([\#14396](matrix-org/synapse#14396))

- Add an [Admin
  API](https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/index.html)
  endpoint for user lookup based on third-party ID (3PID). Contributed
  by
  @ashfame. ([\#14405](matrix-org/synapse#14405))

- Faster joins: include heroes' membership events in the partial join
  response, for rooms without a name or canonical
  alias. ([\#14442](matrix-org/synapse#14442))

Deprecations and Removals
-------------------------

- Remove support for PostgreSQL
  10. ([\#14392](matrix-org/synapse#14392),
  [\#14397](matrix-org/synapse#14397))
@weeman1337
Copy link
Contributor

I am currently working on adding this to the Matrix JS SDK.

This is an extension to an existing endpoint. The same would probably apply to the function call in the SDK: Current plan is to add an option tot he redact call. How do you think the SDK should behave in this case?

  • Send the event anyway. Means the caller is responsible to check for server side support before.
  • Check for server side support on redaction with with_relations and raise an error if no support.

@babolivier
Copy link
Contributor Author

Hey @weeman1337, this is probably something the Element Web team would be better positioned to answer (since it's an implementation detail), but I would expect clients to check for server support and only show the feature to the user if there is server-side support for it.
Also, please use threads to comment on MSCs (by clicking on a line in the diff), since it makes the timeline more readable 🙂

- Update title
- Correct the provided example, and clarify some use cases
@giomfo giomfo changed the title MSC3912: Relation-based redactions MSC3912: Redaction of related events May 4, 2023
…n must be updated

- rename the new property `with_relations` with `with_rel_types` (to prevent us from introducing a new term ("relations") to refer to event relationships). Only the stable name is changed, we keep the existing unstable one.
- introduce a catch-all `"*"` value, which if found in the list means "any relation type"
@giomfo
Copy link
Member

giomfo commented May 29, 2023

@richvdh @turt2live FYI I resolved all the pending discussions on this MSC with my 2 last commits.
I filed a new issue on each platform to update the current implementation according to the changes introduced by the last commit

Comment on lines +99 to +101
If an event that matches the redaction criteria comes down federation after
redaction requests has completed, the server must attempt to redact it on behalf
of the redaction request's sender.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Synapse PR referenced in the PR description (matrix-org/synapse#14260) says:

This implementation is lacking a way to keep watch for incoming events that match the redaction criteria after the redaction request finishes, that'll come in a separate PR.

Is there any indication that this second part has happened? If not, then I don't think that counts as a complete implementation of the MSC and we should remove those parts from the MSC.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would let the backend team think about this use case before deciding to remove or not this part (some details)

Comment on lines 161 to 163
Homeservers which support this MSC should indicate it by adding
`org.matrix.msc3912` and `org.matrix.msc3912.stable` in the response to `GET
/_matrix/client/versions` requests.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

presumably there is some difference between org.matrix.msc3912 and org.matrix.msc3912.stable? Please make it explicit what that difference is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I think https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/3827-space-explore.md#unstable-prefix does a decent job of this -- in particular it explains what clients should do at each stage)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we sure we need org.matrix.msc3912.stable ? We should only spec a "stable" unstable_feature if we absolutely need to get this feature into widespread use before homeserver implementations support the spec version which includes this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I decided to remove the "stable" flag (see 1b3176c)
I consider the homeservers will still support the unstable attribute org.matrix.msc3912.with_relations until the clients are updated to check the presence of the spec version, that supports the MSC

giomfo and others added 2 commits June 12, 2023 15:30
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-server Client-Server API hacktoberfest-accepted kind:maintenance MSC which clarifies/updates existing spec needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. proposal A matrix spec change proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants