Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Investigate if there are unspecced endpoints that can be removed #8334

Open
clokep opened this issue Sep 16, 2020 · 14 comments
Open

Investigate if there are unspecced endpoints that can be removed #8334

clokep opened this issue Sep 16, 2020 · 14 comments
Labels
A-Spec-Compliance places where synapse does not conform to the spec T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. Z-Cleanup Things we want to get rid of, but aren't actively causing pain

Comments

@clokep
Copy link
Member

clokep commented Sep 16, 2020

We should investigate whether there are any unspecced (and unused) endpoints in Synapse.

See #8177 about some of the admin APIs being exposed under /_matrix/client.

I took a look at some of the federation APIs and client APIs also, will put some results in here tomorrow.

#8154 also has some related info.

@clokep clokep added the A-Spec-Compliance places where synapse does not conform to the spec label Sep 16, 2020
@clokep clokep self-assigned this Sep 16, 2020
@clokep
Copy link
Member Author

clokep commented Sep 17, 2020

I collated a bunch of this on a spreadsheet, but a summary is below.

Federation

Unspecced

  • The various groups endpoints (under /_matrix/federation/v1/groups/), but are to be replaced (I believe).
  • A room complexity endpoint (/_matrix/federation/unstable/rooms/{roomId}/complexity) was added in Implement the SHHS complexity API #5216.

Errors

Client

Prefix

  • All endpoints appear under /_matrix/client/unstable/, which is probably OK.
  • Most endpoints appear under /_matrix/client/r0/, unless they're unstable endpoints.
  • Some endpoints appear under /_matrix/client/api/v1/.

Unspecced

Obsolete MSCs

Endpoints from MSCs which are obsolete (not accepted into the specification). Hopefully these can be removed.

Proposed MSCs

Endpoints for MSCs which are proposals and not yet accepted into the specification. Generally these are fine as is.

Merged MSCs

Endpoints for MSCs which were merged, but are not yet part of the specification. These should be unstable only.

Implementation specific

Some endpoints aren't specced and are implementation specific (i.e. there are sent to the client as a redirect or sent to confirm email addresses, etc.). These could potentially be moved under the /_synapse/client/ prefix instead:

Errors

Unimplemented

Specified endpoints that are not implemented in Synapse.

  • /_matrix/client/r0/account/password/msisdn/requestToken, see spec. The corresponding email version is implemented.
  • /_matrix/client/r0/rooms/{roomId}/aliases, see spec. This is only implemented as the unstable /_matrix/client/unstable/org\.matrix\.msc2432/rooms/{roomId}/aliases.

Deprecated

The specification has some deprecated endpoints as well. These are generally implemented by Synapse, but unless support for older versions of the spec are dropped, these cannot be dropped (e.g. the initialSync endpoint).

@clokep
Copy link
Member Author

clokep commented Sep 17, 2020

I think the next step here would be to:

  • Identify endpoints that we would like to remove (e.g. they were an experiment and there's no value in them).
  • Look at the logs from matrix.org and see if they've been used recently.
  • Decide whether we can remove them. 😄

@tulir
Copy link
Member

tulir commented Sep 17, 2020

@clokep
Copy link
Member Author

clokep commented Sep 17, 2020

All endpoints appear under /_matrix/client/unstable/, which is probably OK.

The MSC process actually says the opposite:

Note that unstable namespaces do not automatically inherit endpoints from stable namespaces: for example, the fact that /_matrix/client/r0/sync exists does not imply that /_matrix/client/unstable/com.example/sync exists.

@clokep
Copy link
Member Author

clokep commented Sep 17, 2020

The relation MSC isn't obsolete, it was just split up. The endpoints are now in matrix-org/matrix-doc#2675 and partially matrix-org/matrix-doc#2674. (although the /send_relation endpoint is mostly useless since it does nothing that /send doesn't do)

I must have missed that that MSC got replaced! Thanks for pointing this out!

/aliases is unstable because Synapse doesn't support C-S r0.6.1 yet

Fair enough, just documenting it. I thought we had an issue about this, but we don't seem to. I'll file a separate one.

@clokep clokep removed their assignment Sep 17, 2020
@ShadowJonathan
Copy link
Contributor

ShadowJonathan commented Sep 18, 2020

Should everything used by historical_admin_path_patterns be a part of this? (such as shutdown_room)

@clokep
Copy link
Member Author

clokep commented Sep 18, 2020

