Skip to content

deploy-promote: Fix how prev_version is determined

Ahmon Dancy requested to merge review/dancy/deploy-promote-prev_version into master

prev_version is the variable that is used to generate the "Promote from <prev_version> to <new_version> (y/n)" message.

Previously prev_version was selected to be the oldest version found in wikiversions.json, but that is not necessarily the actual version that the group is using. This sometimes results in a misleading/confusing prompt.

Now prev_version is determined by expanding the group into a list of wikidbs, scanning wikiversions.json and collecting all versions that are used by wikidbs in that group.

Example new output:

In this example 1.40.0-wmf.14 and 1.40.0-wmf.17 are the old and new versions respectively:

debian@deploy:~$ scap deploy-promote testwikis 1.40.0-wmf.17 Promote testwikis from 1.40.0-wmf.14 to 1.40.0-wmf.17 (y/n): y

....

debian@deploy:~$ scap deploy-promote group0 Promote group0 from 1.40.0-wmf.14/1.40.0-wmf.17 to 1.40.0-wmf.17 (y/n):

Note that both the old and new version are mentioned as the previous state because group0 includes testwikis.

Merge request reports