Page MenuHomePhabricator

scap prints error information twice
Closed, ResolvedPublic1 Estimated Story Points

Description

For example, on the train-dev deploy server:

debian@deploy:~$ time scap prep 1.34.0-wmf.0
22:06:42 Fetching core to /srv/mediawiki-staging/php-1.34.0-wmf.0
22:08:16 Checkout wmf/1.34.0-wmf.0 in /srv/mediawiki-staging/php-1.34.0-wmf.0
22:08:16 Unhandled error:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/scap/cli.py", line 341, in run
    exit_status = app.main(app.extra_arguments)
  File "/home/debian/.scap/plugins/prep.py", line 143, in main
    git.checkout(dest_dir, checkout_version)
  File "/usr/lib/python2.7/dist-packages/scap/git.py", line 393, in checkout
    git.checkout('--force', '--quiet', rev)
  File "/usr/lib/python2.7/dist-packages/scap/sh.py", line 1428, in __call__
    return RunningCommand(cmd, call_args, stdin, stdout, stderr)
  File "/usr/lib/python2.7/dist-packages/scap/sh.py", line 775, in __init__
    self.wait()
  File "/usr/lib/python2.7/dist-packages/scap/sh.py", line 793, in wait
    self.handle_command_exit_code(exit_code)
  File "/usr/lib/python2.7/dist-packages/scap/sh.py", line 816, in handle_command_exit_code
    raise exc
ErrorReturnCode_1:

  RAN: /usr/bin/git checkout --force --quiet wmf/1.34.0-wmf.0

  STDOUT:


  STDERR:
error: pathspec 'wmf/1.34.0-wmf.0' did not match any file(s) known to git.

22:08:16 prep failed: <ErrorReturnCode_1>

  RAN: /usr/bin/git checkout --force --quiet wmf/1.34.0-wmf.0

  STDOUT:


  STDERR:
error: pathspec 'wmf/1.34.0-wmf.0' did not match any file(s) known to git.


real    1m34.824s
user    1m19.684s
sys     0m4.632s
debian@deploy:~$

Event Timeline

thcipriani set the point value for this task to 1.

@dancy to check if this was resolved when lars removed the sh.py library

dancy claimed this task.

This is no longer an issue:

$ scap version
3.17.1-1
$ scap prep 1.37.0-wmf.99
18:31:14 Fetching core to /srv/mediawiki-staging/php-1.37.0-wmf.99
18:31:15 prep failed: <FailedCommand> Command 'git clone --jobs 10 -b wmf/1.37.0-wmf.99 https://gerrit.wikimedia.org/r/mediawiki/core /srv/mediawiki-staging/php-1.37.0-wmf.99' failed with exit code 128; stderr:
b"Cloning into '/srv/mediawiki-staging/php-1.37.0-wmf.99'...\nfatal: Remote branch wmf/1.37.0-wmf.99 not found in upstream origin\n"