Page MenuHomePhabricator

Varnish mobile redirection misses some sites
Closed, ResolvedPublic

Description

While working on T344080, I noticed that the mobile_redirect Varnish function does not produce a mobile domain for some minor sites (and Wikifunctions, which is new), which means that mobile redirection doesn't work for those sites.

Some examples of the missed minor sites:

  • vrt-wiki.wikimedia.org
  • api.wikimedia.org
  • wikimania.wikimedia.org
  • hi.wikimedia.org
  • foundation.wikimedia.org

I can provide a full list of the missed sites if it would be helpful.

Event Timeline

Hi, thanks for reporting this!
Can you provide us a full list of sites that shows this behavior? It would be extremely helpful to us to patch that regex(es)...

Thanks a lot!

Yes, definitely. It might take me a few days since I accidentally deleted the code that I used to get the list 😅, but it won't be a big problem. Reassigning to myself while I do that.

If you want in the meantime we can start with this first list of domains and then add the others

@Fabfur I don't think there's any reason to do that. It will be easier for you to do it all at once, and it's already been like this for years without causing any major issue.

nshahquinn-wmf removed a project: Movement-Insights.

Thanks for the reminder! The list is at P52488.

A few wikis listed seem not to have a mobile site, either lacking the footer link entirely or giving a DNS error when you click on it (e.g. thankyou.wikipedia.org, nostalgia.wikipedia.org, collab.wikimedia.org, login.wikimedia.org). However, I don't know of any way to filter those out other than checking manually.

If you have any interest in seeing how I got this, my code is at https://gitlab.wikimedia.org/nshahquinn-wmf/miscellaneous-notebooks/-/blob/main/2023/2023-09_missing_mobile_redirection.ipynb. It uses the canonical wiki dataset; you can see how that's generated at https://github.com/wikimedia-research/canonical-data/blob/master/wiki/generate.ipynb.

Change 957292 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] varnish: add more domains for mobile redirect (*.wikimedia.org)

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

Thanks @nshahquinn-wmf , I've started working on this, obviously we will add rules for mobile domain redirect only for domains that have a real mobile counterpart...

We started adding the *.wikimedia.org domains to the Varnish configuration, some notes:

Currently we have these domains without a mobile (m.<domain>.wikimedia.org) counterpart:

advisors.wikimedia.org
auditcom.wikimedia.org
boardgovcom.wikimedia.org
board.wikimedia.org
chair.wikimedia.org
affcom.wikimedia.org
collab.wikimedia.org
donate.wikimedia.org
exec.wikimedia.org
grants.wikimedia.org
iegcom.wikimedia.org
il.wikimedia.org
internal.wikimedia.org
login.wikimedia.org
movementroles.wikimedia.org
noboard-chapters.wikimedia.org
projectcom.wikimedia.org
searchcom.wikimedia.org
spcom.wikimedia.org
techconduct.wikimedia.org
transitionteam.wikimedia.org

Obviously they won't be added to the redirect list

Those domains seems unused/old/deprecated. We added anyway to the list of redirected domains but let us know if they will eventually be removed in the future:

advisory.wikimedia.org
quality.wikimedia.org
test-commons.wikimedia.org
usability.wikimedia.org

Next step, after this validation, is to add the remaining entries (all the ones that are not part of the *.wikimedia.org second level domain) to the other list.

We'll keep you updated as soon as the new redirects will be actually active!

Regarding the other domains (the ones not part of *.wikimedia.org), only test.m.wikidata.org and m.wikifunctions.org DNS records are configured.

What should we do with nostalgia.wikipedia.org (already present in the varnish regex for redirect) and test.wikidata.org?

Change 957292 merged by Fabfur:

[operations/puppet@production] varnish: add more domains for mobile redirect (*.wikimedia.org)

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

Mentioned in SAL (#wikimedia-operations) [2023-09-20T09:08:47Z] <fabfur> applied patch https://gerrit.wikimedia.org/r/c/operations/puppet/+/957292 (T344175) to add new mobile redirect domains to Varnish. Changes will be applied automatically by puppet on all cp hosts

Hi @nshahquinn-wmf , changes to the first batch of domains (https://gerrit.wikimedia.org/r/c/operations/puppet/+/957292) should be applied during the next 30'. If you notice something strange please let us know!

Change 959686 had a related patch set uploaded (by Fabfur; author: Fabfur):

[operations/puppet@production] varnish: add comment to better explain mobile redirection regex

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

Fabfur changed the task status from Open to Stalled.Sep 27 2023, 1:30 PM
Fabfur added a subscriber: nshahquinn.

Hi, @nshahquinn if it's ok on your side I'll consider this as completed