primitive 0.1.96__py3-none-any.whl → 0.2.0__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 +4 -4
- primitive/agent/runner.py +4 -0
- primitive/hardware/actions.py +5 -2
- {primitive-0.1.96.dist-info → primitive-0.2.0.dist-info}/METADATA +1 -1
- {primitive-0.1.96.dist-info → primitive-0.2.0.dist-info}/RECORD +9 -9
- {primitive-0.1.96.dist-info → primitive-0.2.0.dist-info}/WHEEL +0 -0
- {primitive-0.1.96.dist-info → primitive-0.2.0.dist-info}/entry_points.txt +0 -0
- {primitive-0.1.96.dist-info → primitive-0.2.0.dist-info}/licenses/LICENSE.txt +0 -0
primitive/__about__.py
CHANGED
primitive/agent/actions.py
CHANGED
@@ -147,11 +147,11 @@ class Agent(BaseAction):
|
|
147
147
|
)
|
148
148
|
)
|
149
149
|
except Exception as exception:
|
150
|
-
logger.error(
|
151
|
-
f"Error downloading source: {exception}"
|
152
|
-
)
|
150
|
+
logger.error(f"Error downloading source: {exception}")
|
153
151
|
self.primitive.jobs.job_run_update(
|
154
|
-
job_run["id"],
|
152
|
+
job_run["id"],
|
153
|
+
status="request_completed",
|
154
|
+
conclusion="failure",
|
155
155
|
)
|
156
156
|
continue
|
157
157
|
|
primitive/agent/runner.py
CHANGED
@@ -140,6 +140,10 @@ class AgentRunner:
|
|
140
140
|
|
141
141
|
# Initialize the environment with the system
|
142
142
|
environment = os.environ
|
143
|
+
|
144
|
+
# Add local variables
|
145
|
+
environment["PRIMITIVE_GIT_SHA"] = str(self.job_run["gitCommit"]["sha"])
|
146
|
+
|
143
147
|
if "provision" in self.job:
|
144
148
|
logger.info(f"Provisioning for {self.job['provision']} environment")
|
145
149
|
environment = self.provision()
|
primitive/hardware/actions.py
CHANGED
@@ -405,7 +405,9 @@ class Hardware(BaseAction):
|
|
405
405
|
}
|
406
406
|
|
407
407
|
mutation = gql(hardware_checkin_mutation)
|
408
|
-
input = new_state
|
408
|
+
input = {**new_state}
|
409
|
+
if fingerprint:
|
410
|
+
input["fingerprint"] = fingerprint
|
409
411
|
variables = {"input": input}
|
410
412
|
try:
|
411
413
|
result = self.primitive.session.execute(
|
@@ -421,9 +423,10 @@ class Hardware(BaseAction):
|
|
421
423
|
logger.debug(message.get("message"))
|
422
424
|
|
423
425
|
if checkin_success:
|
424
|
-
if self.status_cache
|
426
|
+
if fingerprint in self.status_cache:
|
425
427
|
previous_status = self.status_cache[fingerprint]
|
426
428
|
else:
|
429
|
+
logger.error("No previous status found.")
|
427
430
|
previous_status = {
|
428
431
|
"isHealthy": False,
|
429
432
|
"isQuarantined": False,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: primitive
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.2.0
|
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,13 +1,13 @@
|
|
1
|
-
primitive/__about__.py,sha256=
|
1
|
+
primitive/__about__.py,sha256=KzNaisHnw0cIdduGCOLF9whKvFQkLVogdTHbwwXkmaI,129
|
2
2
|
primitive/__init__.py,sha256=bwKdgggKNVssJFVPfKSxqFMz4IxSr54WWbmiZqTMPNI,106
|
3
3
|
primitive/cli.py,sha256=CiI60bG3UZyNFuLTpchr0KeJRG5SALj455Ob11CegGE,2412
|
4
4
|
primitive/client.py,sha256=PPyIQRvKKSqCF9RRF5mJJ4Vqqolpzy1YXqffNLKIvAA,2390
|
5
5
|
primitive/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
primitive/agent/actions.py,sha256=
|
6
|
+
primitive/agent/actions.py,sha256=v7-KZQWmpAyavjv2P06rx6i7oULZcUriTr66P8j90-o,7911
|
7
7
|
primitive/agent/commands.py,sha256=-dVDilELfkGfbZB7qfEPs77Dm1oT62qJj4tsIk4KoxI,254
|
8
8
|
primitive/agent/process.py,sha256=32eoj0W1-LG-9xxeHia-jk9jTah1cnmjCYnvczgXYGU,3538
|
9
9
|
primitive/agent/provision.py,sha256=rmwnro1K5F8mwtd45XAq7RVQmpDWnbBCQ8X_qgWhm3M,1546
|
10
|
-
primitive/agent/runner.py,sha256=
|
10
|
+
primitive/agent/runner.py,sha256=v_c5DtyQNCOQzgtvHfHv3DXQcHbo-EPJaILas6xAxTA,9600
|
11
11
|
primitive/agent/uploader.py,sha256=OkgwXhWKoECOJnW_ZmpzmUS_cpb-orC_uebNcmf5byw,2948
|
12
12
|
primitive/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
primitive/auth/actions.py,sha256=MPsG9LcKcOPwA7gZ9Ewk0PZJhTQvIrGfODdz4GxSzgA,999
|
@@ -40,7 +40,7 @@ primitive/graphql/relay.py,sha256=bmij2AjdpURQ6GGVCxwWhauF-r_SxuAU2oJ4sDbLxpI,72
|
|
40
40
|
primitive/graphql/sdk.py,sha256=DBFH8vw8FAGvRy8_FZc9WcjnwaQDlXmI8fiYmhCg-b0,1458
|
41
41
|
primitive/graphql/utility_fragments.py,sha256=uIjwILC4QtWNyO5vu77VjQf_p0jvP3A9q_6zRq91zqs,303
|
42
42
|
primitive/hardware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
43
|
-
primitive/hardware/actions.py,sha256=
|
43
|
+
primitive/hardware/actions.py,sha256=4AKXGXraGwNzIzSRT5PpStLz3elc-Og2k4lKnR1NR6w,26092
|
44
44
|
primitive/hardware/android.py,sha256=tu7pBPxWFrIwb_mm5CEdFFf1_veNDOKjOCQg13i_Lh4,2758
|
45
45
|
primitive/hardware/commands.py,sha256=cWl8j0XtkXQtPHtpO_C6Gh0-dnAEysOFryf3VnDOTOo,5650
|
46
46
|
primitive/hardware/graphql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -93,8 +93,8 @@ primitive/utils/printer.py,sha256=f1XUpqi5dkTL3GWvYRUGlSwtj2IxU1q745T4Fxo7Tn4,37
|
|
93
93
|
primitive/utils/shell.py,sha256=vpjr2Y7UQGYOvPGa6_RYXPPjqScfa9k7kT3tugF9h4Y,1837
|
94
94
|
primitive/utils/text.py,sha256=XiESMnlhjQ534xE2hMNf08WehE1SKaYFRNih0MmnK0k,829
|
95
95
|
primitive/utils/verible.py,sha256=Zb5NUISvcaIgEvgCDBWr-GCoceMa79Tcwvr5Wl9lfnA,2252
|
96
|
-
primitive-0.
|
97
|
-
primitive-0.
|
98
|
-
primitive-0.
|
99
|
-
primitive-0.
|
100
|
-
primitive-0.
|
96
|
+
primitive-0.2.0.dist-info/METADATA,sha256=nN1iERiiMX6Q4v5Iu8YXmRKYIgNB9BRpKMKfrcCSwSc,3669
|
97
|
+
primitive-0.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
98
|
+
primitive-0.2.0.dist-info/entry_points.txt,sha256=p1K8DMCWka5FqLlqP1sPek5Uovy9jq8u51gUsP-z334,48
|
99
|
+
primitive-0.2.0.dist-info/licenses/LICENSE.txt,sha256=B8kmQMJ2sxYygjCLBk770uacaMci4mPSoJJ8WoDBY_c,1098
|
100
|
+
primitive-0.2.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|