Page MenuHomePhabricator

Confirm/remedy issues with duplicate Owners paths
Closed, ResolvedPublic

Description

An install is reporting that when two packages own path /some/path/, only one actually gets associated with /some/path/ in, e.g., Diffusion.

The expected behavior is that both are associated, and this is also the documented behavior.

Likely repro steps:

  • Create package A, owning /some/path/.
  • Create package B, also owning /some/path/.
  • Possibly, fiddle with dominion settings for "A" and "B". If one has weak dominion, it probably should cede control to the other? Unless the other also has weak dominion? This is fuzzier territory and may not be entirely well-defined.
  • Look at /some/path/ in Diffusion and see which packages own it.

Event Timeline

@lvital, I can only reproduce this if use "Weak Dominion". Is that the case in your example, too?

With both in "Strong Dominion", I get dual-ownership:

Screen Shot 2017-06-01 at 8.25.03 AM.png (771×1 px, 176 KB)

With A=Strong, B=Weak I get both.
With A=Weak, B=Strong I get only "B".
With A=Weak, B=Weak I get only "B".

I think these results are wrong:

  • "A=Strong, B=Weak" and "A=Weak, B=Strong" should definitely produce the same result: outcome should not be order/ID dependent.
  • I think that result should probably be "the strong package only" in both cases.
  • "A=Weak, B=Weak" should definitely not give one of them ownership: again, outcome should not be order/ID dependent.
  • I think the result should probably be "both packages" in this case. There's some kind of vague argument for "neither package" but I think that argument does not align well with how any real user is likely to think about this relationship.

If that all squares with what you're seeing, I plan to make these changes:

  • When one or more packages have weak dominion and one or more packages have strong dominion on a particular path, all of the packages with strong dominion (and only those packages) own that path.
  • When one or more packages have weak dominion and zero packages have strong dominion on a particular path, all of the packages own that path.

@epriestley yes, the tested owner packages were both weak dominion. Sorry for not mentioning that earlier. You've explained the issue perfectly as far as I can tell. The changes you have planned make a lot more sense than the current behavior and should fix the issues we were seeing. Thank you!

It's possible that didn't get everything, but yell if you hit anything else and we can shovel on some more test cases. Thanks for the report!