-
Notifications
You must be signed in to change notification settings - Fork 79
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
Remove mathoids PNG images #1324
Conversation
Remove mathoids PNG images from RestBase endpoint. * Stop storing PNG response from mathoid * Redirect PNG endpoint to SVG endpoint Unfortunately, one can not remove the PNG option from swagger, as the same .yaml file is used for the swagger ui and the parameter check. See https://gerrit.wikimedia.org/r/c/mediawiki/services/mathoid/+/875405/8/test/restbase/README.md for local testing. Bug: T334842 Change-Id: I6e16ccb5f3d84e76393ae72172a91e77a8c8b447
It's a bit hard to test.
|
@brightbyte @Ladsgroup what do you think? |
I'm all for it. I can go ask Virginia if needed (today is public holiday in US though) |
I think it's good to go, and I agree we should do it. Virginia told me she is fine with it, but it would be nice if she could comment here. I don't have capacity to manually test this, and I don't know the code well enough to just merge after eyeballing it... We'll have to find someone (tm) who can do one or the other. Maybe @johngian could get this deployed to beta first, so we can try it there? |
@brightbyte @Ladsgroup thank you both. I think we definitely need some testing. As an alternative, I can set up a demo in beta.math.wmflabs.org. I did already updated Mathoid on https://mathoid.beta.math.wmflabs.org to the version of https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/919375 and built a custom Mediawiki container with REL1_38. However, I have difficulties finding a docker image of restbase. I was searching here at https://docker-registry.wikimedia.org/ but I need clarification on the current version. Is there already a base image, I can use to build a demo of this PR, or should I start with a blank node container? |
I'd be fine with being able to just test Mathoid by hand for now. Do we know public MediaWiki instances that are still asking for png? |
We don't have a dockerized version of restbase published. The service is running on servers with system wide installed node runtime. For the wikifeeds upgrade to node 16 I used this as a base image: https://docker-registry.wikimedia.org/nodejs16-slim. If you want to be closer to current production you need to use node 10. There are a few base images already published on wmf docker registry. |
Also for convenience we can always point beta restbase to the new mathoid instance so we don't need to put more effort on setting up restbase. I wouldn't consider it a huge deal in case it causes problem just for beta wikipedia. |
I don't expect problems for beta wikipedia. The problem is how browsers will handle svgs being announced as PNG. Current firefox works well, but... |
The SQLlite storage backend uses the resource information to create the required tables. We need to create the table, even if it will not be used. Change-Id: I51a80f261b8a05c2a79c87fada3337657630e29a
I set up a test environment on the labs instance math19. You can log into the instance if you have labs account. The docker config is in /home/physikerwelt/srv-math19. While setup, I realized that the table mathoid_png needs to exist, so I added one additional commit. See below how you can test locally (the webui did never work). You need to look for
|
Where do I find the test instance? https://math19.wmflabs.org/ and https://beta.math19.wmflabs.org/ both don't work. |
|
Ok, I confirmed that this is working as follows:
I received from this response, I constructed the URL https://restbase.beta.math.wmflabs.org/localhost/v1/media/math/render/png/9221bc8e597b2308489fe8e8e128f8045f4e7a0e which indeed returns an SVG with |
@johngian Looks good to me, do you think this can go in? |
Has this also been deployed? |
I just deployed this change |
Remove mathoids PNG images from RestBase endpoint.
Unfortunately, one can not remove the PNG option from swagger, as the same .yaml file is used for the swagger ui and the parameter check.
See https://gerrit.wikimedia.org/r/c/mediawiki/services/mathoid/+/875405/8/test/restbase/README.md for local testing.
Bug: T334842
Change-Id: I6e16ccb5f3d84e76393ae72172a91e77a8c8b447