Topic on Talk:Phabricator/Help

Jump to navigation Jump to search

"Wildcards" for Herald?

14
MBinder (WMF) (talkcontribs)

Is it possible to set a criteria in Herald that says "look for X project, and all Milestones thereof"?

For instance, a team wants to have weekly Milestones on their backlog, and they use a separate board for their Kanban. In a process in which all Kanban tasks need to be reflected on the backlog (in case, say, someone added a brand new task to the Kanban, but skipped the backlog triage process) for one-source-of-truth, Herald can look for those stragglers. Example: https://phabricator.wikimedia.org/H269

With Milestones, I'm under the impression that Phabricator treats each as its own project, so Herald has to be updated for each Milestone.

Example: https://phabricator.wikimedia.org/H246

Updating Herald for weekly Milestones isn't hard, but it's a little tedious, and it adds weakness to the process (e.g. the changes have to be requested; or, each change to the Herald is a risk in and of itself should a mistake occur). It would be useful to be able to tell Herald to look for subprojects of a project, to automate this.

AKlapper (WMF) (talkcontribs)
MBinder (WMF) (talkcontribs)

Naturally, I have already commented on, subscribed to, and flagged that ticket! I suppose it's just tradition at this point to forget and ask on a talk page, too... :)

AKlapper (WMF) (talkcontribs)

 :D

MBinder (WMF) (talkcontribs)

Unexpected thread bump: It seems to me that Milestones are inclusive now, when it was once necessary to add them explicitly to Heralds. For instance, in https://phabricator.wikimedia.org/H260, I did not add the "Q4" Milestone until a week after it was created and used, but Herald caused no problems (I used to see tasks get bumped out of those quarterly boards by Herald). Wildcarding might not yet be a feature, but can anyone confirm that Milestones of projects are automatically captured by Herald in the query criteria?

MBinder (WMF) (talkcontribs)
AKlapper (WMF) (talkcontribs)

@MBinder (WMF) T244804 had its last Herald activity two months ago, hence cannot look at its Herald transcript (already garbage collected). Do you have a more recent example?

MBinder (WMF) (talkcontribs)

Sorry I could have been clearer. Let me try that now:

The Herald has existed since October 2017. The most recent Kanban board is for 2019-20 Q4, and was created by me on 2020-03-31. I did not add it to the Herald until 2020-04-07, so presumably Herald should have removed tasks (such as T244804) that were added to the new board between 2020-03-31 and 2020-04-07, because the new board is a Milestone of the board that gets added by Herald, and those are mutually exclusive. In the case of T249259, that occurred on 2020-04-06 (https://phabricator.wikimedia.org/T249259#6033118). In the case of T244804, nothing happened (https://phabricator.wikimedia.org/T244804#6017043). Am I missing something?

AKlapper (WMF) (talkcontribs)

@MBinder (WMF) Hmm, maybe I misunderstand, but as you edited H260 on 2020-04-07 to add "Project tags include none of: [...] Community-Tech (Kanban-2019-20-Q4)", Herald should not have magically removed tasks (such as T244804) that were added to the board before 2020-04-07 and which have not been touched since 2020-04-07. Herald rules are executed when an action is performed on tasks, but not automagically / retroactively when a Herald rule is changed.

MBinder (WMF) (talkcontribs)

Thanks for checking in on this.

The issue is not that something happened retroactively. The issue is that, for T244804, the Q4 Herald update did not yet exist when the task was moved/added to the new Q4 kanban board. This is fine, if Herald includes Milestones, but my understanding is that Milestones must be explicit, so this seems to be a bug.

In the case of the other ticket, T249259, this did happen (the ticket was removed from the board by Herald, which is why I later updated the Herald).

AKlapper (WMF) (talkcontribs)

@MBinder (WMF): On 2020-04-07, in https://phabricator.wikimedia.org/T249259#6033107 , "ARamirez_WMF edited projects, added Community-Tech (Kanban-2019-20-Q4); removed Community-Tech."

At that time H260 was "When all of these conditions are met: Project tags include any of Expiring-Watchlist-Items && Project tags include none of Community-Tech; Take these actions the first time this rule matches: Add projects: Community-Tech." As Community-Tech was removed in that edited by ARamirez_WMF, 2 minutes later in https://phabricator.wikimedia.org/T249259#6033118, Herald "added Community-Tech; removed Community-Tech (Kanban-2019-20-Q4)" again which is exactly what the Herald rule was about.

Only 89 minutes later, in https://phabricator.wikimedia.org/H260#1447, "Kanban-2019-20-Q4" was added to "Project tags include none of".

Hence I don't see a bug here (if I understand everything correctly).

MBinder (WMF) (talkcontribs)
AKlapper (WMF) (talkcontribs)

@MBinder (WMF) No worries. :) I think/hope that I got it now (finally, sorry).

On 2020-03-31, in https://phabricator.wikimedia.org/T244804#6017026 you moved/added "2019-20 Q4".

At that time the Herald rule was: "Project tags include any of [...] Expiring-Watchlist-Items && Project tags include none of Community-Tech, Community-Tech (Kanban-Q2-2019-20), Community-Tech (Kanban-Q3-2019-20)".

If you expected Herald at that time to add Community-Tech (because the Herald rule matches) and as a side effect remove "2019-20 Q4" (because that's a subproject of Community-Tech, hence a task cannot have both Community-Tech and "2019-20 Q4" as tags), then this did not happen because the Herald rule says "Take these actions the first time this rule matches" but not "Take these actions every time this rule matches": Herald was already triggered before in https://phabricator.wikimedia.org/T244804#5874805.

If I still don't get it then maybe a 1:1 is indeed a good idea. :D

MBinder (WMF) (talkcontribs)

Aha! I totally missed that, thank you for catching it. A simple answer, to a simple question, with many vectors to complicate the context. :-D

As I see it via your link to ifried's comment, the Herald removed the team Q3 Kanban because it wasn't yet excepted. Because the Herald only fires once, it did not do the same thing for the Q4 Kanban, while on other tasks it did simply because it would have been the first time the Herald touched the task.

This is an edge-case, because it only affects work that carries over from quarter to quarter, and only in circumstances in which the team forgot to update the Herald twice in a row for the same task. It can be really confusing, though, as evidenced by this thread!

Thanks again for helping me investigate and understand. It will be easier to explain this to newcomers to the team, etc. In the meantime, I've got more use-cases for promoting Milestones-captured-in-Herald-rules.