Page MenuHomePhabricator

Beta cluster URL shortener (w-beta.wmflabs.org) broken
Closed, ResolvedPublic

Description

https://meta.wikimedia.beta.wmflabs.org/wiki/Special:UrlShortener produces URLs like https://w-beta.wmflabs.org/mt, but they don’t work at the moment:

404 Not Found

No proxy is configured for this host name. Please see our documentation on Wikitech for more information on configuring a proxy.

Event Timeline

Workaround: manually rewrite the URL to the correct Special:UrlRedirector URL, such as https://meta.wikimedia.beta.wmflabs.org/wiki/Special:UrlRedirector/mt. (At which point, of course, it’s not exactly a short URL anymore.)

I tried to look into this but didn’t get anywhere. I can’t even find the “Web Proxies” menu under “Network” anymore, is it gone? (T390914? No idea.)

image.png (232×220 px, 8 KB)

Change #1153632 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[operations/puppet@production] trafficserver: Add redirect rules for url shortener of beta cluster

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

Change #1153643 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[operations/puppet@production] beta: Add config for w.beta.wmcloud.org

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

With those patches cherry-picked https://w.beta.wmcloud.org/1 works but TLS cert doesn't include the domain so I need to fix that. I can't figure out where these certs are being generated but shouldn't be too hard.

Okay… is any of it going to make https://w-beta.wmflabs.org/1 work, i.e. the URL generated by MediaWiki? It sounds like those URLs used to work (e.g. Gerrit change, T357128), so I would rather not change the domain.

Okay… is any of it going to make https://w-beta.wmflabs.org/1 work, i.e. the URL generated by MediaWiki? It sounds like those URLs used to work (e.g. Gerrit change, T357128), so I would rather not change the domain.

We need to retire that domain IMHO. wmflabs should not be used and should be slowly migrated away.

Okay… is any of it going to make https://w-beta.wmflabs.org/1 work, i.e. the URL generated by MediaWiki? It sounds like those URLs used to work (e.g. Gerrit change, T357128), so I would rather not change the domain.

We need to retire that domain IMHO. wmflabs should not be used and should be slowly migrated away.

That's T289318: Move *.beta.wmflabs.org to *.beta.wmcloud.org.

If I were to be very picky, no since this is w-beta (not a subdomain) but regardless, wmflabs is deprecated and should be removed.

Also this is a testing setup I don't see the point of trying to set up redirects for w-beta.wmflabs.org at all.

I love debugging TLS, I barely can contain myself right now. I added the domain to acme-chief config so the new TLS certs should include the domain. I ran puppet agent on acme-chief VMs too and it got updated, I don't know if it did a new handshake with Let's Encrypt and issued a new cert, locally I see the old certificate but that's probably caching, my phone refuses to recognize the domain altogether. I give it some time to see what happens.

Yup, the new certificate has been issued, I'm seeing the new one with this domain included, works on my phone too. I'm going to switch the mw config to point to this short url

Change #1153724 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[operations/mediawiki-config@master] beta: Update url shortener domain

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

So my SAL message is just going to have a dead link forever I guess.

Change #1153724 merged by jenkins-bot:

[operations/mediawiki-config@master] beta: Update url shortener domain

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

Also this is a testing setup I don't see the point of trying to set up redirects for w-beta.wmflabs.org at all.

This. Wouldn't this just be for _testing URL shortener changes_ rather than being a separate URL shortener for messages related to beta?

So my SAL message is just going to have a dead link forever I guess.

After all it's on a wiki page. It can be edited at https://wikitech.wikimedia.org/wiki/Release_Engineering/SAL

I have fixed typos I made in SAL entries this way in the past.

But in the future just use the actual production URL shortener?

But in the future just use the actual production URL shortener?

I tried that one first, of course, but it doesn’t allow Beta Cluster domains. (And editing the wiki page doesn’t update the Elasticsearch index used by the SAL tool AFAIK.)

I tried that one first, of course, but it doesn’t allow Beta Cluster domains.

Gotcha, I wasn't aware of that. I wonder why that is.

I tried that one first, of course, but it doesn’t allow Beta Cluster domains.

Gotcha, I wasn't aware of that. I wonder why that is.

The Beta Cluster wikis are an untrusted environment. The production URL shortener should not perform shortening for anything hosted in Cloud VPS or a third party network. I don't know if this constraint is well documented anywhere, but it was a requirement of production deployment. See $wgUrlShortenerAllowedDomains and $wgUrlShortenerApprovedDomains in CommonSettings.php for the configured constraints. These two collections are intended to be in sync, the first are regex patterns used by the software and the latter are glob patterns shown to humans to explain what can be shortened.

I set up a redirect via the https://wikitech.wikimedia.org/wiki/Nova_Resource:Redirects infrastructure.

Thanks, but it doesn’t seem to be working yet?

Change #1153643 merged by Ladsgroup:

[operations/puppet@production] beta: Add config for w.beta.wmcloud.org

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

Change #1153632 merged by Ladsgroup:

[operations/puppet@production] trafficserver: Add redirect rules for url shortener of beta cluster

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

Ladsgroup claimed this task.

Everything is merged, I removed the cherry-picks, this is done.

I set up a redirect via the https://wikitech.wikimedia.org/wiki/Nova_Resource:Redirects infrastructure.

Thanks, but it doesn’t seem to be working yet?

Now it seems to be working \o/

Change #1160441 had a related patch set uploaded (by Krinkle; author: Krinkle):

[operations/puppet@production] beta: Remove unused beta-specific "w.beta.wmcloud.org" vhost

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

Mentioned in SAL (#wikimedia-releng) [2025-06-18T04:10:20Z] <Krinkle> Change shortener_domain in deployment-cache-text prefix from w-beta.wmflabs.org to w.beta.wmcloud.org, to apply VCL normalization for w.wiki in Beta, ref T289318, T396012

Mentioned in SAL (#wikimedia-releng) [2025-06-18T04:13:54Z] <Krinkle> Fix profile::trafficserver::backend::mapping_rules in deployment-cache-upload to include rb-mw-mangling-beta.lua as otherwise w.beta.wmcloud.org serves 404 Domain Not Configured, ref T289318, T396012

Mentioned in SAL (#wikimedia-releng) [2025-06-18T04:13:58Z] <Krinkle> Fix profile::trafficserver::backend::mapping_rules in deployment-cache-text to include rb-mw-mangling-beta.lua as otherwise w.beta.wmcloud.org serves 404 Domain Not Configured, ref T289318, T396012

Change #1153632 merged by Ladsgroup:

[operations/puppet@production] trafficserver: Add redirect rules for url shortener of beta cluster

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

This file makes sense as it matches the way prod works. But, it wasn't enabled in Hiera.

Fixed:

Change #1153643 merged by Ladsgroup:

[operations/puppet@production] beta: Add config for w.beta.wmcloud.org

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

Now that the above works, this beta-specific Apache vhost can be removed. Proposed in https://gerrit.wikimedia.org/r/1160441.

I personally prefer to keep both in case the first layer breaks or removed accidentally. But no strong preference.

Change #1160441 merged by Ssingh:

[operations/puppet@production] beta: Document beta-specific "w.beta.wmcloud.org" handling

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