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

Embed API: fully deprecate/remove embed API V2 #10677

Open
stsewd opened this issue Aug 28, 2023 · 5 comments
Open

Embed API: fully deprecate/remove embed API V2 #10677

stsewd opened this issue Aug 28, 2023 · 5 comments
Assignees
Labels
Needed: design decision A core team decision is required

Comments

@stsewd
Copy link
Member

stsewd commented Aug 28, 2023

What's the problem this feature will solve?

We are still generating fjson files for sphinx builds (readthedocs/readthedocs-sphinx-ext#126), at first I thought they were used by our search only, but they are actually being used by th embed API V2 as well. If we fully deprecate/remove the embed API V2, we can delete all the code related to fjson files (generating then and storing them in storage).

def _get_doc_content(project, version, doc):
storage_path = project.get_storage_path(
'json',
version_slug=version.slug,
include_file=False,
version_type=version.type,
)
file_path = build_media_storage.join(
storage_path,
f'{doc}.fjson'.lstrip('/'),
)

Describe the solution you'd like

Fully deprecate that endpoint, similar to the recent deprecations we have been doing, maybe contact the projects that are using it.

Alternative solutions

  • Just stop generating fjson files for new builds. This can be unexpected for users.
  • Try to re-use some code from V3 to parse the html files instead, this may require some work for something that we will eventually remove.

Additional context

@stsewd stsewd added the Needed: design decision A core team decision is required label Aug 28, 2023
@humitos
Copy link
Member

humitos commented Aug 29, 2023

I took a look at NR and I found we have just a few projects hitting this endpoint in the last 90 days: https://onenr.io/0PwJEXYO7Q7. We have 28 projects hitting this API and it's mainly because they are using an older version of sphinx-hoverxref

The change from Embed v2 to v3 was done in readthedocs/sphinx-hoverxref#146 and it was released on 0.8b1 and we are on 1.3.0 now.

The good news here is should be easy for these projects to just update this dependency to solve the issue.

I agree with the plan here: deprecate, contact users, wait a month or so, and remove the endpoint.

@ericholscher
Copy link
Member

One idea here: stop generating fjson for new versions, but keep it around so old hoverxref keeps working for some time.

@ericholscher
Copy link
Member

ericholscher commented Jul 2, 2024

Once we migrate all users away from using our Sphinx extension, fjson files won't be generated for anyone. People will need to upgrade their version of the hoverxref Sphinx extension to fix this.

Old versions of docs will break hoverxref, but that's probably fine for old versions. New versions can use the new sphinx extension and they will work?

@humitos
Copy link
Member

humitos commented Nov 4, 2024

Now that everybody is on addons, I think we are ready to perform this removal. I'm adding this issue to the next sprint and assigning it Santos. I think it shouldn't be a ton of work.

@ericholscher
Copy link
Member

ericholscher commented Nov 4, 2024

I think the main work is reaching out to old users and getting them to upgrade the sphinx extension. There are only a few major users from what I remember.

This dashboard is a good place to start: https://onenr.io/0EjOLWaJGQ6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
Status: Planned
Development

No branches or pull requests

3 participants