Page MenuHomePhabricator

Update beta to use the new tracking tools schema
Closed, ResolvedPublic

Description

Once the schema has been created in the code, and before enabling it to production, it should be tested on beta.

Checklist

$ sql wikishared --write
CREATE TABLE ce_tracking_tools (
  cett_id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
  cett_event BIGINT UNSIGNED NOT NULL,
  cett_tool_id INT NOT NULL,
  cett_tool_event_id VARBINARY(512) NOT NULL,
  cett_sync_status INT NOT NULL,
  cett_last_sync BINARY(14) DEFAULT NULL,
  UNIQUE INDEX cett_event_tool_teid (
    cett_event, cett_tool_id, cett_tool_event_id
  ),
  PRIMARY KEY(cett_id)
);
  • Configure beta to read/write the new schema
  • Wait until the old columns and the migration logic have been dropped in the code
  • Remove the migration variable from the beta config
  • Drop the old columns:
$ sql wikishared --write
ALTER TABLE campaign_events DROP COLUMN event_tracking_tool_id, DROP COLUMN event_tracking_tool_event_id;

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptMay 10 2023, 11:52 AM

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

[operations/mediawiki-config@master] [beta] Set $wgCampaignEventsUseNewTrackingToolsSchema to true

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

Mentioned in SAL (#wikimedia-releng) [2023-05-24T09:24:37Z] <Daimona> Creating new DB table on beta wikishared for the CampaignEvents extension # T336362

Change 922800 merged by jenkins-bot:

[operations/mediawiki-config@master] [beta] Set $wgCampaignEventsUseNewTrackingToolsSchema to true

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

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

[operations/mediawiki-config@master] beta: Stop setting unused $wgCampaignEventsUseNewTrackingToolsSchema

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

Change 925766 merged by jenkins-bot:

[operations/mediawiki-config@master] beta: Stop setting unused $wgCampaignEventsUseNewTrackingToolsSchema

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

Mentioned in SAL (#wikimedia-operations) [2023-06-01T13:02:23Z] <urbanecm@deploy1002> Started scap: Backport for [[gerrit:925766|beta: Stop setting unused $wgCampaignEventsUseNewTrackingToolsSchema (T336362)]], [[gerrit:923305|Set $wgCampaignEventsUseNewTrackingToolsSchema to true in prod (T336364)]]

Mentioned in SAL (#wikimedia-operations) [2023-06-01T13:04:04Z] <urbanecm@deploy1002> urbanecm and daimona: Backport for [[gerrit:925766|beta: Stop setting unused $wgCampaignEventsUseNewTrackingToolsSchema (T336362)]], [[gerrit:923305|Set $wgCampaignEventsUseNewTrackingToolsSchema to true in prod (T336364)]] synced to the testservers: mwdebug2002.codfw.wmnet, mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug1002.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-06-01T13:13:31Z] <urbanecm@deploy1002> Finished scap: Backport for [[gerrit:925766|beta: Stop setting unused $wgCampaignEventsUseNewTrackingToolsSchema (T336362)]], [[gerrit:923305|Set $wgCampaignEventsUseNewTrackingToolsSchema to true in prod (T336364)]] (duration: 11m 08s)

Mentioned in SAL (#wikimedia-releng) [2023-06-01T13:18:48Z] <Daimona> Dropping campaign_events.event_tracking_tool_id and campaign_events.event_tracking_tool_event_id on beta wikishared # T336362

Daimona added a subscriber: vaughnwalters.

@vaughnwalters: The changes made as part of this task should all be no-ops. As such, the only thing to test is that basic functionality (enabling/editing events, registering, etc.) still works as before. Note that this task is beta-only; the task for production wikis is T336364 and that doesn't need to be tested for now.

All basic functionality of app is still working as before (enabling/editing, registering, closing/opening/deleting events, my events) on betacluster, so I am marking this as done/resolved.