[go: up one dir, main page]

Page MenuHomePhabricator

Support cookie-driven fractional migration to PHP 8.1 deployments of mw-web and mw-api-ext
Open, MediumPublic

Description

Once the "next" deployments of these services take shape (T377040) we'll need to add support for progressively routing external traffic to them.

There are two parts to this:

  1. We will need to develop an ATS Lua plugin script for remapping the "main" deployment target (e.g., mw-web, mw-web-ro) to the respective "next" target (e.g., mw-web-next, mw-web-next-ro) depending on the presence / value of the cookie.
  2. We will need to revive support for consistent fractional cookie enrollment via the WikimediaEvents extension (see e.g. [0] previously used in the migration to 7.4).

One important aspect to #1 is also supporting a "load fraction" that routing to "next" is predicated upon in addition to the cookie. This allows us to incrementally shift traffic back to "main" once it's fully updated to 8.1 during the final phase of the migration, in a way that's independent of migration cookie state (aside: we could also use this in a similar way in the very unlikely event of an emergency where we need to shunt back to 7.4 in a semi-controlled way).

[0] https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/WikimediaEvents/+/refs/heads/master/modules/ext.wikimediaEvents/phpEngine.js

Related Objects

Event Timeline

Change #1072821 had a related patch set uploaded (by Scott French; author: Scott French):

[operations/puppet@production] trafficserver: Lua script for routing 8.1-enrolled traffic

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

It appears that the phpEngine instrument is still fully wired into the WikimediaEvents extension - i.e., it seems no work will be necessary on that end of things.

In order to make use of it, we'll need to add the relevant wiring to mediawiki-config to set WMENewPHPVersion and WMENewPHPSamplingRate.

Change #1080388 had a related patch set uploaded (by Scott French; author: Scott French):

[operations/mediawiki-config@master] Add variables for incremental enrollment in PHP 8.1

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

Change #1082581 had a related patch set uploaded (by Scott French; author: Scott French):

[operations/puppet@production] trafficserver: add mw-php-migration to mapping_rules

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

The support for fractional enrollment via WikimediaEvents has now been validated by @Krinkle in T377987. Meaning, we should be good to go once the pending patches tagged on this task are merged.

Change #1072821 merged by Scott French:

[operations/puppet@production] trafficserver: Lua script for routing 8.1-enrolled traffic

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