@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

When dirtying repository cluster routing caches after an Almanac edit, discover linked bindings from devices

Summary:
See PHI1030. When you edit an Almanac object, we attempt to discover all the related objects so we can dirty the repository cluster routing cache: if you modify a Device or Service that's part of a clustered repository, we need to blow away our cached view of the layout.

Currently, we don't correctly find linked Bindings when editing a Device, so we may miss Services which have keys that need to be disabled. Instead, discover these linked objects.

See D17000 for the original implementation and more context.

Test Plan:
- Used `var_dump()` to dump out the discovered objects and dirtied cache keys.
- Before change: editing a Service dirties repository routing keys (this is correct), but editing a Device does not.
- After change: editing a Device now correctly dirties repository routing keys.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20003

+9 -1
+8
src/applications/almanac/engineextension/AlmanacCacheEngineExtension.php
··· 30 30 foreach ($interfaces as $interface) { 31 31 $results[] = $interface; 32 32 } 33 + 34 + $bindings = id(new AlmanacBindingQuery()) 35 + ->setViewer($viewer) 36 + ->withDevicePHIDs(mpull($devices, 'getPHID')) 37 + ->execute(); 38 + foreach ($bindings as $binding) { 39 + $results[] = $binding; 40 + } 33 41 } 34 42 35 43 foreach ($this->selectObjects($objects, 'AlmanacInterface') as $iface) {
+1 -1
src/applications/repository/storage/PhabricatorRepository.php
··· 2172 2172 $parts = array( 2173 2173 "repo({$repository_phid})", 2174 2174 "serv({$service_phid})", 2175 - 'v3', 2175 + 'v4', 2176 2176 ); 2177 2177 2178 2178 return implode('.', $parts);