Page MenuHomePhabricator

Stashbot should post multiple Phabricator links from a single IRC message in the order they were mentioned in the message
Closed, ResolvedPublicBUG REPORT

Description

This has been a minor annoyance to me for a long time. Today I had the following exchange with the bot that made a good example so I'm writing it up as a low priority bug.

[17:23]  <    bd808> I have been working on T339147 which then turned into working on T339307 and that may actually end with a partial solution for T195060
[17:23]  < stashbot> T339147: Release post-1.0.0 version - https://phabricator.wikimedia.org/T339147
[17:23]  < stashbot> T195060: Make rules and MessageValidator configurable - https://phabricator.wikimedia.org/T195060
[17:23]  < stashbot> T339307: Update commit-message-validator to work nicely with GitLab repos - https://phabricator.wikimedia.org/T339307

Ideally the bot would have followed the left-to-right ordering and emitted it's response as:

[17:23]  < stashbot> T339147: Release post-1.0.0 version - https://phabricator.wikimedia.org/T339147
[17:23]  < stashbot> T339307: Update commit-message-validator to work nicely with GitLab repos - https://phabricator.wikimedia.org/T339307
[17:23]  < stashbot> T195060: Make rules and MessageValidator configurable - https://phabricator.wikimedia.org/T195060

Event Timeline

bd808 triaged this task as Low priority.Jun 28 2023, 5:29 PM

I wonder if this is an unintended side effect of the use of set() in the python code to deduplicate the list of Phabricator objects? As far as I can tell the rest of the code in do_phabecho would inherently follow a left-to-right ordering. If that is the cause, I don't think the set() usage really does anything valuable for the algorithm. There is a deeper layer of notification deduplication within the processing loop that tracks "recent" links emitted so that we don't spam the channel with the same link over and over in a short period of time (5 minutes per config).

bd808 changed the task status from Open to In Progress.Sep 27 2023, 5:28 PM
bd808 claimed this task.
bd808 moved this task from Backlog to Accepted on the Stashbot board.

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

[labs/tools/stashbot@master] Remove extra deduplication from bot.do_phabecho

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

Change 961432 merged by jenkins-bot:

[labs/tools/stashbot@master] Remove extra deduplication from bot.do_phabecho

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

[01:08]  <    bd808> I have been working on T339147 which then turned into working on T339307 and that may actually end with a partial solution for T195060
[01:08]  < stashbot> T339147: Release post-1.0.0 version - https://phabricator.wikimedia.org/T339147
[01:08]  < stashbot> T339307: Update commit-message-validator to work nicely with GitLab repos - https://phabricator.wikimedia.org/T339307
[01:08]  < stashbot> T195060: Make rules and MessageValidator configurable - https://phabricator.wikimedia.org/T195060