Page MenuHomePhabricator

Make all wiki-facing error pages consistent
Open, LowPublic

Description

This is a prerequisite to potentially improving and redesigning the various error pages we have. (T76560)

To limit the scope a little bit, this task only covers layers between MediaWiki core and the edge of our cluster. While most of this will affect non-wiki sites as well. This is meant to cut out error pages that only effect non-wiki sites (e.g. not integration.wikimedia.org, Gerrit, Phabricator, labs, etc.)

  • Find out all error scenarios between MediaWiki core and the edge of our cluster (Varnish front/back, Nginx/Apache, HHVM 404, PHP fatal, etc.).
  • Make them look consistent.
  • Have them be (as much possible) centrally maintained, e.g. produced by a puppet template.

Current status

TypeDescriptionSourceNew imageOld image
Unconfigured domain (Apache)Unknown domains pointing to wiki app servers. Example: http://unknown.beta.wmflabs.orgmediawiki-config:/errorpages/default.html
Varnish ErrorServer error on any domain caught by Varnish.puppet:/templates/varnish/errorpage.inc.vcl.erb
Unconfigured domain (Varnish)Unknown domains not pointing to apaches. This is the same as "Default Error", uses message "404 Domain not served". See also T112316. Example: https://misc-web-lb.wikimedia.org/puppet:/templates/varnish/errorpage.inc.vcl.erb
...
Domain indexThe root page of domains not meant to be user-facing. Example: https://upload.wikimedia.org(upload: stored in Swift)(removed, redirects to Wikimedia Commons) T130709
Domain indexExample: https://bits.wikimedia.orgmediawiki-config:/docroot/bits/index.html(removed)
Apache 404 (Default)404 on domains managed in mediawiki-config/docroot. Example: https://secure.wikimedia.org/not-exist https://bits.wikimedia.org/404.htmlmediawiki-config:/errorpages/404.html puppet:/templates/apache/apache2.conf
Apache 404 (wiki domain)404 on domains managed in mediawiki-config/docroot that directly serve MediaWiki (e.g. not related domains that are also served from mediawiki servers, such as www.wikipedia.org). See also T110376. Example: https://en.wikipedia.org/Examplemediawiki-config:/errorpages/404.php
HHVM 404404 on servers that use HHVM (only wiki domains afaik) that match a url pattern that Nginx defers to HHM. Example: https://en.m.wikipedia.org/foo.php(unknown)..
Swift 404Accessing original file on upload.wikimedia.org - see T37053 Example: https://upload.wikimedia.org/foo, https://upload.wikimedia.org/wikipedia/commons/1/22/ExampleSwift..
Thumbnail 404Accessing thumbnail on upload.wikimedia.org - see T169683 Example: https://upload.wikimedia.org/wikipedia/commons/thumb/1/22/Example.svg/200px-Example.svg.pngMediaWiki thumb.php Varnish and Thumbor..
PHP FatalFatal from PHP or HHVMmediawiki-config:/errorpages/hhvm-fatal-error.php
Apache 503 (wiki domain)503 on domains managed in mediawiki-config/docroot. Example: https://en.wikipedia.org/503.htmlmediawiki-config:/errorpages/503.html puppet:/templates/apache/apache2.conf

See also:

Details

ProjectBranchLines +/-Subject
operations/puppetproduction+8 -38
operations/puppetproduction+37 -67
operations/puppetproduction+12 -10
operations/mediawiki-configmaster+0 -63
operations/puppetproduction+77 -1
operations/mediawiki-configmaster+0 -33
operations/mediawiki-configmaster+16 -4
operations/mediawiki-configmaster+1 -1
operations/puppetproduction+16 -24
operations/puppetproduction+28 -36
operations/puppetproduction+18 -3
operations/puppetproduction+146 -67
operations/puppetproduction+146 -67
operations/puppetproduction+10 -7
operations/mediawiki-configmaster+105 -2 K
operations/mediawiki-configmaster+34 -104
operations/mediawiki-configmaster+35 -0
operations/mediawiki-configmaster+2 -1
Show related patches Customize query in gerrit

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 343819 merged by jenkins-bot:
[operations/mediawiki-config@master] errorpages: Restyle 404.php to be like other error pages

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

