Page MenuHomePhabricator

CentralNotice: Adapt impression event schema for campaign fallback
Closed, ResolvedPublic1 Story Points

Description

We need to add the new campaignStatuses property, which records what happened with campaigns that were fallen back from.

Details

Related Gerrit Patches:
mediawiki/extensions/CentralNotice : wmf/1.35.0-wmf.4Fix error in CentralNoticeImpression schema
mediawiki/extensions/CentralNotice : wmf_deployFix error in CentralNoticeImpression schema
mediawiki/extensions/CentralNotice : masterFix error in CentralNoticeImpression schema
mediawiki/extensions/CentralNotice : wmf/1.35.0-wmf.4Update CentralNoticeImpression scheme for campaign fallback
mediawiki/extensions/CentralNotice : wmf/1.35.0-wmf.3Update CentralNoticeImpression scheme for campaign fallback
mediawiki/extensions/CentralNotice : wmf_deployUpdate CentralNoticeImpression scheme for campaign fallback
mediawiki/extensions/CentralNotice : masterUpdate CentralNoticeImpression scheme for campaign fallback

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSun, Oct 27, 6:07 PM
awight triaged this task as High priority.Thu, Oct 31, 2:32 PM
awight added a subscriber: awight.

Looks like this became urgent, last week's CentralNotice deployment relies on the new field so we're currently dropping all impressions due to EventLogging validation.

Change 547561 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@master] Update CentralNoticeImpression scheme for campaign fallback

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

Here's a patch!!! Apologies for the trouble...!

Change 547561 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Update CentralNoticeImpression scheme for campaign fallback

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

Change 547593 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@wmf_deploy] Update CentralNoticeImpression scheme for campaign fallback

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

Change 547593 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@wmf_deploy] Update CentralNoticeImpression scheme for campaign fallback

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

Change 547600 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@wmf/1.35.0-wmf.3] Update CentralNoticeImpression scheme for campaign fallback

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

Change 547602 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@wmf/1.35.0-wmf.4] Update CentralNoticeImpression scheme for campaign fallback

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

Change 547600 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@wmf/1.35.0-wmf.3] Update CentralNoticeImpression scheme for campaign fallback

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

Change 547602 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@wmf/1.35.0-wmf.4] Update CentralNoticeImpression scheme for campaign fallback

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

Mentioned in SAL (#wikimedia-operations) [2019-10-31T18:20:01Z] <urbanecm@deploy1001> Synchronized php-1.35.0-wmf.3/extensions/CentralNotice: SWAT: 963e963: Update CentralNoticeImpression scheme for campaign fallback (T236627) (duration: 01m 01s)

Mentioned in SAL (#wikimedia-operations) [2019-10-31T18:21:25Z] <urbanecm@deploy1001> Synchronized php-1.35.0-wmf.4/extensions/CentralNotice: SWAT: 3e5b33f: Update CentralNoticeImpression scheme for campaign fallback (T236627) (duration: 00m 55s)

Change 547665 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@master] Fix error in CentralNoticeImpression schema

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

You probably already noticed, but I found this in the logs, we're double-JSON-encoding the campaignStatuses value:

'[{"statusCode":"2.2","campaign":"WMIL_SeniorcitizenscourseSep2019","bannersCount":1}]' is not of type 'array'

'[{"statusCode":"2.2","campaign":"WMIL_SeniorcitizenscourseSep2019","bannersCount":1}]' is not of type 'array'

Okay, this was already a known thing according to the code, so I guess the answer is either to make the metawiki schema accept a "string", or have the client send a native data array. Considering how fun CentralNotice deployments can be, I'd lean towards reverting the schema back to "string", and at the same time introducing a new attribute like campaignStatusesData which will accept the array data type. That would be a safer migration, and will make it easier to analyze old campaign data alongside new data.

(Or would we want to migrate old rows in Hadoop?)

Change 547665 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Fix error in CentralNoticeImpression schema

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

Change 547677 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@wmf_deploy] Fix error in CentralNoticeImpression schema

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

Change 547679 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@wmf/1.35.0-wmf.4] Fix error in CentralNoticeImpression schema

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

Change 547677 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@wmf_deploy] Fix error in CentralNoticeImpression schema

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

Change 547679 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@wmf/1.35.0-wmf.4] Fix error in CentralNoticeImpression schema

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

Mentioned in SAL (#wikimedia-operations) [2019-10-31T23:26:41Z] <urbanecm@deploy1001> Synchronized php-1.35.0-wmf.4/extensions/CentralNotice/extension.json: SWAT: dcd3ec3: Fix error in CentralNoticeImpression schema (T236627) (duration: 00m 51s)

AndyRussG closed this task as Resolved.Tue, Nov 12, 9:11 PM
AndyRussG claimed this task.