peak-sdk 1.12.0__py3-none-any.whl → 1.14.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.
- peak/_metadata.py +3 -0
- peak/_version.py +1 -1
- peak/cli/press/apps/deployments.py +12 -6
- peak/cli/press/apps/specs.py +20 -0
- peak/cli/press/blocks/deployments.py +5 -6
- peak/cli/press/deployments.py +49 -3
- peak/cli/resources/alerts/emails.py +8 -4
- peak/cli/resources/artifacts.py +6 -0
- peak/handler.py +56 -16
- peak/metrics/metrics.py +1 -1
- peak/press/apps.py +100 -5
- peak/press/deployments.py +35 -0
- peak/resources/alerts.py +10 -2
- peak/resources/artifacts.py +39 -3
- peak/sample_yaml/press/apps/deployments/create_app_deployment.yaml +12 -0
- peak/sample_yaml/press/apps/deployments/create_app_deployment_revision.yaml +12 -0
- peak/sample_yaml/press/apps/specs/create_app_spec.yaml +63 -0
- peak/sample_yaml/press/apps/specs/create_app_spec_release.yaml +63 -0
- peak/sample_yaml/press/blocks/specs/service/api/create_block_spec.yaml +28 -28
- peak/sample_yaml/press/blocks/specs/service/api/create_block_spec_release.yaml +28 -28
- peak/sample_yaml/press/blocks/specs/service/webapp/create_block_spec.yaml +28 -28
- peak/sample_yaml/press/blocks/specs/service/webapp/create_block_spec_release.yaml +28 -28
- peak/sample_yaml/press/blocks/specs/workflow/create_block_spec.yaml +32 -32
- peak/sample_yaml/press/blocks/specs/workflow/create_block_spec_release.yaml +32 -32
- peak/sample_yaml/press/patch_parameters.yaml +9 -0
- peak/sample_yaml/resources/artifacts/create_artifact.yaml +3 -0
- peak/sample_yaml/resources/artifacts/create_artifact_version.yaml +2 -0
- peak/sample_yaml/resources/emails/send_email.yaml +3 -0
- peak/session.py +4 -1
- peak/telemetry.py +4 -1
- {peak_sdk-1.12.0.dist-info → peak_sdk-1.14.0.dist-info}/METADATA +3 -3
- {peak_sdk-1.12.0.dist-info → peak_sdk-1.14.0.dist-info}/RECORD +35 -34
- {peak_sdk-1.12.0.dist-info → peak_sdk-1.14.0.dist-info}/LICENSE +0 -0
- {peak_sdk-1.12.0.dist-info → peak_sdk-1.14.0.dist-info}/WHEEL +0 -0
- {peak_sdk-1.12.0.dist-info → peak_sdk-1.14.0.dist-info}/entry_points.txt +0 -0
peak/press/apps.py
CHANGED
@@ -147,6 +147,7 @@ class App(BaseClient):
|
|
147
147
|
featured: Optional[bool] = None,
|
148
148
|
scope: Optional[str] = None,
|
149
149
|
tenants: Optional[List[str]] = None,
|
150
|
+
parameters: Optional[Dict[str, List[Dict[str, Any]]]] = None,
|
150
151
|
) -> Dict[str, str]:
|
151
152
|
"""Creates a new App spec.
|
152
153
|
|
@@ -166,6 +167,10 @@ class App(BaseClient):
|
|
166
167
|
and `shared` allows specifying what set of tenants can access and use this spec.
|
167
168
|
By default it is `private`.
|
168
169
|
tenants (List[str] | None): Given a shared scope, specify what other tenants can discover and deploy this spec.
|
170
|
+
parameters (Optional[Dict[str, List[Dict[str, Any]]]]): A dictionary containing optional keys `build` and `run`. The structure of the dictionary is as follows:
|
171
|
+
|
172
|
+
- `build` (List[Dict[str, Any]], optional): A list of parameter objects, the values of which will be given and used at deployment time.
|
173
|
+
- `run` (List[Dict[str, Any]], optional): A list of parameter objects, the values of which will be given at deployment time and will be used at run time.
|
169
174
|
|
170
175
|
Returns:
|
171
176
|
Dict[str, str]: Id of the created app spec.
|
@@ -203,6 +208,37 @@ class App(BaseClient):
|
|
203
208
|
}
|
204
209
|
]
|
205
210
|
}
|
211
|
+
SCHEMA(Parameters):
|
212
|
+
The valid types for parameters are `boolean`, `string`, `string_array`, `number`, `number_array`, `object` and `object_array`.
|
213
|
+
|
214
|
+
.. code-block:: json
|
215
|
+
|
216
|
+
{
|
217
|
+
"build": [
|
218
|
+
{
|
219
|
+
"name": "string(required)",
|
220
|
+
"type": "string(required)",
|
221
|
+
"required": "boolean(required)",
|
222
|
+
"description": "string",
|
223
|
+
"defaultValue": "string(required)",
|
224
|
+
"title": "string",
|
225
|
+
"options": "list(str)",
|
226
|
+
"hideValue": "boolean",
|
227
|
+
}
|
228
|
+
],
|
229
|
+
"run": [
|
230
|
+
{
|
231
|
+
"name": "string(required)",
|
232
|
+
"type": "string(required)",
|
233
|
+
"required": "boolean(required)",
|
234
|
+
"description": "string",
|
235
|
+
"defaultValue": "string(required)",
|
236
|
+
"title": "string",
|
237
|
+
"options": "list(str)",
|
238
|
+
"hideValue": "boolean",
|
239
|
+
}
|
240
|
+
]
|
241
|
+
}
|
206
242
|
|
207
243
|
Raises:
|
208
244
|
BadRequestException: The given parameters are invalid.
|
@@ -218,6 +254,7 @@ class App(BaseClient):
|
|
218
254
|
"spec": json.dumps(body),
|
219
255
|
"featured": json.dumps(featured),
|
220
256
|
"scope": scope,
|
257
|
+
"parameters": json.dumps(parameters),
|
221
258
|
}
|
222
259
|
|
223
260
|
if tenants:
|
@@ -319,7 +356,12 @@ class App(BaseClient):
|
|
319
356
|
subdomain="press",
|
320
357
|
)
|
321
358
|
|
322
|
-
def create_spec_release(
|
359
|
+
def create_spec_release(
|
360
|
+
self,
|
361
|
+
spec_id: str,
|
362
|
+
body: Dict[str, Any],
|
363
|
+
parameters: Optional[Dict[str, List[Dict[str, Any]]]] = None,
|
364
|
+
) -> Dict[str, str]:
|
323
365
|
"""Publish a new release to an existing App spec.
|
324
366
|
|
325
367
|
Spec details (Block spec ID and Release version) needs to be added to the `config` key.
|
@@ -331,6 +373,10 @@ class App(BaseClient):
|
|
331
373
|
Args:
|
332
374
|
spec_id (str): Id of the spec in which new release will be created
|
333
375
|
body (Dict[str, Any]): Dictionary containing updated release and config in the expected format.
|
376
|
+
parameters (Optional[Dict[str, List[Dict[str, Any]]]]): A dictionary containing optional keys `build` and `run`. The structure of the dictionary is as follows:
|
377
|
+
|
378
|
+
- `build` (List[Dict[str, Any]], optional): A list of parameter objects, the values of which will be given and used at deployment time.
|
379
|
+
- `run` (List[Dict[str, Any]], optional): A list of parameter objects, the values of which will be given at deployment time and will be used at run time.
|
334
380
|
|
335
381
|
Returns:
|
336
382
|
Dict[str, str]: Dictionary containing spec id and release version
|
@@ -354,6 +400,36 @@ class App(BaseClient):
|
|
354
400
|
}
|
355
401
|
}
|
356
402
|
|
403
|
+
SCHEMA(Parameters):
|
404
|
+
The valid types for parameters are `boolean`, `string`, `string_array`, `number`, `number_array`, `object` and `object_array`.
|
405
|
+
|
406
|
+
.. code-block:: json
|
407
|
+
|
408
|
+
{
|
409
|
+
"build": [
|
410
|
+
{
|
411
|
+
"defaultValue": "string(required)",
|
412
|
+
"description": "string",
|
413
|
+
"hideValue": "boolean",
|
414
|
+
"name": "string(required)",
|
415
|
+
"required": "boolean(required)",
|
416
|
+
"title": "string",
|
417
|
+
"type": "string(required)",
|
418
|
+
}
|
419
|
+
],
|
420
|
+
"run": [
|
421
|
+
{
|
422
|
+
"defaultValue": "string(required)",
|
423
|
+
"description": "string",
|
424
|
+
"hideValue": "boolean",
|
425
|
+
"name": "string(required)",
|
426
|
+
"required": "boolean(required)",
|
427
|
+
"title": "string",
|
428
|
+
"type": "string(required)",
|
429
|
+
}
|
430
|
+
]
|
431
|
+
}
|
432
|
+
|
357
433
|
Raises:
|
358
434
|
BadRequestException: The given parameters are invalid.
|
359
435
|
UnauthorizedException: The credentials are invalid.
|
@@ -369,7 +445,10 @@ class App(BaseClient):
|
|
369
445
|
endpoint,
|
370
446
|
method,
|
371
447
|
content_type=ContentType.APPLICATION_JSON,
|
372
|
-
body=
|
448
|
+
body={
|
449
|
+
**body,
|
450
|
+
"parameters": parameters,
|
451
|
+
},
|
373
452
|
subdomain="press",
|
374
453
|
)
|
375
454
|
|
@@ -517,7 +596,7 @@ class App(BaseClient):
|
|
517
596
|
subdomain="press",
|
518
597
|
)
|
519
598
|
|
520
|
-
def create_deployment(self, body: Dict[str,
|
599
|
+
def create_deployment(self, body: Dict[str, Any]) -> Dict[str, str]:
|
521
600
|
"""Creates a new deployment from App spec.
|
522
601
|
|
523
602
|
Uses the latest spec release if release version is not provided.
|
@@ -548,6 +627,14 @@ class App(BaseClient):
|
|
548
627
|
],
|
549
628
|
"title": "string"
|
550
629
|
},
|
630
|
+
"appParameters": {
|
631
|
+
"build": {
|
632
|
+
"param_name": "param_value (string | number | boolean | array)"
|
633
|
+
},
|
634
|
+
"run": {
|
635
|
+
"param_name": "param_value (string | number | boolean | array)"
|
636
|
+
}
|
637
|
+
},
|
551
638
|
"parameters": {
|
552
639
|
"spec_name": {
|
553
640
|
"build": {
|
@@ -772,7 +859,7 @@ class App(BaseClient):
|
|
772
859
|
subdomain="press",
|
773
860
|
)
|
774
861
|
|
775
|
-
def create_deployment_revision(self, deployment_id: str, body: Dict[str,
|
862
|
+
def create_deployment_revision(self, deployment_id: str, body: Dict[str, Any]) -> Dict[str, str]:
|
776
863
|
"""Creates a new Revision of a Deployment, from a selected App Spec Release.
|
777
864
|
|
778
865
|
Publish a new revision of an App Deployment. The payload must specify the release version of the parent spec that you wish to use (if one is not provided, the latest available will be used),
|
@@ -798,6 +885,14 @@ class App(BaseClient):
|
|
798
885
|
"revision": {
|
799
886
|
"notes": "string",
|
800
887
|
},
|
888
|
+
"appParameters": {
|
889
|
+
"build": {
|
890
|
+
"param_name": "param_value (string | number | boolean | array)"
|
891
|
+
},
|
892
|
+
"run": {
|
893
|
+
"param_name": "param_value (string | number | boolean | array)"
|
894
|
+
}
|
895
|
+
},
|
801
896
|
"parameters": {
|
802
897
|
"block-name-1":{
|
803
898
|
"build": {
|
@@ -984,7 +1079,7 @@ class App(BaseClient):
|
|
984
1079
|
"summary": "string",
|
985
1080
|
"tags": [
|
986
1081
|
{
|
987
|
-
|
1082
|
+
"name": "string",
|
988
1083
|
}
|
989
1084
|
],
|
990
1085
|
"title": "string",
|
peak/press/deployments.py
CHANGED
@@ -153,6 +153,41 @@ class Deployment(BaseClient):
|
|
153
153
|
subdomain="press",
|
154
154
|
)
|
155
155
|
|
156
|
+
def patch_parameters(
|
157
|
+
self,
|
158
|
+
deployment_id: str,
|
159
|
+
body: Dict[str, Any],
|
160
|
+
) -> Dict[str, Any]:
|
161
|
+
"""Get the parameters for a deployment at run time.
|
162
|
+
|
163
|
+
REFERENCE:
|
164
|
+
🔗 `API Documentation <https://press.peak.ai/api-docs/index.htm#/Deployment%20Parameters/patch_v1_deployments__deploymentId__parameters_run>`__
|
165
|
+
|
166
|
+
Args:
|
167
|
+
deployment_id (str): The ID of the deployment.
|
168
|
+
body (Dict[str, Any]): Dictionary containing the updated parameters.
|
169
|
+
|
170
|
+
Returns:
|
171
|
+
Dict[str, Any]: Dictionary containing the updated parameters.
|
172
|
+
|
173
|
+
Raises:
|
174
|
+
BadRequestException: The given parameters are invalid.
|
175
|
+
UnauthorizedException: The credentials are invalid.
|
176
|
+
ForbiddenException: The user does not have permission to perform the operation.
|
177
|
+
NotFoundException: The given deployment does not exist.
|
178
|
+
InternalServerErrorException: The server encountered an unexpected condition that
|
179
|
+
prevented it from fulfilling the request.
|
180
|
+
"""
|
181
|
+
method, endpoint = HttpMethods.PATCH, f"v1/deployments/{deployment_id}/parameters/run"
|
182
|
+
|
183
|
+
return self.session.create_request( # type: ignore[no-any-return]
|
184
|
+
endpoint,
|
185
|
+
method,
|
186
|
+
body=body,
|
187
|
+
content_type=ContentType.APPLICATION_JSON,
|
188
|
+
subdomain="press",
|
189
|
+
)
|
190
|
+
|
156
191
|
|
157
192
|
def get_client(session: Optional[Session] = None) -> Deployment:
|
158
193
|
"""Returns a Deployment client.
|
peak/resources/alerts.py
CHANGED
@@ -23,6 +23,7 @@
|
|
23
23
|
|
24
24
|
from __future__ import annotations
|
25
25
|
|
26
|
+
import json
|
26
27
|
from typing import Any, Dict, Iterator, List, Literal, Optional, overload
|
27
28
|
|
28
29
|
from peak.base_client import BaseClient
|
@@ -126,6 +127,7 @@ class Alert(BaseClient):
|
|
126
127
|
def send_email(
|
127
128
|
self,
|
128
129
|
body: Dict[str, Any],
|
130
|
+
attachments: Optional[list[str]] = None,
|
129
131
|
) -> Dict[str, Any]:
|
130
132
|
"""Send an email to the specified recipients using the specified template.
|
131
133
|
|
@@ -134,6 +136,8 @@ class Alert(BaseClient):
|
|
134
136
|
|
135
137
|
Args:
|
136
138
|
body (Dict[str, Any]): A dictionary containing the details of the email to send.
|
139
|
+
attachments (Optional[list[str]]): A list of file paths to attach to the email.
|
140
|
+
When a directory is provided, a zip is automatically created for the same.
|
137
141
|
|
138
142
|
Returns:
|
139
143
|
Dict[str, Any]: A dictionary containing the ID of the email sent.
|
@@ -161,11 +165,15 @@ class Alert(BaseClient):
|
|
161
165
|
"""
|
162
166
|
method, endpoint = HttpMethods.POST, f"{self.BASE_ENDPOINT}/emails"
|
163
167
|
|
168
|
+
parsed_body = {k: json.dumps(v) if not isinstance(v, str) else v for (k, v) in body.items()}
|
169
|
+
|
164
170
|
return self.session.create_request( # type: ignore[no-any-return]
|
165
171
|
endpoint,
|
166
172
|
method,
|
167
|
-
body=
|
168
|
-
content_type=ContentType.
|
173
|
+
body=parsed_body,
|
174
|
+
content_type=ContentType.MULTIPART_FORM_DATA,
|
175
|
+
path=attachments,
|
176
|
+
file_key="attachments",
|
169
177
|
)
|
170
178
|
|
171
179
|
def describe_email(self, email_id: int) -> Dict[str, Any]:
|
peak/resources/artifacts.py
CHANGED
@@ -19,12 +19,14 @@
|
|
19
19
|
# # along with this program. If not, see <https://apache.org/licenses/LICENSE-2.0>
|
20
20
|
#
|
21
21
|
"""Artifact client module."""
|
22
|
+
|
22
23
|
from __future__ import annotations
|
23
24
|
|
24
25
|
from typing import Any, Dict, Iterator, List, Literal, Optional, overload
|
25
26
|
|
26
27
|
from peak.base_client import BaseClient
|
27
28
|
from peak.constants import ArtifactInfo, ContentType, HttpMethods
|
29
|
+
from peak.helpers import parse_body_for_multipart_request
|
28
30
|
from peak.session import Session
|
29
31
|
|
30
32
|
|
@@ -104,6 +106,9 @@ class Artifact(BaseClient):
|
|
104
106
|
name: str,
|
105
107
|
artifact: ArtifactInfo,
|
106
108
|
description: Optional[str] = None,
|
109
|
+
source: Optional[str] = None,
|
110
|
+
scan: Optional[bool] = None,
|
111
|
+
validate: Optional[bool] = None,
|
107
112
|
) -> Dict[str, Any]:
|
108
113
|
"""Create a new artifact.
|
109
114
|
|
@@ -115,6 +120,9 @@ class Artifact(BaseClient):
|
|
115
120
|
artifact (ArtifactInfo): Mapping of artifact attributes that specifies how the artifact will be generated,
|
116
121
|
it accepts two keys `path`, which is required and `ignore_files` which is optional, and defaults to `.dockerignore`, it is strongly advised that users use `ignore_files` when generating artifacts to avoid copying any extra files in artifact.
|
117
122
|
description (str | None): A brief description of the artifact.
|
123
|
+
source (str | None): The source of the artifact.
|
124
|
+
scan (bool | None): Whether to scan the artifact for vulnerabilities.
|
125
|
+
validate (bool | None): Whether to validate the artifact. Source needs to be provided for the validation to work.
|
118
126
|
|
119
127
|
Returns:
|
120
128
|
Dict[str, Any]: `Id` and `Version` of the created artifact.
|
@@ -127,13 +135,27 @@ class Artifact(BaseClient):
|
|
127
135
|
InternalServerErrorException: The server failed to process the request.
|
128
136
|
"""
|
129
137
|
method, endpoint = HttpMethods.POST, f"{self.BASE_ENDPOINT}/artifacts/"
|
130
|
-
body: Dict[str, Any] = {
|
138
|
+
body: Dict[str, Any] = {
|
139
|
+
"name": name,
|
140
|
+
"description": description,
|
141
|
+
}
|
142
|
+
|
143
|
+
if source is not None:
|
144
|
+
body["source"] = source
|
145
|
+
|
146
|
+
if scan is not None:
|
147
|
+
body["scan"] = scan
|
148
|
+
|
149
|
+
if validate is not None:
|
150
|
+
body["validate"] = validate
|
151
|
+
|
152
|
+
updated_body = parse_body_for_multipart_request(body)
|
131
153
|
|
132
154
|
return self.session.create_request( # type: ignore[no-any-return]
|
133
155
|
endpoint,
|
134
156
|
method,
|
135
157
|
content_type=ContentType.MULTIPART_FORM_DATA,
|
136
|
-
body=
|
158
|
+
body=updated_body,
|
137
159
|
path=artifact["path"],
|
138
160
|
ignore_files=artifact.get("ignore_files"),
|
139
161
|
)
|
@@ -205,6 +227,8 @@ class Artifact(BaseClient):
|
|
205
227
|
self,
|
206
228
|
artifact_id: str,
|
207
229
|
artifact: ArtifactInfo,
|
230
|
+
scan: Optional[bool] = None,
|
231
|
+
validate: Optional[bool] = None,
|
208
232
|
) -> Dict[str, int]:
|
209
233
|
"""Create a new version of the artifact.
|
210
234
|
|
@@ -215,6 +239,8 @@ class Artifact(BaseClient):
|
|
215
239
|
artifact_id (str): ID of the artifact for which a new version is to be created.
|
216
240
|
artifact (ArtifactInfo): Mapping of artifact attributes that specifies how the artifact will be generated,
|
217
241
|
it accepts two keys `path`, which is required and `ignore_files` which is optional, and defaults to `.dockerignore`, it is strongly advised that users use `ignore_files` when generating artifacts to avoid copying any extra files in artifact.
|
242
|
+
scan (bool | None): Whether to scan the artifact for vulnerabilities.
|
243
|
+
validate (bool | None): Whether to validate the artifact. Source needs to be present in the artifact for the validation to work.
|
218
244
|
|
219
245
|
Returns:
|
220
246
|
Dict[str, int]: version number.
|
@@ -229,11 +255,21 @@ class Artifact(BaseClient):
|
|
229
255
|
"""
|
230
256
|
method, endpoint = HttpMethods.PUT, f"{self.BASE_ENDPOINT}/artifacts/{artifact_id}"
|
231
257
|
|
258
|
+
body = {}
|
259
|
+
|
260
|
+
if scan is not None:
|
261
|
+
body["scan"] = scan
|
262
|
+
|
263
|
+
if validate is not None:
|
264
|
+
body["validate"] = validate
|
265
|
+
|
266
|
+
updated_body = parse_body_for_multipart_request(body)
|
267
|
+
|
232
268
|
return self.session.create_request( # type: ignore[no-any-return]
|
233
269
|
endpoint,
|
234
270
|
method,
|
235
271
|
content_type=ContentType.MULTIPART_FORM_DATA,
|
236
|
-
body=
|
272
|
+
body=updated_body,
|
237
273
|
path=artifact["path"],
|
238
274
|
ignore_files=artifact.get("ignore_files"),
|
239
275
|
)
|
@@ -10,6 +10,18 @@ body:
|
|
10
10
|
imageUrl: https://my-block-pics.com/image-0.jpg
|
11
11
|
tags:
|
12
12
|
- name: CLI
|
13
|
+
appParameters:
|
14
|
+
build:
|
15
|
+
watcher_user: "abc@123.com"
|
16
|
+
use_cache: true
|
17
|
+
runtime_exceeded: 10
|
18
|
+
run:
|
19
|
+
agg_type: "SUM"
|
20
|
+
num_iterations: 50
|
21
|
+
email_notifications: true
|
22
|
+
file_names:
|
23
|
+
- input.csv
|
24
|
+
- output.csv
|
13
25
|
parameters:
|
14
26
|
block-1:
|
15
27
|
build:
|
@@ -1,6 +1,18 @@
|
|
1
1
|
# app_deployment_revision.yaml
|
2
2
|
|
3
3
|
body:
|
4
|
+
appParameters:
|
5
|
+
build:
|
6
|
+
watcher_user: "abc@123.com"
|
7
|
+
use_cache: true
|
8
|
+
runtime_exceeded: 10
|
9
|
+
run:
|
10
|
+
agg_type: "SUM"
|
11
|
+
num_iterations: 50
|
12
|
+
email_notifications: true
|
13
|
+
file_names:
|
14
|
+
- input.csv
|
15
|
+
- output.csv
|
4
16
|
parameters:
|
5
17
|
block-1:
|
6
18
|
build:
|
@@ -24,6 +24,69 @@ body:
|
|
24
24
|
release:
|
25
25
|
version: 1.0.0
|
26
26
|
autoRunOnDeploy: False
|
27
|
+
parameters:
|
28
|
+
build:
|
29
|
+
- name: watcher_user
|
30
|
+
type: string
|
31
|
+
required: true
|
32
|
+
title: Watcher User Email
|
33
|
+
description: Set the watcher user email
|
34
|
+
defaultValue: user@peak.ai
|
35
|
+
hideValue: false
|
36
|
+
- name: use_cache
|
37
|
+
type: boolean
|
38
|
+
required: false
|
39
|
+
title: Image Caching
|
40
|
+
description: Enable image caching for the workflow
|
41
|
+
defaultValue: false
|
42
|
+
- name: runtime_exceeded
|
43
|
+
type: number
|
44
|
+
required: false
|
45
|
+
title: Runtime Exceeded
|
46
|
+
description: Select the runtime exceeded value to trigger a failed notification for the workflow (in minutes)
|
47
|
+
options:
|
48
|
+
- title: Low
|
49
|
+
value: 10
|
50
|
+
- title: Medium
|
51
|
+
value: 50
|
52
|
+
- title: High
|
53
|
+
value: 100
|
54
|
+
defaultValue: 10
|
55
|
+
run:
|
56
|
+
- name: agg_type
|
57
|
+
type: string
|
58
|
+
required: false
|
59
|
+
title: Agg Type
|
60
|
+
description: Select an aggregation function (e.g., AVG, SUM, COUNT)
|
61
|
+
defaultValue: AVG
|
62
|
+
hideValue: true
|
63
|
+
- name: email_notifications
|
64
|
+
type: boolean
|
65
|
+
required: false
|
66
|
+
title: Email Notifications
|
67
|
+
description: Enable email notifications
|
68
|
+
defaultValue: false
|
69
|
+
- name: num_iterations
|
70
|
+
type: number
|
71
|
+
required: false
|
72
|
+
title: Number of Iterations
|
73
|
+
description: Select the number of iterations
|
74
|
+
options:
|
75
|
+
- title: Low
|
76
|
+
value: 10
|
77
|
+
- title: Medium
|
78
|
+
value: 50
|
79
|
+
- title: High
|
80
|
+
value: 100
|
81
|
+
defaultValue: 10
|
82
|
+
- name: file_names
|
83
|
+
type: string_array
|
84
|
+
required: true
|
85
|
+
title: File Names
|
86
|
+
description: Specify input and output file names
|
87
|
+
defaultValue:
|
88
|
+
- input.csv
|
89
|
+
- output.csv
|
27
90
|
featured: true
|
28
91
|
scope: shared
|
29
92
|
tenants:
|
@@ -13,3 +13,66 @@ body:
|
|
13
13
|
release:
|
14
14
|
version: 2.0.0
|
15
15
|
autoRunOnDeploy: False
|
16
|
+
parameters:
|
17
|
+
build:
|
18
|
+
- name: watcher_user
|
19
|
+
type: string
|
20
|
+
required: true
|
21
|
+
title: Watcher User Email
|
22
|
+
description: Set the watcher user email
|
23
|
+
defaultValue: user@peak.ai
|
24
|
+
hideValue: false
|
25
|
+
- name: use_cache
|
26
|
+
type: boolean
|
27
|
+
required: false
|
28
|
+
title: Image Caching
|
29
|
+
description: Enable image caching for the workflow
|
30
|
+
defaultValue: false
|
31
|
+
- name: runtime_exceeded
|
32
|
+
type: number
|
33
|
+
required: false
|
34
|
+
title: Runtime Exceeded
|
35
|
+
description: Select the runtime exceeded value to trigger a failed notification for the workflow (in minutes)
|
36
|
+
options:
|
37
|
+
- title: Low
|
38
|
+
value: 10
|
39
|
+
- title: Medium
|
40
|
+
value: 50
|
41
|
+
- title: High
|
42
|
+
value: 100
|
43
|
+
defaultValue: 10
|
44
|
+
run:
|
45
|
+
- name: agg_type
|
46
|
+
type: string
|
47
|
+
required: false
|
48
|
+
title: Agg Type
|
49
|
+
description: Select an aggregation function (e.g., AVG, SUM, COUNT)
|
50
|
+
defaultValue: AVG
|
51
|
+
hideValue: true
|
52
|
+
- name: email_notifications
|
53
|
+
type: boolean
|
54
|
+
required: false
|
55
|
+
title: Email Notifications
|
56
|
+
description: Enable email notifications
|
57
|
+
defaultValue: false
|
58
|
+
- name: num_iterations
|
59
|
+
type: number
|
60
|
+
required: false
|
61
|
+
title: Number of Iterations
|
62
|
+
description: Select the number of iterations
|
63
|
+
options:
|
64
|
+
- title: Low
|
65
|
+
value: 10
|
66
|
+
- title: Medium
|
67
|
+
value: 50
|
68
|
+
- title: High
|
69
|
+
value: 100
|
70
|
+
defaultValue: 10
|
71
|
+
- name: file_names
|
72
|
+
type: string_array
|
73
|
+
required: true
|
74
|
+
title: File Names
|
75
|
+
description: Specify input and output file names
|
76
|
+
defaultValue:
|
77
|
+
- input.csv
|
78
|
+
- output.csv
|
@@ -35,16 +35,18 @@ body:
|
|
35
35
|
minInstances: 1
|
36
36
|
parameters:
|
37
37
|
build:
|
38
|
-
-
|
39
|
-
|
40
|
-
name: health_check_url
|
38
|
+
- name: health_check_url
|
39
|
+
type: string
|
41
40
|
required: true
|
42
41
|
title: Health Check URL
|
43
|
-
|
42
|
+
description: Enter the health check URL
|
43
|
+
defaultValue: /health
|
44
44
|
hideValue: false
|
45
|
-
-
|
45
|
+
- name: instance_type_id
|
46
|
+
type: number
|
47
|
+
required: true
|
48
|
+
title: Instance Type ID
|
46
49
|
description: Select an instance type
|
47
|
-
name: instance_type_id
|
48
50
|
options:
|
49
51
|
- title: Pico (0.125CPU, 0.125GB RAM)
|
50
52
|
value: 20
|
@@ -52,26 +54,26 @@ parameters:
|
|
52
54
|
value: 21
|
53
55
|
- title: Micro (0.5CPU, 1GB RAM)
|
54
56
|
value: 22
|
55
|
-
|
56
|
-
title: Instance Type ID
|
57
|
-
type: number
|
57
|
+
defaultValue: 20
|
58
58
|
run:
|
59
|
-
-
|
60
|
-
|
61
|
-
name: agg_type
|
59
|
+
- name: agg_type
|
60
|
+
type: string
|
62
61
|
required: false
|
63
62
|
title: Agg Type
|
64
|
-
|
63
|
+
description: Select an aggregation function (e.g., AVG, SUM, COUNT)
|
64
|
+
defaultValue: AVG
|
65
65
|
hideValue: true
|
66
|
-
-
|
67
|
-
|
68
|
-
name: email_notifications
|
66
|
+
- name: email_notifications
|
67
|
+
type: boolean
|
69
68
|
required: false
|
70
69
|
title: Email Notifications
|
71
|
-
|
72
|
-
|
70
|
+
description: Enable email notifications
|
71
|
+
defaultValue: false
|
72
|
+
- name: num_iterations
|
73
|
+
type: number
|
74
|
+
required: false
|
75
|
+
title: Number of Iterations
|
73
76
|
description: Select the number of iterations
|
74
|
-
name: num_iterations
|
75
77
|
options:
|
76
78
|
- title: Low
|
77
79
|
value: 10
|
@@ -79,17 +81,15 @@ parameters:
|
|
79
81
|
value: 50
|
80
82
|
- title: High
|
81
83
|
value: 100
|
82
|
-
|
83
|
-
|
84
|
-
type:
|
85
|
-
- defaultValue:
|
86
|
-
- input.csv
|
87
|
-
- output.csv
|
88
|
-
description: Specify input and output file names
|
89
|
-
name: file_names
|
84
|
+
defaultValue: 10
|
85
|
+
- name: file_names
|
86
|
+
type: string_array
|
90
87
|
required: true
|
91
88
|
title: File Names
|
92
|
-
|
89
|
+
description: Specify input and output file names
|
90
|
+
defaultValue:
|
91
|
+
- input.csv
|
92
|
+
- output.csv
|
93
93
|
artifact:
|
94
94
|
path: "."
|
95
95
|
ignore_files:
|