primitive 0.1.57__py3-none-any.whl → 0.1.58__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/actions.py +17 -12
- primitive/agent/runner.py +4 -3
- {primitive-0.1.57.dist-info → primitive-0.1.58.dist-info}/METADATA +1 -1
- {primitive-0.1.57.dist-info → primitive-0.1.58.dist-info}/RECORD +8 -8
- {primitive-0.1.57.dist-info → primitive-0.1.58.dist-info}/WHEEL +0 -0
- {primitive-0.1.57.dist-info → primitive-0.1.58.dist-info}/entry_points.txt +0 -0
- {primitive-0.1.57.dist-info → primitive-0.1.58.dist-info}/licenses/LICENSE.txt +0 -0
primitive/__about__.py
CHANGED
primitive/agent/actions.py
CHANGED
@@ -119,18 +119,23 @@ class Agent(BaseAction):
|
|
119
119
|
job_run["jobSettings"]["rootDirectory"]
|
120
120
|
)
|
121
121
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
122
|
+
try:
|
123
|
+
# Initialize Runner
|
124
|
+
runner = AgentRunner(
|
125
|
+
primitive=self.primitive,
|
126
|
+
source_dir=source_dir,
|
127
|
+
job_id=job_run["id"],
|
128
|
+
job_slug=job_run["job"]["slug"],
|
129
|
+
)
|
130
|
+
except Exception as e:
|
131
|
+
# Log Error
|
132
|
+
logger.error(f"Error initializing agent runner: {e}")
|
133
|
+
else:
|
134
|
+
# Execute job
|
135
|
+
runner.execute()
|
136
|
+
finally:
|
137
|
+
# Clean up
|
138
|
+
shutil.rmtree(path=downloaded_git_repository_dir)
|
134
139
|
|
135
140
|
sleep(5)
|
136
141
|
except KeyboardInterrupt:
|
primitive/agent/runner.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import yaml
|
2
|
-
import sys
|
3
2
|
import typing
|
4
3
|
import os
|
5
4
|
import threading
|
@@ -72,7 +71,8 @@ class AgentRunner:
|
|
72
71
|
logger.error(
|
73
72
|
f"Found two job descriptions with the same slug: {self.job_slug}"
|
74
73
|
)
|
75
|
-
|
74
|
+
self.conclude(conclusion="failure")
|
75
|
+
raise FileExistsError
|
76
76
|
|
77
77
|
if yaml_file.exists():
|
78
78
|
self.job = yaml.load(open(yaml_file, "r"), Loader=Loader)
|
@@ -82,7 +82,8 @@ class AgentRunner:
|
|
82
82
|
logger.error(
|
83
83
|
f"No job description with matching slug '{self.job_slug}' found"
|
84
84
|
)
|
85
|
-
|
85
|
+
self.conclude(conclusion="failure")
|
86
|
+
raise FileNotFoundError
|
86
87
|
|
87
88
|
logger.info(f"Found job description for {self.job_slug}")
|
88
89
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: primitive
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.58
|
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=S0YUSrE8kYLnnrDEf3Zg8iyjiV8CQb2jsfZ4uoquTtc,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
|
5
|
-
primitive/agent/actions.py,sha256=
|
5
|
+
primitive/agent/actions.py,sha256=BnGHzh63R4ST_EqEB_hYEOzVwbzEaGKOZTaZo0vb6Vg,5818
|
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=
|
9
|
+
primitive/agent/runner.py,sha256=wkvXjXxD7dg0XeZIvatpI12RSifYzRYUIL9NX42oRus,6876
|
10
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
|
@@ -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.58.dist-info/METADATA,sha256=3QDuLyoZeKRlghEHBplLVLthic-a3o64edGzI3XHmzE,3782
|
50
|
+
primitive-0.1.58.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
51
|
+
primitive-0.1.58.dist-info/entry_points.txt,sha256=p1K8DMCWka5FqLlqP1sPek5Uovy9jq8u51gUsP-z334,48
|
52
|
+
primitive-0.1.58.dist-info/licenses/LICENSE.txt,sha256=B8kmQMJ2sxYygjCLBk770uacaMci4mPSoJJ8WoDBY_c,1098
|
53
|
+
primitive-0.1.58.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|