Page MenuHomePhabricator

Herald rules linked to projects don't work as expected
Closed, InvalidPublic

Description

I'm not sure if this is a bug or a lack of documentation confusing me about what is supposed to happen.

What I've done

  1. Make new Herald rule for "Commits"
  2. Select global scope (I've also tried Object scope with the same result)
  3. Select "When any of these conditions are met: Projects include any of ProjectA"
  4. Verify that ProjectA is linked to Package/Owner A

What I expect

  1. Rule should be triggered when a commit is made to package/owner A

That doesn't happen. The rule is not triggered.

Unfortunately the documentation is completely silent on what any of the rules do: https://secure.phabricator.com/book/phabricator/article/herald/ however I was hoping that Herald would follow the relationship between commit to owner/package to project A. Either this is a bug or it needs better documentation to explain what it in fact represents.

Compounding this is (I think) some confusion between packages and owners. The terminology is used interchangeably in quite a few places because from what I remember we used to only have the term "packages".

For my particular use-case Owner and Project are effectively the same thing, so I need to keep them in sync.

Event Timeline

epriestley added a subscriber: epriestley.

Code being owned by a package does not tag it with a project.

Use "[Affected package owners] [include any of] [Project A]" instead of "[Projects] [include any of] [Project A}"

OK, thanks. Because there is no documentation about what any of these choices mean would you like to make this task a documentation fixing issue?

I don't think the behavior of the fields is unclear and we haven't seen other users run into this particular difficulty.

There are currently about 125 fields, many of which appear in multiple different contexts. Additional fields can be supplied by extensions, and the behavior of fields may change as a result of extensions or configuration.

Writing a static document describing the behavior of 150-200 different <field, context> pairs -- which would necessarily sometimes be wrong, incomplete, or misleading -- is not a good use of our time, particularly because much of this documentation would be completely self-evident, for fields like "Title" on task objects.

If we did pursue this change, I would offer a way for fields to provide contextual inline help instead, but I can't recall seeing enough confusion about the behavior of fields to motivate this.

It confused at least one person, but I am relatively new to this product.

You are right that many fields are clear, but let me summarise the ones that need more explanation. At least as far as "commit" type Herald rules are concerned. And for me at least.

Repository projects -> I cannot find any link between repository and projects (other than through owner/package)

Projects -> it obviously doesn't mean what I thought it meant and I still don't have any idea how it might be used

Subscribers -> Are these watchers or members of the project? I don't recognise the word "subscribers" in Phabricator.

You've already solved my original problem (thank you), so do with these what you like.

Subscribers -> Are these watchers or members of the project? I don't recognise the word "subscribers" in Phabricator.

Projects don't have subscribers, they have members and watchers. Is there somewhere you ran across this in Phabricator that we should fix?

@aristedes It means projects and subscribers of the commit. For example, you can add those projects here:

https://secure.phabricator.com/diffusion/P/commit/74a36f9d7bf0503b729dcc003222267aa0f044f2/edit/

You're building a Herald rule against commits, not repositories or projects or owners. So all of the Herald fields are the fields of the commit.

@hach-que Perhaps the terminology isn't really consistent then. When I add a project to an edit, it appears under a heading called "tags". Perhaps the Herald rule should say "tagged with"

@chad I'm seeing "subscribers" in the Herald rule dropdown. Which makes sense because commits have subscribers. However it is under a heading called "Supporting Applications" which I guessed had something to do with Projects.

Anyhow, I don't want to belabour the point. I know @epriestley feels this is already clear enough; I just wanted to point out the things that don't make any sense to me as a relative newcomer.