primitive 0.1.55__py3-none-any.whl → 0.1.57__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 +6 -1
- primitive/agent/uploader.py +21 -8
- {primitive-0.1.55.dist-info → primitive-0.1.57.dist-info}/METADATA +1 -1
- {primitive-0.1.55.dist-info → primitive-0.1.57.dist-info}/RECORD +8 -8
- {primitive-0.1.55.dist-info → primitive-0.1.57.dist-info}/WHEEL +0 -0
- {primitive-0.1.55.dist-info → primitive-0.1.57.dist-info}/entry_points.txt +0 -0
- {primitive-0.1.55.dist-info → primitive-0.1.57.dist-info}/licenses/LICENSE.txt +0 -0
primitive/__about__.py
CHANGED
primitive/agent/runner.py
CHANGED
@@ -50,6 +50,7 @@ class AgentRunner:
|
|
50
50
|
) -> None:
|
51
51
|
self.primitive = primitive
|
52
52
|
self.source_dir = source_dir
|
53
|
+
self.workdir = "."
|
53
54
|
self.job_id = job_id
|
54
55
|
self.job_slug = job_slug
|
55
56
|
self.max_log_size = max_log_size
|
@@ -111,10 +112,14 @@ class AgentRunner:
|
|
111
112
|
for step in self.steps():
|
112
113
|
logger.info(f"Beginning step {step['name']}")
|
113
114
|
|
115
|
+
# Update workdir
|
116
|
+
if "workdir" in step:
|
117
|
+
self.workdir = step["workdir"]
|
118
|
+
|
114
119
|
# Define step proc
|
115
120
|
proc = Process(
|
116
121
|
cmd=step["cmd"],
|
117
|
-
workdir=Path(self.source_dir /
|
122
|
+
workdir=Path(self.source_dir / self.workdir),
|
118
123
|
env=environment,
|
119
124
|
)
|
120
125
|
|
primitive/agent/uploader.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import typing
|
2
2
|
import shutil
|
3
|
+
import os
|
3
4
|
from loguru import logger
|
4
5
|
from pathlib import Path, PurePath
|
5
6
|
from ..utils.cache import get_artifacts_cache
|
@@ -33,14 +34,26 @@ class Uploader:
|
|
33
34
|
for job_cache in subdirs:
|
34
35
|
job_run_id = job_cache.name
|
35
36
|
|
36
|
-
files =
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
37
|
+
files = None
|
38
|
+
has_walk = getattr(job_cache, "walk", None)
|
39
|
+
if has_walk:
|
40
|
+
files = sorted(
|
41
|
+
[
|
42
|
+
w_path / file
|
43
|
+
for w_path, _, w_files in job_cache.walk()
|
44
|
+
for file in w_files
|
45
|
+
],
|
46
|
+
key=lambda p: p.stat().st_size,
|
47
|
+
)
|
48
|
+
else:
|
49
|
+
files = sorted(
|
50
|
+
[
|
51
|
+
Path(Path(w_path) / file)
|
52
|
+
for w_path, _, w_files in os.walk(job_cache)
|
53
|
+
for file in w_files
|
54
|
+
],
|
55
|
+
key=lambda p: p.stat().st_size,
|
56
|
+
)
|
44
57
|
|
45
58
|
file_ids = []
|
46
59
|
for file in files:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: primitive
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.57
|
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,4 +1,4 @@
|
|
1
|
-
primitive/__about__.py,sha256=
|
1
|
+
primitive/__about__.py,sha256=LQN9vk9uq3Gl6JCwiPoXCjz8HPrZ4CCKTZ5dYftcQMw,130
|
2
2
|
primitive/__init__.py,sha256=bwKdgggKNVssJFVPfKSxqFMz4IxSr54WWbmiZqTMPNI,106
|
3
3
|
primitive/cli.py,sha256=VQPSewC6ouGdEG9W1gllawGJTydpOY0Lzg7LURXcqQg,2374
|
4
4
|
primitive/client.py,sha256=vSJkifx450czuLvu0f2o-viSCC0p2f1UicA-2P5cJAw,2188
|
@@ -6,8 +6,8 @@ primitive/agent/actions.py,sha256=m1FGvtOHdrZRP-YC31bFoUj-ZunXlFFW4NnPH9Bpzc0,54
|
|
6
6
|
primitive/agent/commands.py,sha256=-dVDilELfkGfbZB7qfEPs77Dm1oT62qJj4tsIk4KoxI,254
|
7
7
|
primitive/agent/process.py,sha256=2ZY3YoJHvoukrsCAZIt-AF2YKY4HEO5_jWji5K3W9fM,2267
|
8
8
|
primitive/agent/provision.py,sha256=3EEzOV-ria6zf-pvfNddad1lzzd1QmfKInTIjmwX71Y,1673
|
9
|
-
primitive/agent/runner.py,sha256=
|
10
|
-
primitive/agent/uploader.py,sha256=
|
9
|
+
primitive/agent/runner.py,sha256=6hbDjww7L0mZv_Ag_BJ2Q9QU5Ihyi0935PpUYoYiqJM,6769
|
10
|
+
primitive/agent/uploader.py,sha256=5ZxonvRlMGRVBYx3hPEaWiPio5lMPi_zhtxz64V5S-A,2379
|
11
11
|
primitive/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
12
|
primitive/auth/actions.py,sha256=2vZEC3LLAXj6eBBmt_2OEDEcBIb3uLkkNjgbZTIaQsY,1095
|
13
13
|
primitive/auth/commands.py,sha256=JahUq0E2e7Xa-FX1WEUv7TgM6ieDvNH4VwRRtxAW7HE,2340
|
@@ -46,8 +46,8 @@ primitive/utils/memory_size.py,sha256=4xfha21kW82nFvOTtDFx9Jk2ZQoEhkfXii-PGNTpIU
|
|
46
46
|
primitive/utils/printer.py,sha256=f1XUpqi5dkTL3GWvYRUGlSwtj2IxU1q745T4Fxo7Tn4,370
|
47
47
|
primitive/utils/shell.py,sha256=-7UjQaBqSGHzEEyX8pNjeYFFP0P3lVnDV0OkgPz1qHU,1050
|
48
48
|
primitive/utils/verible.py,sha256=r7c_hfqvL0UicMmIzK3Cy_BfZI1ZpcfBeLqKEWFWqJo,2252
|
49
|
-
primitive-0.1.
|
50
|
-
primitive-0.1.
|
51
|
-
primitive-0.1.
|
52
|
-
primitive-0.1.
|
53
|
-
primitive-0.1.
|
49
|
+
primitive-0.1.57.dist-info/METADATA,sha256=j82RnR6qXihnzfjwwweYOx_TwtLapLCOQpAkqqaWeuU,3782
|
50
|
+
primitive-0.1.57.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
51
|
+
primitive-0.1.57.dist-info/entry_points.txt,sha256=p1K8DMCWka5FqLlqP1sPek5Uovy9jq8u51gUsP-z334,48
|
52
|
+
primitive-0.1.57.dist-info/licenses/LICENSE.txt,sha256=B8kmQMJ2sxYygjCLBk770uacaMci4mPSoJJ8WoDBY_c,1098
|
53
|
+
primitive-0.1.57.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|