Page MenuHomePhabricator

Add "Dominion" rules for Owners Packages
ClosedPublic

Authored by epriestley on May 17 2016, 2:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 20, 10:56 AM
Unknown Object (File)
Feb 22 2024, 3:10 AM
Unknown Object (File)
Feb 22 2024, 3:10 AM
Unknown Object (File)
Feb 19 2024, 9:35 AM
Unknown Object (File)
Feb 14 2024, 11:01 AM
Unknown Object (File)
Feb 7 2024, 6:55 PM
Unknown Object (File)
Feb 3 2024, 10:08 AM
Unknown Object (File)
Jan 28 2024, 10:16 AM
Subscribers

Details

Summary

Ref T10939. This supports two settings for packages (although they can't be configured yet):

  • Strong Dominion: If the package owns a/, it always owns every subpath, even if another package also owns the subpath. For example, if I own src/differential/, I always own it even if someone else claims src/differential/js/ as part of the "Javascript" package. This is the current behavior, and the default.
  • Weak Dominion: If the package owns a/, but another package owns a/b/, the package gives up control of those paths and no longer owns paths in a/b/. This is a new behavior which can make defining some types of packages easier.

In the next change, I'll allow users to switch these modes and document what they mean.

Test Plan
  • Ran existing unit tests.
  • Added new unit tests.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Add "Dominion" rules for Owners Packages.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.

Open to a less goofy name, but I expect this option to be rarely used and this is at least easy to search for. The other terms we've been using to discuss this on T10939 ("direct ownership", "indirect ownership") seem about equally meaningless and impossible to search for to me.

Have you played Dominion?

Maaaaaaaaybe. I remember playing one of those cool new-age card games with @joel I think but I don't remember if it was Dominion or not.

chad edited edge metadata.
chad added inline comments.
src/applications/owners/storage/PhabricatorOwnersPackage.php
196

wow this is valid sql?

This revision is now accepted and ready to land.May 17 2016, 3:34 PM
src/applications/owners/storage/PhabricatorOwnersPackage.php
196

Yeah, you can do stuff like this:

SELECT 0;
SELECT "quack";

..and the word AS to name a column in the result set is optional, so these have the same meaning:

SELECT "quack" AS animal_sound;
SELECT "quack" animal_sound;

Producing this:

mysql> select "quack" animal_sound;
+--------------+
| animal_sound |
+--------------+
| quack        |
+--------------+
1 row in set (0.00 sec)

(But this temporary wonkiness is replaced with a sensible query against a real column in the next diff.)

Im just brain slow this morning.

This revision was automatically updated to reflect the committed changes.