Change 345274 had a related patch set uploaded (by Krinkle):
[operations/mediawiki-config@master] errorpages: Restyle 503/php-fatal error to match Varnish error

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

Change 345274 merged by jenkins-bot:
[operations/mediawiki-config@master] errorpages: Restyle 503/php-fatal error to match Varnish error

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

  • They all look consistent now.
  • Except for Varnish, they are all in one place now (operations/mediawiki-config.git:/errorpages).

Next steps:

  • Move them from operations/mediawiki-config.git:/errorpages to operations/puppet.git (closer to where they are referenced, and makes it fully puppetized instead of files that "happen" to exist on all app servers from this unrelated git clone).
  • Have them generated by Puppet form a single parameterised ERB template (instead of very similar duplicates in 6 different locations).

IMHO the consistency was made in the wrong direction. All error pages should have followed the multilingual design.

Krinkle triaged this task as Low priority.
Krinkle raised the priority of this task from Low to Medium.

Change 350493 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[operations/puppet@production] varnish: Convert errorpage into re-usable template

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

Change 350494 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[operations/puppet@production] dynamicproxy: Make use of errorpage template

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

Change 350966 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[operations/puppet@production] varnish: Make errorpage.html balanced and use placeholder

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

Change 355338 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[operations/puppet@production] varnish: Switch browsersec to use errorpage template

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

Change 350493 abandoned by Krinkle:
varnish: Convert errorpage into re-usable template

Reason:
Superseded by Id77d23a442ab9ba39bd6 and I764d00c7b4

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

Change 350494 merged by Andrew Bogott:
[operations/puppet@production] dynamicproxy: Centralise error page template and use it

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

Change 357310 had a related patch set uploaded (by Andrew Bogott; owner: Krinkle):
[operations/puppet@production] dynamicproxy: Centralise error page template and use it

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

Change 357310 merged by Andrew Bogott:
[operations/puppet@production] dynamicproxy: Centralise error page template and use it

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

I made https://github.com/wiki-ai/ores/pull/202 for general ores 404 errors, it doesn't have 403 (as it's completely public) and 500-ish error are handled in API level and return json as response.

Change 358430 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[operations/puppet@production] [WIP] mediawiki: Fix error page template issues

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

Change 358430 merged by Andrew Bogott:
[operations/puppet@production] mediawiki: Fix error page template issues

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

Change 350966 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[operations/puppet@production] varnish: Avoid std.fileread() and use new errorpage template

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

Change 350966 merged by Ema:
[operations/puppet@production] varnish: Avoid std.fileread() and use new errorpage template

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

Change 355338 merged by Ema:
[operations/puppet@production] varnish: Switch browsersec to use errorpage template

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

Change 379953 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[operations/puppet@production] mediawiki/hhvm: Move fatal-error.php to Puppet

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

Krinkle lowered the priority of this task from Medium to Low.Nov 29 2017, 3:24 AM

Change 412829 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[operations/mediawiki-config@master] [WIP] errorpages: Remove unused hhvm-fatal-error.php

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

Change 346264 abandoned by Krinkle:
Make Wikipedia link on 404 page language-agnostic via Wikidata

Reason:
Linking to a list is imho a sub-part user experience. Right now the link is to enwiki in an English message which makes sense. Once locallised, the link will be localised as well. But it should still point to e.g. Dutch Wikipedia from Dutch non-Wikipedia 404.

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

Change 412829 abandoned by Krinkle:
[WIP] errorpages: Remove unused hhvm-fatal-error.php

Reason:
Unlikely to happen soon. In the meanwhile, I'll start start consolidating the files within mediawiki-config first and using service discovery directly there instead of via Puppet.

We can still try to puppetize this at a later time.

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

Change 379953 abandoned by Krinkle:
mediawiki/hhvm: Move fatal-error.php to Puppet

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

Change 467239 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[operations/mediawiki-config@master] errorpages: Use service discovery for statsd in hhvm-fatal-error.php

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

Change 467239 merged by jenkins-bot:
[operations/mediawiki-config@master] errorpages: Use service discovery for statsd in hhvm-fatal-error.php

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

Change 412829 restored by Krinkle:
[WIP] errorpages: Remove unused hhvm-fatal-error.php

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

Change 379953 restored by Krinkle:
mediawiki/hhvm: Move fatal-error.php to Puppet

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

