Page MenuHomePhabricator

Get more clarity on intent, function, and use of Upgrade tests
Closed, ResolvedPublicSpike

Description

I feel unclear about the Upgrade test suite. There are a lot of variables here and I'm not sure which user story it represents.

My understanding so far is that it replicates moving from one version of WMDE Docker Images to another, and confirms whether the new distribution will still run without user intervention with an existing configuration. Is that true?

How many versions past do we intend to support / test upgrading from?

What about breaking changes (i.e to ENV VARS, or database migrations, etc)? Do these get implicitly documented in the upgrade code?

Event Timeline

I also wonder why the set of tests run during update differs from the normal test suits? Shouldn't we run all tests after upgrade?

Yes, I think this is maybe what happens, and what I'd expect as well. It's just a confusing and potentially over-complicated setup. For it to be useful I'd like to understand how it currently does what it does a bit better, and then likely refactor the setup to re-use the current test suite in a more transparent way? ... Something like that.

Restricted Application changed the subtype of this task from "Task" to "Spike". · View Herald TranscriptAug 9 2023, 12:35 PM

Since this ticket was created I've been working in this area with the "quiet tests" work and have come to this understanding of what currently happens at a high level:

  1. The Wikibase Suite Series are is booted up at VERSION which must be one of the versions in test/upgrade/old-versions/*.env
  2. The pre_upgrade test suite is ran against that set of services
  3. The old version is then taken down but its Docker volumes are retained so as to not delete the previous data (including the database, MediaWiki LocalSettings.php config, etc)
  4. The TO_VERSION environment is booted up and then php /var/www/html/maintenance/update.php is ran on that MediaWiki/Wikibase instance
  5. The post_upgrade test suite is ran against that

There is also better code organisation and commenting in the test/test_upgrade.sh file in a coming branch.

To complete this task I would propose walking the entire dev team through this overview, and that file, then discuss upgrading testing most generally and the efficacy of this test to those ends.

Upgrade from versions are currently hardcoded, this is probably not what we want to have https://github.com/wmde/wikibase-release-pipeline/blob/867491d486017ce3fd38ac191ef52c278d10087d/.github/workflows/build_and_test.yml#L563

With T345689 we gain channels and semver. How can we leverage that to automatically choose the versions to test upgrade from?

I think this ticket can be closed as complete and the upcoming Upgrade test system re-factor / re-write effort will take it from here: https://phabricator.wikimedia.org/T349630

The above analysis which was the output of this Spike can be used as reference in that effort so will add this as a related ticket to that one.