Page MenuHomePhabricator

Configure the aggregation job to run periodically on Wikimedia wikis
Closed, ResolvedPublic1 Estimated Story Points

Description

Acceptance criteria
  • As an organiser I want to be able to see aggregated data within 3 hours of the end of my event.
  • The following commands should be scheduled to run every three hours:
# Prod
mwscript extensions/CampaignEvents/maintenance/AggregateParticipantAnswers.php --wiki metawiki
mwscript extensions/CampaignEvents/maintenance/AggregateParticipantAnswers.php --wiki testwiki
mwscript extensions/CampaignEvents/maintenance/AggregateParticipantAnswers.php --wiki test2wiki
mwscript extensions/CampaignEvents/maintenance/AggregateParticipantAnswers.php --wiki officewiki
# Beta
mwscript extensions/CampaignEvents/maintenance/AggregateParticipantAnswers.php --wiki metawiki
  • This is similar to what's already in place (done in T320403), but for a different script. Also, this new script only supports being run via run.php, and I'm not sure if the mwscript syntax above is functional.
Design

N/A

External dependencies
  • SRE - configure cron job.
Other dependencies

Event Timeline

MHorsey-WMF set the point value for this task to 1.

Hi serviceops! I've added this tag based on T320403. Please let us know if you need further information!

Clement_Goubert changed the task status from Open to In Progress.Sep 1 2023, 9:36 AM
Clement_Goubert claimed this task.
Clement_Goubert triaged this task as Medium priority.
Clement_Goubert moved this task from Incoming 🐫 to Doing 😎 on the serviceops board.

Change 954225 had a related patch set uploaded (by Clément Goubert; author: Clément Goubert):

[operations/puppet@production] P:mediawiki::maintenance: CampaignEvents periodic

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

Change 954249 had a related patch set uploaded (by Clément Goubert; author: Clément Goubert):

[operations/puppet@production] P:mediawiki::periodic_job: Add splay parameter

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

Hi @Clement_Goubert! Is there anything you need from us to help move this forward?

Hi @Daimona I'm looking for a review from fellow ServiceOps members and will merge as soon as I get it. Can I run the script manually beforehand to see if there's no error?

Hi @Daimona I'm looking for a review from fellow ServiceOps members and will merge as soon as I get it.

Cool, thanks! Please do let us know if you need anything else!

Can I run the script manually beforehand to see if there's no error?

Sure, that would be great! The feature related to the script is not enabled in production, nor beta, so the script should be a noop everywhere.

Change 954249 merged by Clément Goubert:

[operations/puppet@production] P:mediawiki::periodic_job: Add splay parameter

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

Can I run the script manually beforehand to see if there's no error?

Sure, that would be great! The feature related to the script is not enabled in production, nor beta, so the script should be a noop everywhere.

The output for test2wiki is:

cgoubert@mwmaint2002:~$ sudo -u www-data /usr/local/bin/mw-cli-wrapper /usr/local/bin/mwscript extensions/CampaignEvents/maintenance/AggregateParticipantAnswers.php --wiki test2wiki
Aggregating old participant answers...
Table is empty.

If that looks good to you, I'll merge the periodic job right away.

Can I run the script manually beforehand to see if there's no error?

Sure, that would be great! The feature related to the script is not enabled in production, nor beta, so the script should be a noop everywhere.

The output for test2wiki is:

cgoubert@mwmaint2002:~$ sudo -u www-data /usr/local/bin/mw-cli-wrapper /usr/local/bin/mwscript extensions/CampaignEvents/maintenance/AggregateParticipantAnswers.php --wiki test2wiki
Aggregating old participant answers...
Table is empty.

If that looks good to you, I'll merge the periodic job right away.

Looks perfect, thank you :)

Change 954225 merged by Clément Goubert:

[operations/puppet@production] P:mediawiki::maintenance: CampaignEvents periodic

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

Daimona changed the task status from In Progress to Stalled.Sep 28 2023, 2:52 PM

@Clement_Goubert Thanks!

I'll mark this as blocked because it cannot be tested until we actually enable the feature (e.g., T339246 for beta).

It's merged, I'm waiting for an unrelated fix to go through and then it'll be applied.

Daimona changed the task status from Stalled to Open.Oct 5 2023, 9:09 PM

Now testable in beta.

vaughnwalters subscribed.

I created and closed an event on betacluster and then it did aggregate within a few hours.

Moving this to product sign off

I created and closed an event on betacluster and then it did aggregate within a few hours.

Moving this to product sign off

Actually, moving this back to QA until participant questions is deployed in prod

ifried changed the task status from Open to Stalled.Oct 19 2023, 2:28 PM

Created this event on meta and it aggregated correctly.

Moving this to product sign off.

Removing serviceops from project tags, feel free to add us back if it doesn't pass product sign-off.

Daimona changed the task status from Stalled to Open.Feb 6 2024, 12:44 AM