primitive 0.2.4__py3-none-any.whl → 0.2.5__py3-none-any.whl
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.
- primitive/__about__.py +1 -1
- primitive/agent/runner.py +9 -15
- primitive/agent/uploader.py +10 -4
- {primitive-0.2.4.dist-info → primitive-0.2.5.dist-info}/METADATA +1 -1
- {primitive-0.2.4.dist-info → primitive-0.2.5.dist-info}/RECORD +8 -8
- {primitive-0.2.4.dist-info → primitive-0.2.5.dist-info}/WHEEL +0 -0
- {primitive-0.2.4.dist-info → primitive-0.2.5.dist-info}/entry_points.txt +0 -0
- {primitive-0.2.4.dist-info → primitive-0.2.5.dist-info}/licenses/LICENSE.txt +0 -0
primitive/__about__.py
CHANGED
primitive/agent/runner.py
CHANGED
@@ -72,7 +72,7 @@ class Runner:
|
|
72
72
|
self.job_run = job_run
|
73
73
|
self.job_settings = job_run["jobSettings"]
|
74
74
|
self.config = None
|
75
|
-
self.source_dir = None
|
75
|
+
self.source_dir: Path = None
|
76
76
|
self.initial_env = {}
|
77
77
|
self.modified_env = {}
|
78
78
|
self.file_logger = None
|
@@ -324,20 +324,14 @@ class Runner:
|
|
324
324
|
return
|
325
325
|
|
326
326
|
for glob in self.config["stores"]:
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
relative_path = PurePath(file).relative_to(self.source_dir)
|
336
|
-
destination = Path(
|
337
|
-
get_artifacts_cache(self.job_run["id"]) / relative_path
|
338
|
-
)
|
339
|
-
destination.parent.mkdir(parents=True, exist_ok=True)
|
340
|
-
Path(file).replace(destination)
|
327
|
+
# Glob relative to the source directory
|
328
|
+
matches = self.source_dir.rglob(glob)
|
329
|
+
|
330
|
+
for match in matches:
|
331
|
+
relative_path = PurePath(match).relative_to(self.source_dir)
|
332
|
+
dest = Path(get_artifacts_cache(self.job_run["id"]) / relative_path)
|
333
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
334
|
+
Path(match).replace(dest)
|
341
335
|
|
342
336
|
shutil.rmtree(path=self.source_dir)
|
343
337
|
|
primitive/agent/uploader.py
CHANGED
@@ -45,10 +45,16 @@ class Uploader:
|
|
45
45
|
)
|
46
46
|
|
47
47
|
for file in files:
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
try:
|
49
|
+
result = self.primitive.files.upload_file_direct(
|
50
|
+
path=file,
|
51
|
+
key_prefix=str(PurePath(file).relative_to(cache.parent).parent),
|
52
|
+
)
|
53
|
+
except Exception as e:
|
54
|
+
if "is empty" in str(e):
|
55
|
+
logger.warning(f"{file} is empty, skipping upload")
|
56
|
+
continue
|
57
|
+
|
52
58
|
upload_id = result.data["fileUpdate"]["id"]
|
53
59
|
|
54
60
|
if upload_id:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: primitive
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.5
|
4
4
|
Project-URL: Documentation, https://github.com//primitivecorp/primitive-cli#readme
|
5
5
|
Project-URL: Issues, https://github.com//primitivecorp/primitive-cli/issues
|
6
6
|
Project-URL: Source, https://github.com//primitivecorp/primitive-cli
|
@@ -1,12 +1,12 @@
|
|
1
|
-
primitive/__about__.py,sha256=
|
1
|
+
primitive/__about__.py,sha256=VaGq4MBVsV7xkxuZp0WfNnVmej-BHjSD2cj2U5-nyt0,129
|
2
2
|
primitive/__init__.py,sha256=bwKdgggKNVssJFVPfKSxqFMz4IxSr54WWbmiZqTMPNI,106
|
3
3
|
primitive/cli.py,sha256=58fn6ayVSC1f4hLKx3FUNT9CkuPLva8dFQg0_YUwpio,2410
|
4
4
|
primitive/client.py,sha256=PPyIQRvKKSqCF9RRF5mJJ4Vqqolpzy1YXqffNLKIvAA,2390
|
5
5
|
primitive/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
primitive/agent/actions.py,sha256=5Lmqxsf24eH6BDEesbJbn1Xj-8ifVlQ_Y3QR8xpkFtM,6869
|
7
7
|
primitive/agent/commands.py,sha256=-dVDilELfkGfbZB7qfEPs77Dm1oT62qJj4tsIk4KoxI,254
|
8
|
-
primitive/agent/runner.py,sha256=
|
9
|
-
primitive/agent/uploader.py,sha256=
|
8
|
+
primitive/agent/runner.py,sha256=dh1aoPvSg_lUoFnoaVo2TQb9m5TwTDPRB7su9yc2D8Q,12159
|
9
|
+
primitive/agent/uploader.py,sha256=6pjUyb1LyUCpHBE6p13pRpXxy6iDxu14qJGvE3R6cVo,3155
|
10
10
|
primitive/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
primitive/auth/actions.py,sha256=MPsG9LcKcOPwA7gZ9Ewk0PZJhTQvIrGfODdz4GxSzgA,999
|
12
12
|
primitive/auth/commands.py,sha256=2z5u5xX64n0yILucx9emtWh3uQXLvs2QQQQIldZGr94,2341
|
@@ -88,8 +88,8 @@ primitive/utils/memory_size.py,sha256=4xfha21kW82nFvOTtDFx9Jk2ZQoEhkfXii-PGNTpIU
|
|
88
88
|
primitive/utils/printer.py,sha256=f1XUpqi5dkTL3GWvYRUGlSwtj2IxU1q745T4Fxo7Tn4,370
|
89
89
|
primitive/utils/shell.py,sha256=jWzb7ky7p987dJas6ZvarK3IJNZ5cwBXcryRWb9Uh6U,2072
|
90
90
|
primitive/utils/text.py,sha256=XiESMnlhjQ534xE2hMNf08WehE1SKaYFRNih0MmnK0k,829
|
91
|
-
primitive-0.2.
|
92
|
-
primitive-0.2.
|
93
|
-
primitive-0.2.
|
94
|
-
primitive-0.2.
|
95
|
-
primitive-0.2.
|
91
|
+
primitive-0.2.5.dist-info/METADATA,sha256=MAd0YCdGsnfn8dme11Jl8ZQHRi0pvZ169alY6b5luNc,3669
|
92
|
+
primitive-0.2.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
93
|
+
primitive-0.2.5.dist-info/entry_points.txt,sha256=p1K8DMCWka5FqLlqP1sPek5Uovy9jq8u51gUsP-z334,48
|
94
|
+
primitive-0.2.5.dist-info/licenses/LICENSE.txt,sha256=B8kmQMJ2sxYygjCLBk770uacaMci4mPSoJJ8WoDBY_c,1098
|
95
|
+
primitive-0.2.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|