Page MenuHomePhabricator

Empty commit causes diffusion error output (but doesn't fail)
Closed, ResolvedPublic

Description

See https://discourse.phabricator-community.org/t/empty-commit-causes-diffusion-error-output/1575

Reproduced here, by cloning rGITTEST, git commit --allow-empty -m empty and git push (rGITTEST75cff16); Got this output:

$ git push
# Push received by "secure002.phacility.net", forwarding to cluster host.
# Acquiring write lock for repository "rGITTEST"...
# Acquired write lock immediately.
# Acquiring read lock for repository "rGITTEST" on device "secure001.phacility.net"...
# Acquired read lock immediately.
# Device "secure001.phacility.net" is already a cluster leader and does not need to be synchronized.
# Ready to receive on cluster host "secure001.phacility.net".
Enumerating objects: 1, done.
Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1), 183 bytes | 183.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0)
remote: [2018-06-21 04:23:58] ERROR 8: Undefined offset: 1 at [/core/lib/phabricator/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:1135]
remote: arcanist(head=master, ref.master=df7313bdf2a3), libcore(), phabricator(head=master, ref.master=59b95f939780), phutil(head=master, ref.master=4206849bb05b), secure(head=master, ref.master=988cf9bd7958), services(head=master, ref.master=3d2895d3949f)
remote:   #0 DiffusionCommitHookEngine::rejectEnormousChanges(array) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:159]
remote:   #1 DiffusionCommitHookEngine::execute() called at [<phabricator>/scripts/repository/commit_hook.php:196]
remote: [2018-06-21 04:23:58] ERROR 8: Undefined offset: 0 at [/core/lib/phabricator/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:1135]
remote: arcanist(head=master, ref.master=df7313bdf2a3), libcore(), phabricator(head=master, ref.master=59b95f939780), phutil(head=master, ref.master=4206849bb05b), secure(head=master, ref.master=988cf9bd7958), services(head=master, ref.master=3d2895d3949f)
remote:   #0 DiffusionCommitHookEngine::rejectEnormousChanges(array) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:159]
remote:   #1 DiffusionCommitHookEngine::execute() called at [<phabricator>/scripts/repository/commit_hook.php:196]
remote: [2018-06-21 04:23:58] ERROR 8: Undefined offset: 1 at [/core/lib/phabricator/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:1241]
remote: arcanist(head=master, ref.master=df7313bdf2a3), libcore(), phabricator(head=master, ref.master=59b95f939780), phutil(head=master, ref.master=4206849bb05b), secure(head=master, ref.master=988cf9bd7958), services(head=master, ref.master=3d2895d3949f)
remote:   #0 DiffusionCommitHookEngine::getChangesetsForCommit(string) called at [<phabricator>/src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php:43]
remote:   #1 HeraldPreCommitContentAdapter::getDiffContent(string) called at [<phabricator>/src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php:35]
remote:   #2 HeraldPreCommitContentAdapter::isDiffEnormous() called at [<phabricator>/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php:17]
remote:   #3 DiffusionPreCommitContentDiffEnormousHeraldField::getHeraldFieldValue(PhabricatorRepositoryPushLog) called at [<phabricator>/src/applications/herald/adapter/HeraldAdapter.php:135]
remote:   #4 HeraldAdapter::getHeraldField(string) called at [<phabricator>/src/applications/herald/engine/HeraldEngine.php:417]
remote:   #5 HeraldEngine::getObjectFieldValue(string) called at [<phabricator>/src/applications/herald/engine/HeraldEngine.php:412]
remote:   #6 HeraldEngine::getConditionObjectValue(HeraldCondition, HeraldPreCommitContentAdapter) called at [<phabricator>/src/applications/herald/engine/HeraldEngine.php:316]
remote:   #7 HeraldEngine::doesRuleMatch(HeraldRule, HeraldPreCommitContentAdapter) called at [<phabricator>/src/applications/herald/engine/HeraldEngine.php:99]
remote:   #8 HeraldEngine::applyRules(array, HeraldPreCommitContentAdapter) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:333]
remote:   #9 DiffusionCommitHookEngine::applyHeraldRules(array, HeraldPreCommitContentAdapter) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:303]
remote:   #10 DiffusionCommitHookEngine::applyHeraldContentRules(array) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:168]
remote:   #11 DiffusionCommitHookEngine::execute() called at [<phabricator>/scripts/repository/commit_hook.php:196]
remote: [2018-06-21 04:23:58] ERROR 8: Undefined offset: 0 at [/core/lib/phabricator/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:1241]
remote: arcanist(head=master, ref.master=df7313bdf2a3), libcore(), phabricator(head=master, ref.master=59b95f939780), phutil(head=master, ref.master=4206849bb05b), secure(head=master, ref.master=988cf9bd7958), services(head=master, ref.master=3d2895d3949f)
remote:   #0 DiffusionCommitHookEngine::getChangesetsForCommit(string) called at [<phabricator>/src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php:43]
remote:   #1 HeraldPreCommitContentAdapter::getDiffContent(string) called at [<phabricator>/src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php:35]
remote:   #2 HeraldPreCommitContentAdapter::isDiffEnormous() called at [<phabricator>/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php:17]
remote:   #3 DiffusionPreCommitContentDiffEnormousHeraldField::getHeraldFieldValue(PhabricatorRepositoryPushLog) called at [<phabricator>/src/applications/herald/adapter/HeraldAdapter.php:135]
remote:   #4 HeraldAdapter::getHeraldField(string) called at [<phabricator>/src/applications/herald/engine/HeraldEngine.php:417]
remote:   #5 HeraldEngine::getObjectFieldValue(string) called at [<phabricator>/src/applications/herald/engine/HeraldEngine.php:412]
remote:   #6 HeraldEngine::getConditionObjectValue(HeraldCondition, HeraldPreCommitContentAdapter) called at [<phabricator>/src/applications/herald/engine/HeraldEngine.php:316]
remote:   #7 HeraldEngine::doesRuleMatch(HeraldRule, HeraldPreCommitContentAdapter) called at [<phabricator>/src/applications/herald/engine/HeraldEngine.php:99]
remote:   #8 HeraldEngine::applyRules(array, HeraldPreCommitContentAdapter) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:333]
remote:   #9 DiffusionCommitHookEngine::applyHeraldRules(array, HeraldPreCommitContentAdapter) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:303]
remote:   #10 DiffusionCommitHookEngine::applyHeraldContentRules(array) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:168]
remote:   #11 DiffusionCommitHookEngine::execute() called at [<phabricator>/scripts/repository/commit_hook.php:196]
remote: [2018-06-21 04:23:58] ERROR 2: Invalid argument supplied for foreach() at [/core/lib/phabricator/src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php:65]
remote: arcanist(head=master, ref.master=df7313bdf2a3), libcore(), phabricator(head=master, ref.master=59b95f939780), phutil(head=master, ref.master=4206849bb05b), secure(head=master, ref.master=988cf9bd7958), services(head=master, ref.master=3d2895d3949f)
remote:   #0 HeraldPreCommitContentAdapter::getDiffContent(string) called at [<phabricator>/src/applications/diffusion/herald/HeraldPreCommitContentAdapter.php:35]
remote:   #1 HeraldPreCommitContentAdapter::isDiffEnormous() called at [<phabricator>/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php:17]
remote:   #2 DiffusionPreCommitContentDiffEnormousHeraldField::getHeraldFieldValue(PhabricatorRepositoryPushLog) called at [<phabricator>/src/applications/herald/adapter/HeraldAdapter.php:135]
remote:   #3 HeraldAdapter::getHeraldField(string) called at [<phabricator>/src/applications/herald/engine/HeraldEngine.php:417]
remote:   #4 HeraldEngine::getObjectFieldValue(string) called at [<phabricator>/src/applications/herald/engine/HeraldEngine.php:412]
remote:   #5 HeraldEngine::getConditionObjectValue(HeraldCondition, HeraldPreCommitContentAdapter) called at [<phabricator>/src/applications/herald/engine/HeraldEngine.php:316]
remote:   #6 HeraldEngine::doesRuleMatch(HeraldRule, HeraldPreCommitContentAdapter) called at [<phabricator>/src/applications/herald/engine/HeraldEngine.php:99]
remote:   #7 HeraldEngine::applyRules(array, HeraldPreCommitContentAdapter) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:333]
remote:   #8 DiffusionCommitHookEngine::applyHeraldRules(array, HeraldPreCommitContentAdapter) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:303]
remote:   #9 DiffusionCommitHookEngine::applyHeraldContentRules(array) called at [<phabricator>/src/applications/diffusion/engine/DiffusionCommitHookEngine.php:168]
remote:   #10 DiffusionCommitHookEngine::execute() called at [<phabricator>/scripts/repository/commit_hook.php:196]
# Released cluster write lock.
To ssh://secure.phabricator.com/diffusion/GITTEST/git-test.git
   2f0e16a..75cff16  master -> master

(Exit code was 0 after all this scary logs).