Change 478575 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[operations/mediawiki-config@master] errorpages: Remove unused php-fatal-error.html file

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

Change 478575 merged by jenkins-bot:
[operations/mediawiki-config@master] errorpages: Remove unused php-fatal-error.html file

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

Change 379953 merged by Giuseppe Lavagetto:
[operations/puppet@production] mediawiki: Move hhvm-fatal-error.php to Puppet

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

Just a wild idea, lots of websites have a fun tone in their error pages (both for 404 and 500). I have seen youtube referring to chaos monkeys, the north face says your page is eaten by a goat, github refers to star wars. I personally think If we do this, it reduces tension caused by frustration of the best website in the world not working. Does anyone think we should do it? If yes, I make another ticket for that.

Just a wild idea, lots of websites have a fun tone in their error pages (both for 404 and 500). I have seen youtube referring to chaos monkeys, the north face says your page is eaten by a goat, github refers to star wars. I personally think If we do this, it reduces tension caused by frustration of the best website in the world not working. Does anyone think we should do it? If yes, I make another ticket for that.

Some examples: https://rigor.com/blog/15-awesome-fail-pages

Just a wild idea, lots of websites have a fun tone in their error pages (both for 404 and 500). I have seen youtube referring to chaos monkeys, the north face says your page is eaten by a goat, github refers to star wars. I personally think If we do this, it reduces tension caused by frustration of the best website in the world not working. Does anyone think we should do it? If yes, I make another ticket for that.

There is a similar note in the description at T76560: Better WMF error pages. I've seen it discussed elsewhere (but I can't immediately find), and IIRC the main concerns raised were essentially: "Prioritize making the error page useful (to both devs and to complete non-dev end-users), and then consider adding in something funny. Because some users hate it when their frustration-inducing-error is greeted with automatic/generic humor. And because humor is so very subjective." -- TLDR: Yes, worth considering, probably within T129433: Improve design for wiki-facing error pages or a subtask thereof, but not something to prioritize until everything else is good.

There is a similar note in the description at T76560: Better WMF error pages. I've seen it discussed elsewhere (but I can't immediately find), and IIRC the main concerns raised were essentially: "Prioritize making the error page useful (to both devs and to complete non-dev end-users), and then consider adding in something funny. Because some users hate it when their frustration-inducing-error is greeted with automatic/generic humor. And because humor is so very subjective." -- TLDR: Yes, worth considering, probably within T129433: Improve design for wiki-facing error pages or a subtask thereof, but not something to prioritize until everything else is good.

Thanks for the note. I left my comment there too. I hope it gets better and if it's not funny it's not a big deal. At least more useful is good enough for me.

Once T217846 is resolved, I can proceed here by testing/deploying https://gerrit.wikimedia.org/r/412829.

After that, the next step is to update the Puppet declaration of the hhvm/error-page file to be generated by the errorpage ERB template already in Puppet.

Change 511078 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[operations/puppet@production] mediawiki: Use mediawiki::errorpage instead of a hhvm-fatal-error.php.erb

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

@Krinkle T216496 shows a misleading error (not sure if that qualifies under this

per #wikimedia-tech the error on https://w.wiki/32m%22 is pretty poor for a 404 as there's nothing wrong with the servers - https://usercontent.irccloud-cdn.com/file/LcLmMQ14/CEF196D7-75E8-44CC-9489-7F83BB17545E.jpeg

Change 412829 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[operations/mediawiki-config@master] errorpages: Remove unused hhvm-fatal-error.php file

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

Change 412829 merged by jenkins-bot:
[operations/mediawiki-config@master] errorpages: Remove unused hhvm-fatal-error.php file

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

Change 530712 had a related patch set uploaded (by Alexandros Kosiaris; owner: Alexandros Kosiaris):
[operations/puppet@production] mediawiki:errorpage: Make content default undef

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

Change 530712 merged by Alexandros Kosiaris:
[operations/puppet@production] mediawiki:errorpage: Make content default undef

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

Change 539203 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[operations/puppet@production] mediawiki: Use mediawiki::errorpage instead of a php7-fatal-error.php.erb

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

Change 511078 abandoned by Ladsgroup:
mediawiki: Use mediawiki::errorpage instead of a hhvm-fatal-error.php.erb

Reason:
In favor of I6819d7b45

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