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

MSC1902: Split the media repo into s2s and c2s parts #1902

Closed
wants to merge 5 commits into from

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented Feb 24, 2019

@turt2live turt2live added proposal-in-review proposal A matrix spec change proposal labels Feb 24, 2019
@turt2live turt2live changed the title Proposal to split the media repo into s2s and c2s parts MSC1902: Split the media repo into s2s and c2s parts Feb 24, 2019
@jcgruenhage
Copy link
Contributor

I don't think splitting on the version string is a good idea. It by far the easiest, sure, but it doesn't feel good semantically

@abeluck
Copy link

abeluck commented Feb 25, 2019

What happens when, for unknown future reasons, the version(s) need to change? It seems to me that this point should be at least addressed in the proposal.

@turt2live
Copy link
Member Author

@abeluck that's already handled by nature of the APIs being versioned

@jcgruenhage suggestions welcome - I'm not particularly comfortable with moving them, but that doesn't mean its off the table


As an aside: please leave comments on the diff so this is threaded.

@turt2live turt2live added the kind:maintenance MSC which clarifies/updates existing spec label Apr 20, 2020
@turt2live
Copy link
Member Author

I've altered this proposal slightly to diminish the importance of authentication from the client-server side, leaving that for another MSC to handle.

Aside from that, the MSC is largely the same and I think has been sitting here for long enough to move onto the next stage of idle activity:

@mscbot fcp merge

@mscbot
Copy link
Collaborator

mscbot commented Jul 28, 2020

This FCP proposal has been cancelled by #1902 (comment).

Team member @mscbot has proposed to merge this. The next step is review by the rest of the tagged people:

Concerns:

  • No implementation

Once at least 75% of reviewers approve (and there are no outstanding concerns), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for information about what commands tagged team members can give me.

@mscbot mscbot added disposition-merge proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. labels Jul 28, 2020
@turt2live
Copy link
Member Author

turt2live commented Jul 28, 2020

oh, hah, this requires an implementation. Sorry for the noise.

@mscbot fcp cancel

@mscbot
Copy link
Collaborator

mscbot commented Jul 28, 2020

This proposal is not in FCP.

@turt2live
Copy link
Member Author

@mscbot concern No implementation

@richvdh richvdh added this to Awaiting FCP ticks in Spec Core Team Backlog Sep 10, 2020
@anoadragon453 anoadragon453 added this to Ready for FCP ticks in Spec Core Team Backlog Sep 11, 2020
@richvdh
Copy link
Member

richvdh commented Jan 19, 2021

@mscbot fcp cancel

@mscbot mscbot added proposal-in-review and removed disposition-merge proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. labels Jan 19, 2021
@richvdh richvdh removed this from Ready for FCP ticks in Spec Core Team Backlog Jan 19, 2021
@turt2live turt2live added the needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. label Jun 8, 2021
Comment on lines +21 to +25
| `/_matrix/media/:version/download/:origin/:mediaId` | `/_matrix/client/r0/media/download/:origin/:mediaId` | `/_matrix/federation/v1/remote_media/download/:origin/:mediaId` |
| `/_matrix/media/:version/thumbnail/:origin/:mediaId` | `/_matrix/client/r0/media/thumbnail/:origin/:mediaId` | `/_matrix/federation/v1/remote_media/thumbnail/:origin/:mediaId` |
| `/_matrix/media/:version/upload` | `/_matrix/client/r0/media/upload` | N/A |
| `/_matrix/media/:version/preview_url` | `/_matrix/client/r0/media/preview_url` | N/A |
| `/_matrix/media/:version/config` | `/_matrix/client/r0/media/config` | N/A |
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this has been last changed a while ago;

Suggested change
| `/_matrix/media/:version/download/:origin/:mediaId` | `/_matrix/client/r0/media/download/:origin/:mediaId` | `/_matrix/federation/v1/remote_media/download/:origin/:mediaId` |
| `/_matrix/media/:version/thumbnail/:origin/:mediaId` | `/_matrix/client/r0/media/thumbnail/:origin/:mediaId` | `/_matrix/federation/v1/remote_media/thumbnail/:origin/:mediaId` |
| `/_matrix/media/:version/upload` | `/_matrix/client/r0/media/upload` | N/A |
| `/_matrix/media/:version/preview_url` | `/_matrix/client/r0/media/preview_url` | N/A |
| `/_matrix/media/:version/config` | `/_matrix/client/r0/media/config` | N/A |
| `/_matrix/media/:version/download/:origin/:mediaId` | `/_matrix/client/v3/media/download/:origin/:mediaId` | `/_matrix/federation/v1/remote_media/download/:origin/:mediaId` |
| `/_matrix/media/:version/thumbnail/:origin/:mediaId` | `/_matrix/client/v3/media/thumbnail/:origin/:mediaId` | `/_matrix/federation/v1/remote_media/thumbnail/:origin/:mediaId` |
| `/_matrix/media/:version/upload` | `/_matrix/client/v3/media/upload` | N/A |
| `/_matrix/media/:version/preview_url` | `/_matrix/client/v3/media/preview_url` | N/A |
| `/_matrix/media/:version/config` | `/_matrix/client/v3/media/config` | N/A |

Instead of using `/_matrix/media` for both servers and clients, servers must now use
`/_matrix/federation/v1/remote_media` and clients must use `/_matrix/client/r0/media`.

To support backwards compatibility and logical usage of the media repo, only downloads
Copy link
Member

Choose a reason for hiding this comment

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

I don't really understand how this supports backwards compatibility.

Is the idea that clients and requesting-servers should use the new endpoints and fall back to the old ones on 400? Or do we just have to wait for everyone to support the new endpoints before we can switch to using them?

Copy link
Member Author

Choose a reason for hiding this comment

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

TLDR: We should fix this MSC to use fallback semantics.


This paragraph certainly mixes two different ideas in it:

  1. Federation and client-server should be different things (which is hopefully covered by the rest of the proposal and doesn't make sense to mention here)
  2. We're saying that the existing /media/:version endpoints are deprecated in favour of the new ones, but function as they do today (supporting both federation and client requests). The new ones would validate via authentication, where appropriate, that the correct thing is being called.

Now, is this the correct way to handle backwards compatibility in not-2018 Matrix? I don't think so. We probably just want to deprecate the existing endpoints (so we can remove them later) and rely on fallback semantics for servers who care. Spec-wise, we don't really need to define how the fallback works once the ecosystem has sufficient adoption, but the MSC should definitely cover it.

Copy link
Member

Choose a reason for hiding this comment

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

It is frustrating that we still don't have a defined behaviour for unrecognised endpoints (MSC3743), making fallback 50 times harder than it should be.

@richvdh
Copy link
Member

richvdh commented Oct 23, 2022

I've basically rewritten this as MSC3916.

@turt2live
Copy link
Member Author

Closing in favour of #3916

@turt2live turt2live closed this Nov 25, 2023
@turt2live turt2live added the obsolete A proposal which has been overtaken by other proposals label Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. obsolete A proposal which has been overtaken by other proposals proposal A matrix spec change proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants