Page MenuHomePhabricator

Deploy Notifications for 2025 Board of Trustees election
Closed, ResolvedPublic

Description

The Foundation teams supporting the 2025 Board of Trustees would like to explore the possibility of deploying the Notifications system to notify eligible voters from the community to vote during this year's Board election. The community vote is expected to happen between late August and mid-September 2025. The hope is to deploy a Notification message on the first day of voting.

Actual creation of a Notification model would depend on whether it is possible to solve T58362: Allow creating custom Echo notifications.

Basic information

  • Purpose of the notification - Tell voters that they are eligible to vote in the 2025 Wikimedia Foundation Board of Trustees election
  • Notification name - bot-election-2025-eligible
  • What triggers notification? - Users are eligible to vote in the 2025 Wikimedia Foundation Board of Trustees election according to the voting eligibility criteria.
  • "Notice" or "Alert"? - Notice
  • Notification type (standard, bundled, expandable bundle) - Standard

Wording

Links

  • primary link target: TBD - will link to a Meta page
  • primary link label: Vote now
  • #1 secondary link target: null
  • #1 secondary link label: null
  • #2 secondary link target: null
  • #2 secondary link label: null

Icon

Previous attempt: T309975: Deploy Notifications for 2022 Board of Trustees election

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
matmarex added a subscriber: ManavpreetKaur.

@ManavpreetKaur has requisitioned my help with this :) at Wikimedia-Hackathon-2025, since I've been working on notifications recently (T383979).

The new notification system is not quite ready to be used for this, but I've learned enough about Echo that this shouldn't be too hard to do the old way.

We can probably define a new notification type, then make a one-off maintenance script that will send these notifications to all eligible users. We can put the code in the WikimediaMessages extension, which is where all other one-off WMF things go. (I hope there's another maintenance script or something that will let us generate this list, otherwise this would be much more difficult.)

The removeInvalidNotification maintenance script from https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Echo/+/1130179 will also be helpful, since this will let us undeploy the new notification type once the board elections are done, and then remove the notifications – otherwise we would have to maintain the code to allow displaying them forever.

Change #1140726 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/WikimediaMessages@master] Add notifications for 2025 Board of Trustees election

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

This is how the notification will look, text and icon subject to change – I need someone to decide what to put there:

image.png (327×1 px, 39 KB)

This is how it would look in the email format, if you want that to be enabled as well, instead of the separate email notification that you'd otherwise send:

image.png (401×1 px, 40 KB)

Defining a notification type also comes with a mandatory entry in preferences, where users can unsubscribe, and which has a label and a tooltip – I also need suggestions on the wording to use there:

image.png (1×1 px, 179 KB)

@matmarex thanks for taking this one!

The notification (and its text and icon) looks good. At this point I don't think we would need the email notification to be enabled.

Can you explain more about the said label and tooltip for mandatory Preferences entry? What would usually be needed there?

Can you explain more about the said label and tooltip for mandatory Preferences entry? What would usually be needed there?

Each notification type has an entry in preferences, so that users can unsubscribe from it. You can look at your own preferences at https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-echo for some examples.

I had a closer look and it is actually possible to hide this entry (it's not mandatory, just highly encouraged), which means users can not unsubscribe from that notification (there is a 'no-dismiss' option). We currently only use that option for the welcome notifications, which every user receives exactly once. I guess that might be acceptable for a less-than-annual notification. I can do that, if you prefer?

Thanks for your explanation, @matmarex. Yes, that should work for our use case right now -- please feel free to go ahead.

Done.

Remaining to do:

I reached out to @jrbs to help take care of the final steps.

Thanks a lot, @matmarex!

@jrbs upon further discussion we'd like to have the email notification enabled -- is this something that you could change from your side?

@jrbs upon further discussion we'd like to have the email notification enabled -- is this something that you could change from your side?

Yeah, we can do that.

Sorry for my delay here.

Remaining to do:

This will be 2025-08-27 00:00 UTC through 2025-09-10 23:59 UTC.

I suppose this is up for debate but there are two options in my mind:

  • Approve and deploy the code change
  • Determine the list of users to notify

This would be the voter list, which I think is accessible once compiled (we use it for the emails after all).

  • Run the maintenance script to actually send the notifications to them

I can pprobably do this when it's ready to go since I have k8s training and access.

Thanks, I updated the patch at https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaMessages/+/1140726. I think it's ready to be merged and tested in production (or beta cluster).

I did some very imprecise back-of-the-envelope estimation and I assume that the number of eligible voters who will receive notifications will be in the ballpark of 100,000, which is (again, very roughly) about the number of notifications we normally send every day. I don't know how fast or slow the script is going to be in production, but if it's too fast, it might be a good idea to split this into several batches over a day or two. Just make sure you don't notify anyone twice (there is nothing in the script to prevent that). It will now send email notifications too, so I imagine it'll go at about the same speed as the previous email notification script; I don't know how fast that one is.

I assumed you're going to run the script on metawiki and rely on cross-wiki notifications, but if you have per-wiki lists of users to notify, running it separately for each wiki (with a separate user list for each) would work too.

Change #1140726 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] Add notifications for 2025 Board of Trustees election

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

matmarex updated Other Assignee, added: matmarex.

I assumed you're going to run the script on metawiki and rely on cross-wiki notifications, but if you have per-wiki lists of users to notify, running it separately for each wiki (with a separate user list for each) would work too.

This is probably the best way, yeah.

Does the script use usernames or user IDs? The voter list is the latter, but it's a pretty simple task to get the former.

It takes usernames (one per line), but it would be easy to change it to take IDs, or some other data format. I have no idea what the voter lists look like.

It takes usernames (one per line), but it would be easy to change it to take IDs, or some other data format. I have no idea what the voter lists look like.

I have both types so it's fine to use usernames. Silly question though, where would I actually insert that list of recipients? :)

It's passed as input (stdin) to the script. https://wikitech.wikimedia.org/wiki/Maintenance_scripts#Input_on_stdin

Kubernetes makes it a bit more complex than it would normally be… I think the command you need is something like this:

cat voter-list.txt | mwscript-k8s --attach -- WikimediaMessages:SendBoardElectionNotifications --wiki=metawiki

Just to quickly update here, I have added the voter list to my local deploy1003 space so can run this after voting opens next month.

Change #1194720 had a related patch set uploaded (by Foks; author: Foks):

[mediawiki/extensions/WikimediaMessages@master] Changing end date for Board election notification

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

Change #1194720 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] Changing end date for Board election notification

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

These are sending now. Thank you!

Change #1195197 had a related patch set uploaded (by Reedy; author: Foks):

[mediawiki/extensions/WikimediaMessages@wmf/1.45.0-wmf.22] Changing end date for Board election notification

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

We plan to run a "reminder" notification as well. I'll file a patch just replacing these messages but I'm not sure what the actual best path is for that.

We intend to send these on Monday, October 20 to eligible voters excluding those who have already voted.

Change #1196183 had a related patch set uploaded (by Foks; author: Foks):

[mediawiki/extensions/WikimediaMessages@master] Setup for reminder notification. This patch reuses the old messages, hopefully that's OK. If not we can make new ones?

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

We plan to run a "reminder" notification as well. I'll file a patch just replacing these messages but I'm not sure what the actual best path is for that.

Doing so will also change the text of the previous notification in the on-wiki notifications popup. This is probably fine, since it's just a small wording change.

Note also that any translations will be unchanged, unless you take steps to get them updated and then backport the updates. This is probably also fine, since again, it's just a small wording change.

For future elections we could come up with some nicer system, e.g. having two separate election notifications, or maybe one that can take a parameter to send different messages.

Change #1196183 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] Setup for reminder notification. This patch reuses the old messages, hopefully that's OK. If not we can make new ones?

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

Update: considering the level of voter engagement that we've seen so far, we've decided to not run a "reminder" notification today.

Change #1195197 abandoned by Umherirrender:

[mediawiki/extensions/WikimediaMessages@wmf/1.45.0-wmf.22] Changing end date for Board election notification

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