primitive 0.1.77__tar.gz → 0.1.79__tar.gz
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-0.1.77 → primitive-0.1.79}/PKG-INFO +1 -1
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/__about__.py +1 -1
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/agent/runner.py +32 -36
- {primitive-0.1.77 → primitive-0.1.79}/.git-hooks/pre-commit +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/.gitattributes +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/.github/workflows/lint.yml +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/.github/workflows/publish.yml +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/.gitignore +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/.vscode/settings.json +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/LICENSE.txt +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/Makefile +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/README.md +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/linux setup.md +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/pyproject.toml +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/agent/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/agent/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/agent/commands.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/agent/process.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/agent/provision.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/agent/uploader.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/auth/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/auth/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/auth/commands.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/auth/graphql/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/auth/graphql/queries.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/cli.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/client.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/daemons/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/daemons/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/daemons/commands.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/daemons/launch_agents.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/daemons/launch_service.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/exec/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/exec/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/exec/commands.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/exec/interactive.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/files/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/files/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/files/commands.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/files/graphql/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/files/graphql/fragments.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/files/graphql/mutations.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/files/graphql/queries.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/git/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/git/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/git/commands.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/git/graphql/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/git/graphql/queries.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/graphql/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/graphql/relay.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/graphql/sdk.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/graphql/utility_fragments.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/hardware/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/hardware/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/hardware/commands.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/hardware/graphql/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/hardware/graphql/fragments.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/hardware/graphql/mutations.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/hardware/graphql/queries.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/jobs/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/jobs/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/jobs/commands.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/jobs/graphql/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/jobs/graphql/fragments.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/jobs/graphql/mutations.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/jobs/graphql/queries.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/organizations/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/organizations/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/organizations/commands.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/organizations/graphql/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/organizations/graphql/fragments.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/organizations/graphql/mutations.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/organizations/graphql/queries.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/projects/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/projects/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/projects/commands.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/projects/graphql/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/projects/graphql/fragments.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/projects/graphql/mutations.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/projects/graphql/queries.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/provisioning/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/provisioning/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/provisioning/graphql/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/provisioning/graphql/queries.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/reservations/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/reservations/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/reservations/commands.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/reservations/graphql/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/reservations/graphql/fragments.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/reservations/graphql/mutations.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/reservations/graphql/queries.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/utils/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/utils/actions.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/utils/auth.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/utils/cache.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/utils/chunk_size.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/utils/config.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/utils/files.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/utils/git.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/utils/memory_size.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/utils/printer.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/utils/shell.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/src/primitive/utils/verible.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/tests/__init__.py +0 -0
- {primitive-0.1.77 → primitive-0.1.79}/uv.lock +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: primitive
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.79
|
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
|
@@ -48,7 +48,6 @@ class AgentRunner:
|
|
48
48
|
job_slug: str,
|
49
49
|
max_log_size: int = 10 * 1024 * 1024,
|
50
50
|
log_to_file: bool = True,
|
51
|
-
job: Optional[JobDescription] = None,
|
52
51
|
) -> None:
|
53
52
|
self.primitive = primitive
|
54
53
|
self.source_dir = source_dir
|
@@ -69,37 +68,33 @@ class AgentRunner:
|
|
69
68
|
format=AgentRunner.log_serializer(),
|
70
69
|
)
|
71
70
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
yaml_file = Path(self.source_dir / ".primitive" / f"{self.job_slug}.yaml")
|
76
|
-
yml_file = Path(self.source_dir / ".primitive" / f"{self.job_slug}.yml")
|
71
|
+
logger.info(f"Scanning directory for job file {self.job_slug}")
|
72
|
+
yaml_file = Path(self.source_dir / ".primitive" / f"{self.job_slug}.yaml")
|
73
|
+
yml_file = Path(self.source_dir / ".primitive" / f"{self.job_slug}.yml")
|
77
74
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
if yaml_file.exists():
|
88
|
-
self.job = yaml.load(open(yaml_file, "r"), Loader=Loader)
|
89
|
-
elif yml_file.exists():
|
90
|
-
self.job = yaml.load(open(yml_file, "r"), Loader=Loader)
|
91
|
-
else:
|
92
|
-
logger.error(
|
93
|
-
f"No job description with matching slug '{self.job_slug}' found"
|
94
|
-
)
|
95
|
-
self.primitive.jobs.job_run_update(
|
96
|
-
self.job_id, status="request_completed", conclusion="failure"
|
97
|
-
)
|
98
|
-
raise FileNotFoundError
|
75
|
+
if yaml_file.exists() and yml_file.exists():
|
76
|
+
logger.error(
|
77
|
+
f"Found two job descriptions with the same slug: {self.job_slug}"
|
78
|
+
)
|
79
|
+
self.primitive.jobs.job_run_update(
|
80
|
+
self.job_id, status="request_completed", conclusion="failure"
|
81
|
+
)
|
82
|
+
raise FileExistsError
|
99
83
|
|
100
|
-
|
84
|
+
if yaml_file.exists():
|
85
|
+
self.job = yaml.load(open(yaml_file, "r"), Loader=Loader)
|
86
|
+
elif yml_file.exists():
|
87
|
+
self.job = yaml.load(open(yml_file, "r"), Loader=Loader)
|
101
88
|
else:
|
102
|
-
|
89
|
+
logger.error(
|
90
|
+
f"No job description with matching slug '{self.job_slug}' found"
|
91
|
+
)
|
92
|
+
self.primitive.jobs.job_run_update(
|
93
|
+
self.job_id, status="request_completed", conclusion="failure"
|
94
|
+
)
|
95
|
+
raise FileNotFoundError
|
96
|
+
|
97
|
+
logger.info(f"Found job description for {self.job_slug}")
|
103
98
|
|
104
99
|
@staticmethod
|
105
100
|
def log_serializer() -> Callable:
|
@@ -199,13 +194,14 @@ class AgentRunner:
|
|
199
194
|
)
|
200
195
|
logger.error(f"{self.job_slug} concluded with error(s)")
|
201
196
|
return
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
197
|
+
|
198
|
+
# TODO: Remove this for now until we have a setting to enable log parsing
|
199
|
+
# if total_job_errors > 0:
|
200
|
+
# self.primitive.jobs.job_run_update(
|
201
|
+
# self.job_id, status="request_completed", conclusion="failure"
|
202
|
+
# )
|
203
|
+
# logger.error(f"{self.job_slug} concluded with error(s)")
|
204
|
+
# return
|
209
205
|
|
210
206
|
self.primitive.jobs.job_run_update(
|
211
207
|
self.job_id, status="request_completed", conclusion="success"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|