Page MenuHomePhabricator

Automatically refresh jouncebot just before a deployment window starts
Closed, ResolvedPublic

Description

Sometimes, people add Gerrit patches to a deployment window just before it starts and forget to issue the “jouncebot: refresh” command in IRC afterwards, causing jouncebot to be unaware of those patches when it announces the beginning of the deployment window. It would be convenient if jouncebot would automatically refresh itself just before the beginning of each window, to avoid this.

Event Timeline

Change 680033 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[wikimedia/bots/jouncebot@master] Reparse deploy page before announcing an event

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

Change 680033 merged by jenkins-bot:

[wikimedia/bots/jouncebot@master] Reparse deploy page before announcing an event

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

Mentioned in SAL (#wikimedia-cloud) [2021-05-07T20:52:41Z] <wm-bot> <bd808> Restarted to pick up 560a22a (T243394)

bd808 claimed this task.
bd808 removed bd808 as the assignee of this task.
bd808 added a subscriber: bd808.

The patch from https://gerrit.wikimedia.org/r/680033 may or may not have been the cause of this off-by-one announcement:

[23:00]  <jouncebot> Amir1, Lucas_WMDE, awight, and Urbanecm: That opportune time is upon us again. Time for a European mid-day backport window deploy. Don't be afraid. (https://wikitech.wikimedia.org/wiki/Deployments#deploycal-item-20210511T1100).
[23:00]  <jouncebot> No GERRIT patches in the queue for this window AFAICS.

The deployment that should have been announced at this time was https://wikitech.wikimedia.org/wiki/Deployments#deploycal-item-20210510T2300. More code digging is needed, but I have a hunch that the reparse on timer trigger also advanced to the next window (unwanted).

Change 688503 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[wikimedia/bots/jouncebot@master] Reparse deploy page before announcing an event (v2)

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

The logic error in https://gerrit.wikimedia.org/r/680033 was using DeployPage.get_next_events() instead of DeployPage.get_current_events() once inside the deploy window.

Change 688503 merged by jenkins-bot:

[wikimedia/bots/jouncebot@master] Reparse deploy page before announcing an event (v2)

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

It reported the correct window at the correct time. Looks done to me.

[11:00]  <jouncebot> Amir1, Lucas_WMDE, awight, and Urbanecm: #bothumor Q:Why did functions stop calling each other? A:They had arguments. Rise for European mid-day backport window . (https://wikitech.wikimedia.org/wiki/Deployments#deploycal-item-20210511T1100).
[11:00]  <jouncebot> phuedx: A patch you scheduled for European mid-day backport window is about to be deployed. Please be around during the process. Note: If you break AND fix the wikis, you will be rewarded with a sticker.