Page MenuHomePhabricator

Removing tracking tool fails if the sync was disabled through other means
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Create an event linked to a course on the P&E Dashboard
  • Delete the event (which will also unsync the course)
  • Restore the event manually with the following DB query: UPDATE campaign_events SET event_deleted_at=NULL where event_id=YOUR_EVENT_ID
  • Go to Special:EditEventRegistration for this event
  • Remove the tracking tool
  • Submit

What happens?:
Form submission fails with the following error:

The course $COURSE_NAME is not connected to this event, and therefore it cannot be synchronized.

What should have happened instead?:
The "unsynced course" error should be ignored, and the course should be removed.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia): master

Other information (browser name/version, screenshots, etc.):
While the reproduction steps described here require you to alter the data at the DB level, the course might potentially get unsynced through other means (e.g., some kind of failure on the dashboard side). In general, when a course is removed, it makes sense to ignore this error if the course is not currently linked with the event.

See T362365 for an instance of this problem in production (following manual DB intervention).

Similar to T358732, but for a slightly different scenario (course unsynced instead of deleted).

Event Timeline

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

[mediawiki/extensions/CampaignEvents@master] WikiEduDashboard: allow removal when course is not synced

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

Change #1023464 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] WikiEduDashboard: allow removal when course is not synced

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

Once the fix is merged, you should be able to remove the tool, and add it again if you wish.

If we add the tool again, will previous data (registrations…) be kept/restored? I need a confirmation, to be sure, because some registrations already happened. 🙂

Once the fix is merged, you should be able to remove the tool, and add it again if you wish.

If we add the tool again, will previous data (registrations…) be kept/restored? I need a confirmation, to be sure, because some registrations already happened. 🙂

When you add it again, it should send the full participants list to the Dashboard; that's also what we do whenever someone registers (we send the whole list, not just the delta). So, at least for participants, the answer should be yes.

Thank you!

Is there any chance this patch to be backported, given the event should happen in less than 48h?
I don’t know how far the organizers rely on this tool for their event, though. @Geertivp?

Thank you!

Is there any chance this patch to be backported, given the event should happen in less than 48h?
I don’t know how far the organizers rely on this tool for their event, though. @Geertivp?

Yes, I can schedule this for tomorrow if it's needed urgently. I'll also have to see whether wmf.2 is enough, or if we also need wmf.1 (depending on the train status).

As a user, I have implemented a temporary workaround to permit the participants to register straight via the Outreachdashboard...
but please continue to implement the different bug fixes...

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

[mediawiki/extensions/CampaignEvents@wmf/1.43.0-wmf.2] WikiEduDashboard: allow removal when course is not synced

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

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

[mediawiki/extensions/CampaignEvents@wmf/1.43.0-wmf.1] WikiEduDashboard: allow removal when course is not synced

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

I've scheduled the backports for the upcoming afternoon window (in 40 minutes). I'm doing both wmf.1 and wmf.2 to 1) avoid further problems due to train blockers/rollbacks 2) get this live immediately rather than tonight.

Change #1023796 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@wmf/1.43.0-wmf.2] WikiEduDashboard: allow removal when course is not synced

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

Change #1023797 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@wmf/1.43.0-wmf.1] WikiEduDashboard: allow removal when course is not synced

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

Mentioned in SAL (#wikimedia-operations) [2024-04-24T13:04:38Z] <urbanecm@deploy1002> Started scap: Backport for [[gerrit:1023101|Growth: Enable Levelling up features on all wikis (T348086)]], [[gerrit:1023796|WikiEduDashboard: allow removal when course is not synced (T363187)]], [[gerrit:1023797|WikiEduDashboard: allow removal when course is not synced (T363187)]]

Mentioned in SAL (#wikimedia-operations) [2024-04-24T13:07:32Z] <urbanecm@deploy1002> daimona and urbanecm: Backport for [[gerrit:1023101|Growth: Enable Levelling up features on all wikis (T348086)]], [[gerrit:1023796|WikiEduDashboard: allow removal when course is not synced (T363187)]], [[gerrit:1023797|WikiEduDashboard: allow removal when course is not synced (T363187)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-04-24T13:24:59Z] <urbanecm@deploy1002> Finished scap: Backport for [[gerrit:1023101|Growth: Enable Levelling up features on all wikis (T348086)]], [[gerrit:1023796|WikiEduDashboard: allow removal when course is not synced (T363187)]], [[gerrit:1023797|WikiEduDashboard: allow removal when course is not synced (T363187)]] (duration: 20m 21s)

@Geertivp This is now live. Can you please confirm that everything is working normally?

I have been able to remove the event banner from the page. This solves the problem of users not being able to register due to the sync problem. Thanks for fixing this.
Now there is something else: to my opinion it should always be possible to add the event banner again, the same way as when the event page was initially created. I can see no reason why this would not be allowed.

Now there is something else: to my opinion it should always be possible to add the event banner again, the same way as when the event page was initially created. I can see no reason why this would not be allowed.

This issue is tracked in T318412: [EPIC] Restore disabled registration.

I have been able to remove the event banner from the page. This solves the problem of users not being able to register due to the sync problem. Thanks for fixing this.
Now there is something else: to my opinion it should always be possible to add the event banner again, the same way as when the event page was initially created. I can see no reason why this would not be allowed.

I have tested this as well following the testing instructions above on local env and do not see the error The course $COURSE_NAME is not connected to this event, and therefore it cannot be synchronized.. I am marking this as done / resolved.