Page MenuHomePhabricator

git lfs broken due to missing ttf.relative config key
Closed, ResolvedPublic

Description

After upgrading to the following version of phabricator, git lfs no longer works for us:

phabricator 0d1654446be6de43b2bd12fcc247db0dc1a46464 (Sat, Jun 10) 
arcanist c04f141ab0231e593a513356b3832a30f9404627 (Fri, Jun 9) 
phutil 74a1350416eb2df825c2315d6519bee03f77bee9 (Mon, Jun 5)

It attempts to upload the files, but fails to do so with the following exception:

[Mon Jun 12 19:56:13.160045 2017] [:error] [pid 7296] [client 10.24.0.43:60889] [2017-06-12 19:56:13] EXCEPTION: (PhutilTypeCheckException) Parameter 'ttl.relative' has invalid type. Expected type 'optional int', got type 'null'. at [<phutil>/src/parser/PhutilTypeSpec.php:59]
[Mon Jun 12 19:56:13.160605 2017] [:error] [pid 7296] [client 10.24.0.43:60889] arcanist(head=master, ref.master=c04f141ab023), phabricator(head=master, ref.master=0d1654446be6), phutil(head=master, ref.master=74a1350416eb)
[Mon Jun 12 19:56:13.160636 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #0 <#2> PhutilTypeSpec::check(NULL, string) called at [<phutil>/src/parser/PhutilTypeSpec.php:169]
[Mon Jun 12 19:56:13.160652 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #1 <#2> PhutilTypeSpec::checkMap(array, array) called at [<phabricator>/src/applications/files/storage/PhabricatorFile.php:1330]
[Mon Jun 12 19:56:13.160666 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #2 <#2> PhabricatorFile::readPropertiesFromParameters(array) called at [<phabricator>/src/applications/files/storage/PhabricatorFile.php:390]
[Mon Jun 12 19:56:13.160680 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #3 <#2> PhabricatorFile::buildFromFileData(string, array) called at [<phabricator>/src/applications/files/storage/PhabricatorFile.php:419]
[Mon Jun 12 19:56:13.160698 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #4 <#2> PhabricatorFile::newFromFileData(string, array) called at [<phabricator>/src/applications/files/uploadsource/PhabricatorFileUploadSource.php:132]
[Mon Jun 12 19:56:13.160713 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #5 <#2> PhabricatorFileUploadSource::writeSingleFile() called at [<phabricator>/src/applications/files/uploadsource/PhabricatorFileUploadSource.php:45]
[Mon Jun 12 19:56:13.160727 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #6 <#2> PhabricatorFileUploadSource::uploadFile() called at [<phabricator>/src/applications/diffusion/controller/DiffusionServeController.php:1140]
[Mon Jun 12 19:56:13.160740 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #7 <#2> DiffusionServeController::serveGitLFSUploadRequest(PhabricatorRepository, PhabricatorUser, string) called at [<phabricator>/src/applications/diffusion/controller/DiffusionServeController.php:959]
[Mon Jun 12 19:56:13.160754 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #8 <#2> DiffusionServeController::serveGitLFSRequest(PhabricatorRepository, PhabricatorUser) called at [<phabricator>/src/applications/diffusion/controller/DiffusionServeController.php:411]
[Mon Jun 12 19:56:13.160767 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #9 <#2> DiffusionServeController::serveVCSRequest(PhabricatorRepository, PhabricatorUser) called at [<phabricator>/src/applications/diffusion/controller/DiffusionServeController.php:372]
[Mon Jun 12 19:56:13.160781 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #10 <#2> DiffusionServeController::serveRequest(AphrontRequest) called at [<phabricator>/src/applications/diffusion/controller/DiffusionServeController.php:99]
[Mon Jun 12 19:56:13.160794 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #11 <#2> DiffusionServeController::handleRequest(AphrontRequest) called at [<phabricator>/src/aphront/AphrontController.php:71]
[Mon Jun 12 19:56:13.160808 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #12 <#2> AphrontController::delegateToController(DiffusionServeController) called at [<phabricator>/src/applications/diffusion/controller/DiffusionController.php:27]
[Mon Jun 12 19:56:13.160832 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #13 <#2> DiffusionController::willBeginExecution() called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:255]
[Mon Jun 12 19:56:13.160848 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #14 <#2> AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:181]
[Mon Jun 12 19:56:13.160866 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #15 <#2> AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:17]
[Mon Jun 12 19:56:13.160881 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #16 phlog(PhutilTypeCheckException) called at [<phabricator>/src/aphront/response/AphrontUnhandledExceptionResponse.php:20]
[Mon Jun 12 19:56:13.160894 2017] [:error] [pid 7296] [client 10.24.0.43:60889] #17 AphrontUnhandledExceptionResponse::setException(PhutilTypeCheckException) called at [<phabricator>/webroot/index.php:21]

However, when I try to set ttl.relative to a value, it says that this config key does not exist:

 root@kerberos:/var/www/phabricator/phabricator# ./bin/config get ttf.relative
Usage Exception: No such configuration key 'ttf.relative'! Use `config list` to list all keys.
root@kerberos:/var/www/phabricator/phabricator# ./bin/config set ttf.relative 0
Usage Exception: No such configuration key 'ttf.relative'! Use `config list` to list all keys.

We ran the latest SQL migration script and there are no database issues reported. Still, I suspect something went wrong with an upgrade, not creating config keys that should have been created?

Any ideas what could have gone wrong or how to resolve the issue?

Event Timeline

This is not a configuration problem, and you can't fix it by changing configuration. D18119 should fix it.

I believe this should now be resolved in HEAD of master. Let us know if it doesn't work for you or if you're still seeing issues after upgrading. Thanks for the report!

I didn't see this bug report earlier and was about to...start sprinkling error_log() everywhere to see what was going wrong. (What better way to spend Friday afternoon, right?)

I'm glad it wasn't just me. Thanks, @Kwisatz! Thanks, @epriestley!