Should everything used by historical_admin_path_patterns be a part of this? (such as shutdown_room)

As I said in the description, this is tracked in a separate issue:

See #8177 about some of the admin APIs being exposed under /_matrix/client.

@clokep
Copy link
Member Author

clokep commented Oct 20, 2020

/_matrix/client/(unstable|api/v1|r0)/pushers/remove (implemented by PushersRemoveRestServlet).

I think this is matrix-org/matrix-doc#1757.

turt2live added a commit that referenced this issue Jan 26, 2021
[MSC2432](matrix-org/matrix-spec-proposals#2432) added this endpoint originally but it has since been included in the spec for nearly a year. 

We can't reasonably remove the unstable endpoint as client implementations still rely on it, and those clients cannot rely on `r0.6.x` appearing in the `/versions` to detect if this stable endpoint exists. It's proposed to introduce a transition period for implementations which may be stuck on the old endpoint of 2 months (minimum). After that point, Synapse can (and should) remove the unstable endpoint without warning.

The exact timelines are to be determined by the synapse team, however.

This is progress towards #8334
richvdh pushed a commit that referenced this issue Apr 9, 2021
Related: #8334
Deprecated in: #9429 - Synapse 1.28.0 (2021-02-25)

`GET /_synapse/admin/v1/users/<user_id>` has no
- unit tests
- documentation

API in v2 is available (#5925 - 12/2019, v1.7.0).
API is misleading. It expects `user_id` and returns a list of all users.

Signed-off-by: Dirk Klimpel dirk@klimpel.org
@richvdh richvdh added the Z-Future-Maintenance Things that can't yet be done, but will need cleaning up in a couple of months/releases label Apr 9, 2021
@richvdh
Copy link
Member

richvdh commented Apr 9, 2021

Listing appservices (/_matrix/client/(unstable|api/v1|r0)/directory/list/appservice/{networkId}/{roomId}), added in matrix-org/matrix-spec#379.

this is specced as part of the AS API - https://spec.matrix.org/unstable/application-service-api/#put_matrixclientr0directorylistappservicenetworkidroomid - but only in its PUT guise.

richvdh pushed a commit that referenced this issue Jun 3, 2021
[MSC2432](matrix-org/matrix-spec-proposals#2432) added this endpoint originally but it has since been included in the spec for nearly a year. 

This is progress towards #8334
@erikjohnston erikjohnston added the T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. label Jul 26, 2021
@callahad callahad added this to the Revisit: Quarterly milestone Sep 15, 2021
@callahad callahad removed this from the Revisit: Next Month milestone Nov 4, 2021
@richvdh richvdh added this to the Revisit: Next Month milestone Apr 28, 2022
@richvdh richvdh removed the Z-Future-Maintenance Things that can't yet be done, but will need cleaning up in a couple of months/releases label May 5, 2022
@richvdh richvdh removed this from the Revisit: Next Month milestone May 5, 2022
@clokep
Copy link
Member Author

clokep commented Jun 6, 2022

Note that #11584 removed the various groups/communities endpoints.

deepbluev7 added a commit to deepbluev7/element-android that referenced this issue Jun 12, 2022
This increases compatibility with homeservers and allows them to remove
Element Android specific workaround.

fixes element-hq#4830
see ruma/ruma#936
see matrix-org/synapse#8334
see matrix-org/synapse#9224

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
@deepbluev7
Copy link
Contributor

As of element-hq/element-android#6288 Element Android now uses the stable version of /_matrix/client/unstable/org.matrix.msc2432/rooms/:room_id/aliases, so it should be possible to remove that after some buffer period for releases to go out and people to update. At least I believe at least that that was the last user?

@richvdh
Copy link
Member

richvdh commented Jul 1, 2022

I've attempted to update the spreadsheet, though I suspect there are more endpoints which are not listed.

@clokep
Copy link
Member Author

clokep commented Jul 5, 2022

I wonder if at this point it would make sense to split this into separate issues for each endpoint?

@clokep
Copy link
Member Author

clokep commented May 31, 2023

I looked briefly today and the only requests going to matrix.org on /_matrix/client/api/v1/ are some requests to /login with no user agent. I'm inclined to think we can rip that out now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Spec-Compliance places where synapse does not conform to the spec T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. Z-Cleanup Things we want to get rid of, but aren't actively causing pain
Projects
None yet
Development

No branches or pull requests

8 participants