Project

General

Profile

Actions

Bug #6657

closed

[SDKs] arv-copy has an unhelpful error message when `git` command is not available

Added by Joshua Randall over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
SDKs
Target version:
Story points:
0.5

Description

When arv-copy is asked to copy a pipeline template recursively to a --dst-git-repo, it requires the `git` command in order to run. When the `git` command is not available, my expectation would be that I might get an error something like:

  1. arv-copy --src qr1hi --dst 7lnae --project-uuid 7lnae-j7d0g-9r429yt0rcrdl8x --dst-git-repo jr17/test qr1hi-p5p6p-8584ylktoumirn0
    Error: git command is not available, please ensure it is available in the PATH

What actually happens is the following stack trace:

  1. arv-copy --src qr1hi --dst 7lnae --project-uuid 7lnae-j7d0g-9r429yt0rcrdl8x --dst-git-repo jr17/test qr1hi-p5p6p-8584ylktoumirn0
    Traceback (most recent call last):
    File "/usr/local/bin/arv-copy", line 4, in <module>
    main()
    File "/usr/local/lib/python2.7/dist-packages/arvados/commands/arv_copy.py", line 128, in main
    src_arv, dst_arv, args)
    File "/usr/local/lib/python2.7/dist-packages/arvados/commands/arv_copy.py", line 272, in copy_pipeline_template
    copy_git_repos(pt, src, dst, args.dst_git_repo, args)
    File "/usr/local/lib/python2.7/dist-packages/arvados/commands/arv_copy.py", line 371, in copy_git_repos
    migrate_jobspec(component, src, dst, dst_repo, args)
    File "/usr/local/lib/python2.7/dist-packages/arvados/commands/arv_copy.py", line 344, in migrate_jobspec
    copy_git_repo(repo, src, dst, dst_repo, script_version, args)
    File "/usr/local/lib/python2.7/dist-packages/arvados/commands/arv_copy.py", line 617, in copy_git_repo
    cwd=os.path.dirname(local_repo_dir[src_git_repo]))
    File "/usr/local/lib/python2.7/dist-packages/arvados/util.py", line 45, in run_command
    p = subprocess.Popen(execargs, **kwargs)
    File "/usr/lib/python2.7/subprocess.py", line 679, in init
    errread, errwrite)
    File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
    OSError: [Errno 2] No such file or directory

Subtasks 2 (0 open2 closed)

Task #6732: Review branch 6657-no-git-in-arv-copyResolvedRadhika Chippada07/22/2015Actions
Task #6680: Document the requirement to install git in the arv-copy user guideResolvedRadhika Chippada07/21/2015Actions
Actions

Also available in: Atom PDF