arkitekt-next 0.8.13__py3-none-any.whl → 0.8.15__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.
Potentially problematic release.
This version of arkitekt-next might be problematic. Click here for more details.
- arkitekt_next/cli/commands/kabinet/publish.py +2 -2
- arkitekt_next/cli/io.py +25 -12
- arkitekt_next/cli/types.py +2 -3
- {arkitekt_next-0.8.13.dist-info → arkitekt_next-0.8.15.dist-info}/METADATA +1 -1
- {arkitekt_next-0.8.13.dist-info → arkitekt_next-0.8.15.dist-info}/RECORD +8 -8
- {arkitekt_next-0.8.13.dist-info → arkitekt_next-0.8.15.dist-info}/LICENSE +0 -0
- {arkitekt_next-0.8.13.dist-info → arkitekt_next-0.8.15.dist-info}/WHEEL +0 -0
- {arkitekt_next-0.8.13.dist-info → arkitekt_next-0.8.15.dist-info}/entry_points.txt +0 -0
|
@@ -23,11 +23,11 @@ def check_if_build_already_deployed(build: Build) -> None:
|
|
|
23
23
|
A click exception if the manifest has already been deployed
|
|
24
24
|
"""
|
|
25
25
|
config = get_deployments()
|
|
26
|
-
for deployment in config.
|
|
26
|
+
for deployment in config.app_images:
|
|
27
27
|
if (
|
|
28
28
|
deployment.manifest.identifier == build.manifest.identifier
|
|
29
29
|
and deployment.manifest.version == build.manifest.version
|
|
30
|
-
and deployment.
|
|
30
|
+
and deployment.flavour_name == build.flavour
|
|
31
31
|
):
|
|
32
32
|
raise click.ClickException(
|
|
33
33
|
f"Deployment of {build.manifest.identifier}/{build.manifest.version} in the {build.flavour} flavour already exists."
|
arkitekt_next/cli/io.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
import uuid
|
|
1
3
|
from arkitekt_next.utils import create_arkitekt_next_folder
|
|
2
4
|
import os
|
|
3
5
|
from typing import Optional, List, Dict
|
|
@@ -8,7 +10,7 @@ from arkitekt_next.cli.types import (
|
|
|
8
10
|
Flavour,
|
|
9
11
|
DeploymentsConfigFile,
|
|
10
12
|
)
|
|
11
|
-
from kabinet.api.schema import InspectionInput, AppImageInput
|
|
13
|
+
from kabinet.api.schema import InspectionInput, AppImageInput, DockerImageInput, ManifestInput
|
|
12
14
|
|
|
13
15
|
import yaml
|
|
14
16
|
import json
|
|
@@ -114,6 +116,18 @@ def get_builds(selected_run: Optional[str] = None) -> Dict[str, Build]:
|
|
|
114
116
|
)
|
|
115
117
|
|
|
116
118
|
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def manifest_to_input(manifest: Manifest) -> ManifestInput:
|
|
122
|
+
|
|
123
|
+
return ManifestInput(**manifest.model_dump(by_alias=True))
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
117
131
|
def generate_build(
|
|
118
132
|
build_run: str,
|
|
119
133
|
build_id: str,
|
|
@@ -147,7 +161,7 @@ def generate_build(
|
|
|
147
161
|
config_file = os.path.join(path, "builds.yaml")
|
|
148
162
|
|
|
149
163
|
build = Build(
|
|
150
|
-
manifest=manifest,
|
|
164
|
+
manifest=manifest_to_input(manifest),
|
|
151
165
|
flavour=flavour_name,
|
|
152
166
|
selectors=flavour.selectors,
|
|
153
167
|
build_id=build_id,
|
|
@@ -225,24 +239,23 @@ def generate_deployment(
|
|
|
225
239
|
|
|
226
240
|
config_file = os.path.join(path, "deployments.yaml")
|
|
227
241
|
|
|
228
|
-
|
|
229
|
-
|
|
242
|
+
app_image = AppImageInput(
|
|
243
|
+
appImageId=uuid.uuid4().hex,
|
|
230
244
|
manifest=build.manifest,
|
|
231
|
-
|
|
245
|
+
flavourName=build.flavour,
|
|
232
246
|
selectors=build.selectors,
|
|
233
247
|
inspection=build.inspection,
|
|
234
|
-
image=image,
|
|
248
|
+
image=DockerImageInput(imageString=image, buildAt=datetime.datetime.now()),
|
|
249
|
+
|
|
235
250
|
)
|
|
236
251
|
|
|
237
252
|
if os.path.exists(config_file):
|
|
238
253
|
with open(config_file, "r") as file:
|
|
239
254
|
config = DeploymentsConfigFile(**yaml.safe_load(file))
|
|
240
|
-
config.app_images.append(
|
|
241
|
-
config.latest_app_image =
|
|
255
|
+
config.app_images.append(app_image)
|
|
256
|
+
config.latest_app_image = app_image.app_image_id
|
|
242
257
|
else:
|
|
243
|
-
config = DeploymentsConfigFile(
|
|
244
|
-
config.app_images = deployment_run
|
|
245
|
-
config.latest_app_image = deployment.release_id
|
|
258
|
+
config = DeploymentsConfigFile(app_images=[app_image], latest_app_image=app_image.app_image_id)
|
|
246
259
|
|
|
247
260
|
with open(config_file, "w") as file:
|
|
248
261
|
yaml.safe_dump(
|
|
@@ -251,4 +264,4 @@ def generate_deployment(
|
|
|
251
264
|
sort_keys=True,
|
|
252
265
|
)
|
|
253
266
|
|
|
254
|
-
return
|
|
267
|
+
return app_image
|
arkitekt_next/cli/types.py
CHANGED
|
@@ -9,7 +9,7 @@ from arkitekt_next.base_models import Requirement
|
|
|
9
9
|
from string import Formatter
|
|
10
10
|
import os
|
|
11
11
|
|
|
12
|
-
from kabinet.api.schema import AppImageInput, InspectionInput, SelectorInput
|
|
12
|
+
from kabinet.api.schema import AppImageInput, InspectionInput, SelectorInput, ManifestInput
|
|
13
13
|
from rekuest_next.api.schema import TemplateInput
|
|
14
14
|
|
|
15
15
|
ALLOWED_BUILDER_KEYS = [
|
|
@@ -40,7 +40,6 @@ class Manifest(BaseModel):
|
|
|
40
40
|
logo: Optional[str] = None
|
|
41
41
|
entrypoint: str
|
|
42
42
|
scopes: List[str]
|
|
43
|
-
created_at: datetime.datetime = Field(default_factory=datetime.datetime.now)
|
|
44
43
|
|
|
45
44
|
@field_validator("version", mode="before")
|
|
46
45
|
def version_must_be_semver(cls, v) -> str:
|
|
@@ -143,7 +142,7 @@ class Build(BaseModel):
|
|
|
143
142
|
description: str = Field(default="")
|
|
144
143
|
selectors: List[SelectorInput] = Field(default_factory=list)
|
|
145
144
|
flavour: str = Field(default="vanilla")
|
|
146
|
-
manifest:
|
|
145
|
+
manifest: ManifestInput
|
|
147
146
|
build_at: datetime.datetime = Field(default_factory=datetime.datetime.now)
|
|
148
147
|
base_docker_command: List[str] = Field(
|
|
149
148
|
default_factory=lambda: ["docker", "run", "-it", "--net", "host"]
|
|
@@ -66,7 +66,7 @@ arkitekt_next/cli/commands/kabinet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
|
|
|
66
66
|
arkitekt_next/cli/commands/kabinet/build.py,sha256=pMVRNUdkVc-uu0YKNzKWXlDNNyAJKAaB0JuBFw0H6Uw,8697
|
|
67
67
|
arkitekt_next/cli/commands/kabinet/init.py,sha256=YcxXlMick7Xd2XUjmA9vyku0QDGACw1PEWpfJum42E8,3600
|
|
68
68
|
arkitekt_next/cli/commands/kabinet/main.py,sha256=U5EWekRTsMZZ34abWFfwilhzrd-zZtpZbl8RsLN_bC8,1008
|
|
69
|
-
arkitekt_next/cli/commands/kabinet/publish.py,sha256=
|
|
69
|
+
arkitekt_next/cli/commands/kabinet/publish.py,sha256=pbQ3QNNwSnyq06EPWfcJc_LoP9VhKo2wGBuUtNPPlV0,3572
|
|
70
70
|
arkitekt_next/cli/commands/kabinet/stage.py,sha256=bXpC8fDmG6qFQVuLhqTCieOJnvFafj3Flg1BdIeciEw,2025
|
|
71
71
|
arkitekt_next/cli/commands/kabinet/utils.py,sha256=a1lGmGwhiVxsxFDt19GddNwXmAwUAfclgTMe3ErA43c,1666
|
|
72
72
|
arkitekt_next/cli/commands/kabinet/validate.py,sha256=MSSuwjdJKDtXB6rkjRmG-PPK6cVwTcOuCRpgPDQ0uVg,2490
|
|
@@ -87,7 +87,7 @@ arkitekt_next/cli/constants.py,sha256=ONXKA8LRxXQkOQ56ZElVMZSTiaIH1LE_ikmUUKem98
|
|
|
87
87
|
arkitekt_next/cli/dockerfiles/vanilla.dockerfile,sha256=0ujdG22rZ6v2n5TMHNA4HR5f1PP9KJvAQORz-DGHBpo,184
|
|
88
88
|
arkitekt_next/cli/errors.py,sha256=zLTjaCbun6qM2nTldjyZd-DvykqKn5A3Gn80uYdx7Vc,93
|
|
89
89
|
arkitekt_next/cli/inspect.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
90
|
-
arkitekt_next/cli/io.py,sha256=
|
|
90
|
+
arkitekt_next/cli/io.py,sha256=QSnyIjPKZZ_pWp-b_hbM4XGwarCf4IYTgcXtNXBawH8,7143
|
|
91
91
|
arkitekt_next/cli/main.py,sha256=Ua7sq_OfC491F6r6zNs_oEiR4jVOsZwxLpX0ZXR0Jk0,2227
|
|
92
92
|
arkitekt_next/cli/options.py,sha256=hSKdSYabK1MuioBRUsADjQIPSp9H2YeczmcyAsFUprI,3791
|
|
93
93
|
arkitekt_next/cli/schemas/fluss.schema.graphql,sha256=MqrSpOxtWO9kWFCoUn9ySBPhIH3XozFiqrQl2zjEbiQ,35803
|
|
@@ -107,7 +107,7 @@ arkitekt_next/cli/schemas/unlok.schema.graphql,sha256=fXR846snIBIqkuQ-PlYnSkQjkF
|
|
|
107
107
|
arkitekt_next/cli/templates/filter.py,sha256=mD2jdNEXrZNagC_8WtuTisGJrGIbJDSylCvh19cF49I,650
|
|
108
108
|
arkitekt_next/cli/templates/simple.py,sha256=IbcThJ5LryXVFQUdzxfHQCtzSNxEQWTxbD__Ygxsp4M,1171
|
|
109
109
|
arkitekt_next/cli/texts.py,sha256=6qK9amHXXHRnXPOgto9QVyl3lwwmWOebL673xFfrUUk,680
|
|
110
|
-
arkitekt_next/cli/types.py,sha256=
|
|
110
|
+
arkitekt_next/cli/types.py,sha256=ryxQ7QMd8854-v4zNHq3wipRvKp20ccZyejuyUMZojk,5154
|
|
111
111
|
arkitekt_next/cli/ui.py,sha256=BR_AOsBIIHwojI5otBzT_560-ep5Dw1xAHKsO2zOOJQ,3493
|
|
112
112
|
arkitekt_next/cli/utils.py,sha256=rl1hfQIVzepLHPN_ZWuvfVH-IIVqcSfiFGyfNtL1XCo,445
|
|
113
113
|
arkitekt_next/cli/validators.py,sha256=XkLrOrDzBJwcG1keTawa_NJPt3QIBhb5KjepeH4N1KA,719
|
|
@@ -132,8 +132,8 @@ arkitekt_next/qt/utils.py,sha256=MgBPtPmCSBkIuATov3UgREESwxAHh77lWNNxyE7Qs48,773
|
|
|
132
132
|
arkitekt_next/service_registry.py,sha256=x3pzr3dJSI2hjMGNZa3F7boW-6N7K53acjdLTkg4kc8,3588
|
|
133
133
|
arkitekt_next/tqdm.py,sha256=lQcJI5Q6Py7Gy88hOCiJujjPEEGd8G2k1mOVJJ6oYe8,1531
|
|
134
134
|
arkitekt_next/utils.py,sha256=QETdzn_GIMSw6LdaXL89bqvqp9MGwEBK8Lj54MpnMwc,2396
|
|
135
|
-
arkitekt_next-0.8.
|
|
136
|
-
arkitekt_next-0.8.
|
|
137
|
-
arkitekt_next-0.8.
|
|
138
|
-
arkitekt_next-0.8.
|
|
139
|
-
arkitekt_next-0.8.
|
|
135
|
+
arkitekt_next-0.8.15.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
|
|
136
|
+
arkitekt_next-0.8.15.dist-info/METADATA,sha256=urcV36kZJp1neEtSLRiJBgmZ80TX0Q-fCd_qcFjhzfA,6062
|
|
137
|
+
arkitekt_next-0.8.15.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
138
|
+
arkitekt_next-0.8.15.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
|
|
139
|
+
arkitekt_next-0.8.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|