Page MenuHomePhabricator

Clean up code for country migration
Closed, ResolvedPublic

Description

Once the old country schema is dropped (T408931), we can clean up the code: drop the migration flag and associated code, + misc clean-ups (e.g. make things not nullable in the code; drop temporary methods; make sure in-person/hybrid events have an Address object; perhaps add a getAddressOrThrow() for type safety that returns Address or throws; etc.)

Acceptance criteria

  • Old compatibility code is dropped
  • No change in functionality

Event Timeline

The wmf.1 branch has been cut and the schema change will be applied in production later this week. For added safetey, the patch can also be -2 until then. But it can be worked on.

Change #1201791 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Drop $wgCampaignEventsCountrySchemaMigrationStage

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

Change #1201797 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Drop plaintext country from EventFactory and related code

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

Change #1201801 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Drop plaintext country from Address and related code

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

Change #1201807 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Make the country code required in Address objects

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

Change #1201812 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Make Address required for in-person and hybrid events

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

Change #1201814 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[operations/mediawiki-config@master] Drop $wgCampaignEventsCountrySchemaMigrationStage

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

Change #1201791 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Drop $wgCampaignEventsCountrySchemaMigrationStage

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

Change #1201797 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Drop plaintext country from EventFactory and related code

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

Change #1201801 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Drop plaintext country from Address and related code

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

Change #1201807 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Make the country code required in Address objects

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

Change #1201812 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Make Address required for in-person and hybrid events

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

Change #1201814 merged by jenkins-bot:

[operations/mediawiki-config@master] Drop $wgCampaignEventsCountrySchemaMigrationStage

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

Mentioned in SAL (#wikimedia-operations) [2025-11-25T14:19:06Z] <tchanders@deploy2002> Started scap sync-world: Backport for [[gerrit:1211008|FlowMoveBoardsToSubpages: Skip moves that throw exceptions (T402552)]], [[gerrit:1201814|Drop $wgCampaignEventsCountrySchemaMigrationStage (T408932)]]

Mentioned in SAL (#wikimedia-operations) [2025-11-25T14:23:32Z] <tchanders@deploy2002> daimona, esanders, tchanders: Backport for [[gerrit:1211008|FlowMoveBoardsToSubpages: Skip moves that throw exceptions (T402552)]], [[gerrit:1201814|Drop $wgCampaignEventsCountrySchemaMigrationStage (T408932)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-11-25T14:28:00Z] <tchanders@deploy2002> Finished scap sync-world: Backport for [[gerrit:1211008|FlowMoveBoardsToSubpages: Skip moves that throw exceptions (T402552)]], [[gerrit:1201814|Drop $wgCampaignEventsCountrySchemaMigrationStage (T408932)]] (duration: 08m 54s)

@Daimona is there anything here to further test besides just making sure that functionality around address fields is working as expected?

@Daimona is there anything here to further test besides just making sure that functionality around address fields is working as expected?

Nope, just that.

Functionality surrounding address field working as expected, sending to product sign off