Page MenuHomePhabricator

Make Owners behavior when multiple packages own the same path with different dominion rules more consistent
ClosedPublic

Authored by epriestley on Jun 1 2017, 9:04 PM.
Tags
None
Referenced Files
F19003146: D18064.id43448.diff
Fri, Nov 21, 8:02 AM
F18952681: D18064.id43449.diff
Wed, Nov 12, 6:23 AM
F18871527: D18064.id.diff
Tue, Nov 4, 11:13 PM
F18774026: D18064.diff
Oct 9 2025, 2:28 PM
F18764486: D18064.id43449.diff
Oct 7 2025, 6:19 AM
F18699603: D18064.id43448.diff
Sep 27 2025, 1:08 PM
F18671490: D18064.id.diff
Sep 25 2025, 4:06 AM
F18626751: D18064.id.diff
Sep 16 2025, 2:14 AM
Subscribers

Details

Summary

Fixes T12789. See that task for discussion. Currently, when multiple packages own the same path but have different dominion rules we get some weird/aribtrary/inconsistent results.

Instead, implement these rules:

  • If zero or more weak and one or more strong packages claim a path, the strong packages (exactly) all own it.
  • If one or more weak packages and zero strong packages claim a path, the weak packages all own it.

The major change here is that instead of keeping the first weak package we run into, we keep all the weak packages with the longest claim that we run into.

This needs to be implemented twice because Owners has two different near-copies of this logic, only one of which has test coverage. Some day maybe this will get fixed.

Test Plan
  • Added failing unit tests, made them pass.
  • Viewed all A/B strong/weak combinations in Diffusion, saw sensible ownership results.

Diff Detail

Repository
rP Phabricator
Branch
owners1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 17361
Build 23272: Run Core Tests
Build 23271: arc lint + arc unit

Event Timeline

lvital added a subscriber: lvital.
lvital added inline comments.
src/applications/owners/storage/__tests__/PhabricatorOwnersPackageTestCase.php
103–191

awwyiss

This revision is now accepted and ready to land.Jun 1 2017, 9:28 PM
This revision was automatically updated to reflect the committed changes.