Page MenuHomePhabricator

Convert user profile images into a standard cache
ClosedPublic

Authored by epriestley on Jun 5 2016, 1:00 AM.
Tags
None
Referenced Files
F14172573: D16040.diff
Sun, Dec 8, 5:42 AM
Unknown Object (File)
Thu, Dec 5, 8:03 AM
Unknown Object (File)
Wed, Dec 4, 10:16 AM
Unknown Object (File)
Thu, Nov 28, 2:34 AM
Unknown Object (File)
Tue, Nov 19, 4:10 PM
Unknown Object (File)
Sat, Nov 16, 2:54 PM
Unknown Object (File)
Tue, Nov 12, 5:51 AM
Unknown Object (File)
Nov 7 2024, 8:53 PM
Subscribers
None

Details

Summary

Ref T4103. Ref T10078. This moves profile image caches to new usercache infrastructure.

These dirty automatically based on configuration and User properties, so add some stuff to make that happen.

This reduces the number of queries issued on every page by 1.

Test Plan

Browsed around, changed profile image, viewed as self, viewed as another user, verified no more query to pull this information on every page

Diff Detail

Repository
rP Phabricator
Branch
setting29
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 12462
Build 15790: Run Core Tests
Build 15789: arc lint + arc unit

Unit TestsFailed

TimeTest
50 msPhabricatorAccessControlTestCase::Unknown Unit Message ("")
Assertion failed, expected 'true' (at PhabricatorAccessControlTestCase.php:261): Expect user 'normal' to be allowed access to 'Default'. ACTUAL VALUE
0 msPhabricatorLocalTimeTestCase::Unknown Unit Message ("")
EXCEPTION (PhabricatorDataNotAttachedException): Attempting to access attached data on PhabricatorUser (via getUserSetting()), but the data is not actually attached. Before accessing attachable data on an object, you must load and attach it. Data is normally attached by calling the corresponding needX() method on the Query class when the object is loaded. You can also call the corresponding attachX() method explicitly.
0 msAlmanacNamesTestCase::Unknown Unit Message ("")
30 assertions passed.
0 msAlmanacServiceTypeTestCase::Unknown Unit Message ("")
1 assertion passed.
0 msAphrontHTTPSinkTestCase::Unknown Unit Message ("")
2 assertions passed.
View Full Test Results (2 Failed · 322 Passed)

Event Timeline

epriestley retitled this revision from to Convert user profile images into a standard cache.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.

Those failures are probably fixed in D16041, let me backport the fixes.

Oh, no, they're not directly related. Some unit tests try to build/access users in weird ways that don't work with some of the cache stuff. I'll sort it out in the morning.

epriestley edited edge metadata.
  • Rebase on D16042, which fixes unit tests.
chad edited edge metadata.
This revision is now accepted and ready to land.Jun 5 2016, 2:53 PM