arvados-cli 2.3.1 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/arv +12 -13
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33da67d2b1ee543aaa256d8c76bd4f904c4a7838d7f934c191647b97fd51758b
4
- data.tar.gz: 1c762df477524d9ce8fac27de4923cfdb84fa24e3fa3f17368c014df1d95249b
3
+ metadata.gz: a3e87b05c43d4fdbc00d0040db8715420bd18e2a5a329942d7322276eb04a1a9
4
+ data.tar.gz: 5ec37ddd9354894592a6913c1621a3abecd286004e27999f10778a3f210a3846
5
5
  SHA512:
6
- metadata.gz: 4618ddc2db5c603d5fb0a235a6c241d499b3ca3fd1bb3cec2df8aa73189a9dfefc03df3e8cfb3a50a0526469894b9088b4087cbfe1af9ec5b1abb3877867ec73
7
- data.tar.gz: 6bd65dceaa514e0e6d811df40a253a9b67867913b9b7f072cc3e64f9cab6c3777fe10079c9cf40926ffd776042e2e00290510f190f80f3f0fde881c9571cefca
6
+ metadata.gz: c0b7f9a204c55be54d4f2a0d7bdb6ceadcef5082ca9d2d918782afeaf5d4458cfbcd76e8d19ed126bef75bf20f8d52fa11811b19728a41891b72638ef405e7e0
7
+ data.tar.gz: d6098e6f3b6f38089f193749a7377f1e166869d7b69bf184bb9435e256ded3646c3d0be591e149c9fb3333ea836a96ceb86c056787eba0708ca6a16f22c69f27
data/bin/arv CHANGED
@@ -65,16 +65,6 @@ module Kernel
65
65
  end
66
66
  end
67
67
 
68
- class ArvadosClient < Google::APIClient
69
- def execute(*args)
70
- if args.last.is_a? Hash
71
- args.last[:headers] ||= {}
72
- args.last[:headers]['Accept'] ||= 'application/json'
73
- end
74
- super(*args)
75
- end
76
- end
77
-
78
68
  def init_config
79
69
  # read authentication data from arvados configuration file if present
80
70
  lineno = 0
@@ -605,7 +595,7 @@ if ENV['ARVADOS_API_HOST_INSECURE']
605
595
  end
606
596
 
607
597
  begin
608
- client = ArvadosClient.new(:host => ENV['ARVADOS_API_HOST'], :application_name => 'arvados-cli', :application_version => '1.0')
598
+ client = Google::APIClient.new(:host => ENV['ARVADOS_API_HOST'], :application_name => 'arvados-cli', :application_version => '1.0')
609
599
  arvados = client.discovered_api('arvados', ENV['ARVADOS_API_VERSION'])
610
600
  rescue Exception => e
611
601
  puts "Failed to connect to Arvados API server: #{e}"
@@ -708,14 +698,23 @@ else
708
698
  })
709
699
  end
710
700
 
701
+ request_id = result.headers[:x_request_id]
711
702
  begin
712
703
  results = JSON.parse result.body
713
704
  rescue JSON::ParserError => e
714
- abort "Failed to parse server response:\n" + e.to_s
705
+ err_msg = "Failed to parse server response:\n" + e.to_s
706
+ if request_id
707
+ err_msg += "\nRequest ID: #{request_id or client.request_id}"
708
+ end
709
+ abort err_msg
715
710
  end
716
711
 
717
712
  if results["errors"] then
718
- abort "Error: #{results["errors"][0]}"
713
+ err_message = results["errors"][0]
714
+ if request_id and !err_message.match(/.*req-[0-9a-zA-Z]{20}.*/)
715
+ err_message += " (#{request_id})"
716
+ end
717
+ abort "Error: #{err_message}"
719
718
  end
720
719
 
721
720
  case global_opts[:format]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arvados-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arvados Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-10 00:00:00.000000000 Z
11
+ date: 2022-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arvados
@@ -160,7 +160,7 @@ dependencies:
160
160
  - - "<"
161
161
  - !ruby/object:Gem::Version
162
162
  version: '2.5'
163
- description: Arvados command line tools, git commit e3df40f20870d2403d409f7726096edc2be31635
163
+ description: Arvados command line tools, git commit b1494b493833a2b6f881bf967c47dd3e8c313dc7
164
164
  email: packaging@arvados.org
165
165
  executables:
166
166
  - arv