Page MenuHomePhabricator

Year end update for donor segments & statuses
Open, Needs TriagePublic

Description

I'm adding this task to track that come 1 July 2024 we need to update the values in the donor segment & status fields. Depending how things roll with https://phabricator.wikimedia.org/T344215 this task coudl become obsolete but we definitely need to check in on it around March 2024

Event Timeline

Let's discuss the plan we need to put in place to roll these over given the lack of a maintenance window next Q

@KHaggard this is something I'm working on now - but just flagging to you that without a planned outage to update all of the segmentation fields to the new fiscal year on 1 July I'm expecting we will run the script over a number of days - which will mean the segments are not 'stable' over that period. Also, it will make for some slow updates as we will be uploading millions of contacts a day

Also note that updating the segments will mean there are suddenly almost no donors in the 'this fiscal year' (because the year will have only just started)

Got it, thanks @Eileenmcnaughton Do you have a recommended timeline for an outage? End of June maybe? Let me know and I can at least add in a note for the rest of the team on when to expect segment instability and slowness. Thanks

@KHaggard I'll updated you once I've done some testing on staging

Change #1029318 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Remove transitional code

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

Change #1029318 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Remove transitional code

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

After some digging on this I think that now that Joseph doesn't want the existing data stashed we should

  1. on July 1 reload the triggers - regenerating them should get the updated date ranges
  2. run the update script straignt away on any donors altered since the start of July 1 (below)
  3. schedule the update script to re-evaluate all other donors

We might not want to do 3 toooo quickly as it will cause slow updates to Acoustic but should aim to do it over a couple of weeks - that will mean it should all be updated comfortably by the end of July as flagged above by @KHaggard

wmf-cv api4 WMFDonor.update +v donor_segment_id= +v donor_status_id= +w 'wmf_donor.all_funds_last_donation_date > "2018-06-30"' +w 'wmf_donor.donor_status_id = 70' +l 50000 +w 'modified_date < '2024-07-01'

GIven that I think we have to wait til July 1 for next steps on this