@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 building a config stack, stop SiteSource objects from poisoning the cache

Summary:
Ref T13168. I'm not sure how this worked before, but I ran into this issue on my new laptop.

SiteSource accesses `PhabrictatorEnv::getEnvConfig('phabricator.base-uri')` when local, which may poison the cache and lock the value since we don't later discard the cache.

Specifically, when I access `http://locala.phacility.com`, I was getting an error like "You made a request for locala.phacility.com, but no configured site can serve this request.". This was because the base-uri was being incorrectly frozen as "local.phacility.com". The expectation is that it will match, so the standard PlatformSite will serve the request.

Test Plan:
- Before change: "no configured site" error.
- After change: local instance works properly.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13168

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

+8
+8
src/infrastructure/env/PhabricatorEnv.php
··· 221 221 222 222 foreach ($site_sources as $site_source) { 223 223 $stack->pushSource($site_source); 224 + 225 + // If the site source did anything which reads config, throw it away 226 + // to make sure any additional site sources get clean reads. 227 + self::dropConfigCache(); 224 228 } 225 229 226 230 $masters = PhabricatorDatabaseRef::getMasterDatabaseRefs(); ··· 259 263 throw $ex; 260 264 } 261 265 } 266 + 267 + // Drop the config cache one final time to make sure we're getting clean 268 + // reads now that we've finished building the stack. 269 + self::dropConfigCache(); 262 270 } 263 271 264 272 public static function repairConfig($key, $value) {