Page MenuHomePhabricator

Why does `arc land` truncate the output it receives from `git commit`?
OpenPublic

Asked by aleb on Jun 28 2017, 3:17 PM.

Details

Currently arc land executes git commit and when there is a pre-commit hook and it returns an error code, the operation is aborted and arc prints the truncated incomplete stdout. For an output example see T12742. This means that:

  • (an advantage) As @epriestley explained, developers will be protected against potential huge outputs of e.g. "5GB (hypothetically, from a hook which prints 2.5GB of header and footer context and puts the important part in the middle)". But as I see it, generally if I have to use a tool and it's so spammy, then I can easily redirect the output to a file and read that file with no problems. This can be done just as well with arc land if the output is too much to be able to scroll.
  • (a disadvantage) When this happens, all users of git pre-commit scripts which print progress and potentially error messages have to run manually arc land --trace and re-run manually the git commands to get the entire output, to find out what errors have been printed, which is not very nice.

I'd like to point out the minority of the problem fixed by this truncate behaviour, versus the annoyance of having to run manually git commands to figure out why arc land fails. Please tell me what I'm missing so I understand better why this truncate behaviour has been added. Thanks.

Same issue when trying to debug why updating a git repository does not work. See below "STDERR" and "(6,758 more bytes)". Where can I find the full error to figure out why the repository updating does not work?

$ sudo -u daemon /opt/bitnami/apps/phabricator/htdocs/bin/repository update  R
The authenticity of host '[SERVER]:2222 ([IP]:2222)' can't be established.
ECDSA key fingerprint is c7:6d:c7:03:40:98:79:bd:02:76:df:5d:b6:93:7f:21.
Are you sure you want to continue connecting (yes/no)? yes
The authenticity of host '[SERVER]:2222 ([IP]:2222)' can't be established.
ECDSA key fingerprint is c7:6d:c7:03:40:98:79:bd:02:76:df:5d:b6:93:7f:21.
Are you sure you want to continue connecting (yes/no)? yes
[2017-08-10 08:08:47] EXCEPTION: (CommandException) Failed to fetch changes!
COMMAND
git fetch origin '+refs/*:refs/*' --prune

STDOUT
(empty)

STDERR
ssh: /opt/bitnami/common/lib/libcrypto.so.1.0.0: no version information available (required by ssh)
ssh: /opt/bitnami/common/lib/libcrypto.so.1.0.0: no version information available (required by ssh)
OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.2k  26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to SERVER port 2222.
debug1: Connection established.
debug1: SELinux support disabled
Could not create directory '/usr/sbin/.ssh'.
debug1: key_load_public: No such file or directory
debug1: identity file /usr/sbin/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /usr/sbin/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /usr/sbin/.ssh/id_dsa type -1
debug1: key_load_public: No s... (6,758 more bytes) ... at [<phabricator>/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php:370]
arcanist(head=stable, ref.stable=9503b941cc02), phabricator(head=stable, ref.stable=c3bdcb4ca854), phutil(head=stable, ref.stable=10963f771f11)
  #0 PhabricatorRepositoryPullEngine::executeGitUpdate() called at [<phabricator>/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php:125]
  #1 PhabricatorRepositoryPullEngine::pullRepositoryWithLock() called at [<phabricator>/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php:40]
  #2 PhabricatorRepositoryPullEngine::pullRepository() called at [<phabricator>/src/applications/repository/management/PhabricatorRepositoryManagementUpdateWorkflow.php:59]
  #3 PhabricatorRepositoryManagementUpdateWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:438]
  #4 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:330]
  #5 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/repository/manage_repositories.php:22]

Answers

This answer has been hidden.

New Answer