cnvrg 2.0.16 → 2.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c04990b9e466d74e4ba90092109234a5488f1845db38bac6e3c121d8e6a7508
4
- data.tar.gz: 253358287a518824c5d22aeda7f4b9c2a9197e57d14177c8757806470258021a
3
+ metadata.gz: 7d5e7aa6c49c6bbe9ce99dcc85f90825d67ef8a4d066c84dd5978da99afb116b
4
+ data.tar.gz: 81e5d10c09beddd7da049ac29d2bd71fc611f3c2ca5bd4b2e2431457573b683d
5
5
  SHA512:
6
- metadata.gz: df209c738e03b869cc5ccc50694a2ce705fe3c9ba2459a1ddbbeb64b9ab433fdf8bd880bbd4f1d24ce2420ebbf0180b53c87b564e89d3b41df86c55a3b6a5ede
7
- data.tar.gz: 9bcd79dafb0d9b00626df5b873e8c787731afe2e297292bb184c2e2250062e4ccf5766539a9600d1c078568e2db8c13e9e88842dc6262c8a0c40cc75c80ab07a
6
+ metadata.gz: c338755e158c6e1c03dc84c16f3015c1801875d98e58ad788da47b5cf2374b06fa62445279ddd9585b9e2dd3a62bee381af968f1e5925c2b74a9eedf0652b17b
7
+ data.tar.gz: 674fe36d75e00c70919067c2539a85c3c56c6850852faf00781f8419a3a3a1dabb3d925be56316a9d20903a869300b761a893f01a0cea94eef6703f99c34d5a8
data/Readme.md CHANGED
@@ -68,4 +68,16 @@
68
68
  * DEV-12316 - Improvement: cli login should identify saas users automatically
69
69
  ## Version v2.0.16
70
70
  2021-12-16
71
- * DEV-12316 - Improvement: cli login should identify saas users automatically
71
+ * DEV-12316 - Improvement: cli login should identify saas users automatically
72
+ ## Version v2.0.17
73
+ 2021-12-19
74
+ * DEV-10581 - Bug: CLI - getting 404 response in "cnvrg set_default_owner"
75
+ ## Version v2.0.18
76
+ 2022-01-31
77
+ * DEV-12637 - Bug: Dataset - creating file from CLI/SDK in a folder with + sign, replaces + with space AND creates 2 folders
78
+ ## Version v2.0.19
79
+ 2022-02-22
80
+ * DEV-13271 - Bug: CLI - on upload folders in working dir containing .cnvrg, dir not uploading - dir is on .cnvrgignore
81
+ ## Version v2.0.20
82
+ 2022-02-27
83
+ * DEV-12288 - Bug: wrong error message when upload fails
data/lib/cnvrg/cli.rb CHANGED
@@ -363,7 +363,7 @@ module Cnvrg
363
363
  config = YAML.load_file(path)
364
364
 
365
365
  username = config.to_h[:username]
366
- res = Cnvrg::API.request("/users/#{username}/get_possible_owners", 'GET')
366
+ res = Cnvrg::API.request("/api/v1/users/#{username}/get_possible_owners", 'GET')
367
367
  if Cnvrg::CLI.is_response_success(res)
368
368
  owner = username
369
369
  result = res["result"]
@@ -372,7 +372,6 @@ module Cnvrg
372
372
  choose_owner = result["username"]
373
373
  if owners.empty?
374
374
  else
375
- owners << choose_owner
376
375
  chosen = false
377
376
  while !chosen
378
377
  owners_id = owners.each_with_index.map {|x, i| "#{i + 1}. #{x}"}
@@ -2378,7 +2377,11 @@ module Cnvrg
2378
2377
  if ignore.nil? or ignore.empty?
2379
2378
  ignore = ignore_list
2380
2379
  end
2381
- data_ignore = data_dir_include()
2380
+
2381
+ if job_type != "Experiment"
2382
+ data_ignore = data_dir_include()
2383
+ end
2384
+
2382
2385
  if !data_ignore.nil?
2383
2386
  if ignore.nil? or ignore.empty?
2384
2387
  ignore = data_ignore
@@ -8,7 +8,7 @@ require 'fileutils'
8
8
  module Cnvrg
9
9
  class Datafiles
10
10
  ParallelThreads ||= Cnvrg::Helpers.parallel_threads
11
-
11
+ DIRECTORY_REGEX = /^[a-zA-Z0-9_\/-]+$/
12
12
  LARGE_FILE=1024*1024*5
13
13
  MULTIPART_SPLIT=10000000
14
14
  RETRIES = ENV['UPLOAD_FILE_RETRIES'].try(:to_i) || 10
@@ -56,9 +56,19 @@ module Cnvrg
56
56
  end
57
57
  raise SignalException.new(1, "Cant find file #{file}") unless File.exists? "#{Dir.pwd}/#{file}"
58
58
  end
59
+ is_valid_directory?(paths)
59
60
  paths
60
61
  end
61
62
 
63
+ def is_valid_directory?(paths)
64
+ paths.each do |path|
65
+ path = path.gsub('./', '')
66
+ if !path.match(DIRECTORY_REGEX) and File.directory? path
67
+ raise SignalException.new(1, "#{path} is invalid directory name, should contain letters, numbers, '_' , '-'")
68
+ end
69
+ end
70
+ end
71
+
62
72
  def get_files_and_folders(paths)
63
73
  files_and_folders = {}
64
74
  paths.each do |file|
data/lib/cnvrg/files.rb CHANGED
@@ -106,7 +106,7 @@ module Cnvrg
106
106
  commit: commit_sha1
107
107
  })
108
108
  unless Cnvrg::CLI.is_response_success(resp, false)
109
- raise StandardError.new("unsupported character: folder name can not include / \\ * : ? \" | ")
109
+ raise StandardError.new("Cant upload files to the server")
110
110
  end
111
111
  # resolve bucket
112
112
  res = resp['result']
data/lib/cnvrg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cnvrg
2
- VERSION = '2.0.16'
2
+ VERSION = '2.0.20'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cnvrg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.16
4
+ version: 2.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yochay Ettun
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-12-16 00:00:00.000000000 Z
13
+ date: 2022-03-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -488,7 +488,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
488
488
  - !ruby/object:Gem::Version
489
489
  version: '0'
490
490
  requirements: []
491
- rubygems_version: 3.2.32
491
+ rubygems_version: 3.0.3
492
492
  signing_key:
493
493
  specification_version: 4
494
494
  summary: A CLI tool for interacting with cnvrg.io.