Page MenuHomePhabricator

Remove or simplify unused static/index.html files
Open, In Progress, LowPublic

Description

Several Node.js services based on service-template-node[1] include a static/index.html file with old HTML, which keeps showing up when doing skin or JS related migrations/deprecations[2]. These likely don't render well currently and also may no longer match current MW output behavior. These are usually not served to clients behind RESTBase and serve no purpose besides demonstrating how to serve a static file.

This task is to either simplify the HTML or remove the file.
If we remove the file we should consider to also disable serving of static files in app.js[3].

List of repos with this file[2]:

  • mobileapps
  • wikifeeds
  • recommendation-api

[] trending-edits
[] graphoid

[1] https://github.com/wikimedia/service-template-node
[2] https://codesearch.wmcloud.org/search/?q=ResourceLoaderDynamicStyles&i=nope&files=html%24&repos=
[3] https://github.com/wikimedia/service-template-node/blob/master/app.js#L236

Event Timeline

daniel triaged this task as Low priority.Sep 1 2020, 8:11 PM
daniel moved this task from Inbox to Later on the Platform Team Workboards (Clinic Duty Team) board.

Assuming this task is about the [Deprecated] service-template-node code project, hence adding that project tag so other people who don't know or don't care about team tags can find this task when searching via projects. Please set appropriate project tags when possible. Thanks!

Hello
i want to work on this task.
i understand that i have to delete html file from repo and and disable serving of html file form node js server.
But i dont understand what is the use of list of repo given.
Can any body provide me hint what's that.
And please tell me that if i am thinking in right direction to solve the issue.

So i can start solving this issue.

Thank you

But i dont understand what is the use of list of repo given.

If you refer to the (currently) five checkboxes in the task description, then these were the code repos at the time of creating this ticket which all need(ed) each a separate fix.

Hi @Bharatkhatri351, no need to ping anyone before a patch has passed all CI checks. :) Also, why is a change in the service-template-node repo proposed, which is not listed under List of repos with this file in the task description here?

@Bharatkhatri351: ping - could you answer my question? Thanks :)

sorry @Aklapper i was busy in another project so not able to reply.
Actually at first i didn't understand why list of repo was given. actually i was thinking i have to do changes in service-template-node and i was thinking wrong. And its my first project in which i am using github so thats why i mentioned link and ping authored because i didn't know how this github stuff work.

i will fix this issue later.because i am working on another project. and if someone another intersted in issue can fix this i am not assigning this issue

Thank You.

Change 674925 had a related patch set uploaded (by Sahilgrewalhere; author: Sahilgrewalhere):
[mediawiki/services/mobileapps@master] Removed unused static/index.html files

https://gerrit.wikimedia.org/r/674925

Change 674925 merged by jenkins-bot:

[mediawiki/services/mobileapps@master] Removed unused static/index.html files

https://gerrit.wikimedia.org/r/674925

Pppery added a subscriber: EbenezerRao.
Aklapper updated Other Assignee, removed: Prakhar0804.
Aklapper added subscribers: Shreyapedia, Prakhar0804.

@Shreyapedia: Hi, why did this get assigned to another user?

@Aklapper Hey! I'm actually Prakhar's mentor under a Wiki program. He was having some issue with his laptop at that moment so just helped him.

Mvolz updated the task description. (Show Details)
This comment was removed by Prakhar0804.

I've submitted a fix for the service-template-node repo itself (the base template):
https://github.com/wikimedia/service-template-node/pull/198
Let me know ahead !

@Aklapper

Please do not ping me for unclear reasons - thanks!

Code search no longer indexes trending-edits and graphoid (presumably as long out of prod) so striking those out.

The patch is good POC of what actually needs to be done, it's just that service-template-node is no longer used and is kept for historical value only.

The main repos to remove it where it will actually help are the ones still listed in the task, wikifeeds and recommendation-api.

It will be important to verify those repos don't actually serve any static files before removing any static path handlers.

Understood @Mvolz closing this PR on github since service-template-node is no longer actively used.
Will focus on wikifeeds and recommendation-api instead.

Change #1307534 had a related patch set uploaded (by Prakhar0804; author: Prakhar0804):

[mediawiki/services/wikifeeds@master] Remove unused static/index.html and disable static file serving

https://gerrit.wikimedia.org/r/1307534

Change #1307537 had a related patch set uploaded (by Prakhar0804; author: Prakhar0804):

[mediawiki/services/recommendation-api@master] Remove unused static/index.html and disable static file serving

https://gerrit.wikimedia.org/r/1307537

@Mvolz Both patches for wikifeeds and recommendation-api are up for review whenever you get a chance:

No rush, just flagging since it's been a little while. Thanks!

Change #1307534 merged by jenkins-bot:

[mediawiki/services/wikifeeds@master] Remove unused static/index.html and disable static file serving

https://gerrit.wikimedia.org/r/1307534

So apparently recommendation-api hasn't been able to build for like a year because some of the packages it uses are no longer online.

T390517 means we probably don't have to do recommendation-api either.

So basically I think we can call this done? Though recommendation-api will show up in search a little while longer until T390517 is finished.