Page MenuHomePhabricator

Patch demo wiki is not actually updated/recreated after I make a change to its settings/config
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

Example steps to replicate the issue (for me)

What happens?
The console display outputs this line at the end (side-note, with a time that seems to be in the past?):

> 2025-12-01T18:55:05.381543268Z: init already ran at least once and last run was successful. Nothing to do

...and the patch demo wiki itself still seems to have the patch applied to it (as the wiki still has some behaviour that was added by that patch).

What should have happened instead?
The patch demo wiki should have been updated with the changes made before pressing the "Recreate demo" button.

Other information/Notes
I first noticed this when I had updated/rebased this Gerrit patch and wanted to refresh the version of it that was running on this Patch Demo wiki.
I'm tagging this as a Regression because I feel like this must have worked previously?

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
use `latest` images tag in main pod containersrepos/test-platform/catalyst/ci-charts!115jnucheT414659main
env deploy: associate chart SHA to environmentrepos/test-platform/catalyst/catalyst-api!158jnucheT414659main
Customize query in GitLab

Event Timeline

Tried this today with a copy of your wiki and it worked fine.

In the Catalyst API logs, I see that when you PATCH your wiki there's an error that's not being surfaced to you! The logs you're seeing (init already ran at least once and last run was successful. Nothing to do) are outdated.

Workaround for you while we figure out the details: Make a copy of your wiki, then you can update it to a new revision and/or remove patches. You should be able to edit that new, copied wiki as normal.

The root cause of this is: your demo was created with an older version of our helm chart and when we try to update your wiki, the configuration is no longer valid for the new version of our helm chart.

This means we should:

  • Probably version these things
  • Surface this type of error in the UI (which is something we can probably do in the near term)

Details:

We can see the revision history for this wiki:

REVISION    UPDATED                     STATUS        CHART              APP VERSION    DESCRIPTION     
1           Mon Nov 10 18:49:25 2025    superseded    mediawiki-0.1.1                   Install complete
2           Mon Nov 10 21:57:39 2025    superseded    mediawiki-0.1.1                   Upgrade complete
3           Tue Nov 11 07:21:27 2025    deployed      mediawiki-0.1.1                   Upgrade complete

What's missing from the helm history is an update from 2025-12-01, which is what your timestamp in this task shows. That revision is not there because your updates never make it that far.

Which we can see from your attempt to update on 2026-01-15 in the catalyst-api:

[GIN] 2026/01/15 - 08:50:06 | 422 |  245.244754ms |       <patchdemo-ip> | PATCH    "/api/environments/2750"
Error #01: jsonschema: '/db/provided' does not validate with http://www.mediawiki.org/catalyst.mw.schema.json#/properties/db/properties/provided/additionalProperties: additionalProperties 'dbName' not allowed

Which means Catalyst never talks to helm to update your wiki.

Workaround for you while we figure out the details: Make a copy of your wiki, then you can update it to a new revision and/or remove patches. You should be able to edit that new, copied wiki as normal.

Thanks :) I've created a copy. I left the old wiki as it is in case Catalyst folks (e.g.) want to do any more debugging/investigating with it, though feel free to delete it once you're finished with it!

thcipriani added a subscriber: jnuche.

Flagging for @jnuche when he's back: we should talk as a group about schema versioning and verification tweaks.

thcipriani set the point value for this task to 3.

The original issue is fixed, but when trying to rebuild 568a59f193 I ran into this:

Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires php >=8.2.0 but your php version (8.1.20) does not satisfy that requirement.
  Problem 2
    - Root composer.json requires lcobucci/jwt 5.6.0 -> satisfiable by lcobucci/jwt[5.6.0].
    - lcobucci/jwt 5.6.0 requires php ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0 -> your php version (8.1.20) does not satisfy that requirement.

The old chart that 568a59f193 is now pointing to uses older php images that aren't supported by MW anymore. In the future, this issue will affect the recreation of older envs every time MW updates its minimum version requirements.

We could a) parametrize the images used by the chart so a rebuilt env uses the most recent ones, but that will cause some older chart versions that aren't compatible with those images to fail.

We could also b) update an env to the latest chart version when we rebuild it and that should work for the master branches. That has the potential of eventually breaking the code for envs created for the support branches (REL1_39, etc). That being said I just successfully created a REL1_39 env with the latest chart and image versions, so maybe this is not actually a big risk (and if this solution breaks envs with support branches, so should also option a) anyway)

I'll investigate the possibility of implementing option b)

jnuche moved this task from In progress to Done on the Catalyst (Luka Ijo Pimeja Jan) board.

I found out that:

  • I can build old branches such as REL1_39 using the most recent images, which use PHP 8.3 (I did see REL1_42 fail but that seemed an unrelated issue with an extension)
  • The tree container images used by the main pod in the mediawiki chart they all get a latest tag
  • I could successfully recover env https://568a59f193.catalyst.wmcloud.org/wiki/Main_Page by creating a branched version of the chart the env was built with. Then I modified it to use the latest images and updated the env to use that modified chart

The fact older branches can still be built hopefully means that the PHP backwards compatibility in MW is systematic (please someone who knows MW correct me if that's wrong).

Considering all of the above, I have modified the chart to always use latest. This means that it should be possible (caveat: see above) to rebuild environments created after the fix when in the future MW drops support for older PHP versions. For older envs created before this change, the rebuild functionality can be recovered individually using the same manual fix I applied for 568a59f193, but I don't have a general solution for them at the moment.

It is possible at some point we will have to consider mapping branches to the PHP versions they support (master -> <most recent images>, support branches -> <images with specific PHP> ) to protect ourselves against a similar situation happening in the future.

To summarize:

  1. New envs will be able to be rebuilt, even as they age in production
  2. Old envs can be fixed individually if needed

The fact older branches can still be built hopefully means that the PHP backwards compatibility in MW is systematic (please someone who knows MW correct me if that's wrong).

FWIW, my understanding is that fixes for PHP support in MediaWiki are generally backported to all supported release branches (currently REL1_43/REL1_44/REL1_45). (Unless I'm misunderstanding you & you're referring to something else?)

The fact older branches can still be built hopefully means that the PHP backwards compatibility in MW is systematic (please someone who knows MW correct me if that's wrong).

FWIW, my understanding is that fixes for PHP support in MediaWiki are generally backported to all supported release branches (currently REL1_43/REL1_44/REL1_45). (Unless I'm misunderstanding you & you're referring to something else?)

Sounds like that answers it, yeah. Thanks!

Found this: https://www.mediawiki.org/wiki/Support_policy_for_PHP/Tables I think this is the kind of version matrix we should support in the future, i.e. the image/PHP version should depend on the selected MW version branch