Feature #7237

arv-copy ergonomics

Added by Peter Amstutz about 4 years ago. Updated about 4 years ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
-

Description

arv-copy could take some cues from the context:

The --src parameter can be inferred from the first part of the UUID.

If --dst is not present but ARVADOS_API_HOST and ARVADOS_API_TOKEN are available, we could assume that is the destination.

arv-copy requires that --dst-git-repo be provided on the command line, but doesn't immediately check that it exists, so if the repo doesn't exist, it fails halfway through the copy:

peteramstutz@shell:~$ arv-copy --src qr1hi --dst c97qk --dst-git-repo peteramstutz --recursive qr1hi-d1hrv-nao0ohw8y7dpf84                                     
8fce8d374fdb7e780c0017a33ce57398+128: 6M / 6M 100.0%                                                                                                           
d341a6f1db391a780d694e240e95e475+3805: 4799M / 4799M 100.0%                                                                                                    
513a1bdbbc2ac2165a0b84e37ab91e31+10812: 94M / 94M 100.0%                                                                                                       
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 124, in main                                                                
    args)                                                                                                                                                      
  File "/usr/local/lib/python2.7/dist-packages/arvados/commands/arv_copy.py", line 229, in copy_pipeline_instance                                              
    src, dst, args)                                                                                                                                            
  File "/usr/local/lib/python2.7/dist-packages/arvados/commands/arv_copy.py", line 283, 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 382, 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 355, 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 614, in copy_git_repo                                                       
    .format(dst_git_repo, r['items_available']))                                                                                                               
Exception: cannot identify destination repo peteramstutz; 0 repos found                                                                                        

Now that we can create git repositories, we should create a new repository by default (and use a default name instead of requiring --dst-git-repo) instead of requiring everything be committed into an existing repository.


Related issues

Related to Arvados - Feature #5676: [SDK] arv-copy automatically creates new repository(ies) on the destination clusterNew

History

#1 Updated by Peter Amstutz about 4 years ago

  • Description updated (diff)

#2 Updated by Peter Amstutz about 4 years ago

  • Description updated (diff)

#3 Updated by Peter Amstutz about 4 years ago

  • Description updated (diff)

Also available in: Atom PDF