Page MenuHomePhabricator

DiffusionCommitController fails if Differential is uninstalled or not usable by the viewer
Closed, ResolvedPublic

Description

If Differential is set to a restrictive "Can Use Application" setting, the Diffusion commit page (/rXnnnn) fails. Specifically, the call stack looks like:

DiffusionCommitController->processRequest()
DiffusionPathChange::convertToDifferentialChangesets()
DifferentialDiff::newFromRawChanges()
DifferentialDiff::initializeNewDiff()

Broadly, Diffusion creates a DifferentialDiff as part of its internal rendering logic, but that hits standard pathways and throws when trying to pull default policies.

One reasonable approach might be to add a new DifferentialDiff::initializeEphemeralDiff() or similar, which skips the policy query and uses makeEphemeral() to make sure it isn't persisted.

WMF is affected because they don't want users touching Differential yet.

Event Timeline

epriestley raised the priority of this task from to Normal.
epriestley updated the task description. (Show Details)
epriestley added a subscriber: epriestley.

I peeped the IRC log so I'll take a stab at this now.

I can only reproduce this by setting the Differential application to a restrictive policy such as administrators only. With default policy, uninstalling the Differential application does not reproduce this. Updated the task.

Thanks for getting this so fast, we'll be sure to pull this into our next deployment.