@platforma-sdk/workflow-tengo 5.8.0 → 5.8.1
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.
- package/dist/tengo/lib/exec.limits.lib.tengo +14 -14
- package/dist/tengo/lib/exec.runcmd.lib.tengo +2 -6
- package/dist/tengo/lib/feats.lib.tengo +5 -5
- package/dist/tengo/lib/workdir.lib.tengo +1 -1
- package/dist/tengo/tpl/annotations.compute.plj.gz +0 -0
- package/dist/tengo/tpl/anonymize.deanonymize.plj.gz +0 -0
- package/dist/tengo/tpl/anonymize.impl.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.create_workdir_from_storage.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.download_blob.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.run_hello_world.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.run_hello_world_py.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.upload_blob.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.upload_template.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.workdir_type_name_extractor.plj.gz +0 -0
- package/dist/tengo/tpl/exec.conda.create-env.plj.gz +0 -0
- package/dist/tengo/tpl/exec.delayed-compute-allocation.impl.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec-impl.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
- package/dist/tengo/tpl/exec.load-software.impl.plj.gz +0 -0
- package/dist/tengo/tpl/exec.monetization_info.plj.gz +0 -0
- package/dist/tengo/tpl/exec.monetization_to_json.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.create-venv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.install-deps.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.venv-bin-path.plj.gz +0 -0
- package/dist/tengo/tpl/ll.get-field.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-parquet-pcolumn-chunk.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-pframe-for-ui.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.parse-to-json.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.process-pcolumn-data.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.remove-nulls.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.slice-data.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-import-if-not-null.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
- package/dist/tengo/tpl/pt.import-dir.plj.gz +0 -0
- package/dist/tengo/tpl/pt.workflow-run.plj.gz +0 -0
- package/dist/tengo/tpl/waiter.waiter.plj.gz +0 -0
- package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.query-anchored.plj.gz +0 -0
- package/package.json +5 -5
|
@@ -9,7 +9,6 @@ ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
|
9
9
|
|
|
10
10
|
oop := import("@platforma-sdk/workflow-tengo:oop")
|
|
11
11
|
validation := import("@platforma-sdk/workflow-tengo:validation")
|
|
12
|
-
slices := import("@platforma-sdk/workflow-tengo:slices")
|
|
13
12
|
smart := import("@platforma-sdk/workflow-tengo:smart")
|
|
14
13
|
json := import("json")
|
|
15
14
|
constants := import("@platforma-sdk/workflow-tengo:exec.constants")
|
|
@@ -23,18 +22,22 @@ _RTYPE_QUOTA := { Name: "Quota", Version: "1" }
|
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
getResourceTypes := func(queueName) {
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
if !is_undefined(
|
|
30
|
-
return
|
|
27
|
+
result := feats.getResourceTypes(queueName)
|
|
28
|
+
if !is_undefined(result) {
|
|
29
|
+
return result
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
runnerType := constants.RUNNER_EXECUTOR
|
|
34
|
+
if feats.hasBatch && queueName != constants.UI_TASKS_QUEUE {
|
|
35
|
+
runnerType = constants.RUNNER_BATCH
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
runCommand: { Name: "RunCommand/" + runnerType, Version: "2" },
|
|
39
|
+
computeRequest: { Name: "ComputeRequest/" + runnerType, Version: "1" }
|
|
36
40
|
}
|
|
37
|
-
return constants.RUNNER_EXECUTOR
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
|
|
@@ -168,9 +171,6 @@ storageSpaceRequestBuilder := func() {
|
|
|
168
171
|
return self
|
|
169
172
|
}
|
|
170
173
|
|
|
171
|
-
_computeRequestResourceType := func(runnerType) {
|
|
172
|
-
return { Name: "ComputeRequest/" + runnerType, Version: "1" }
|
|
173
|
-
}
|
|
174
174
|
|
|
175
175
|
_CR_FIELD_REQUEST := "request" // input
|
|
176
176
|
_CR_FIELD_ALLOCATION := "allocation" // output
|
|
@@ -216,8 +216,8 @@ computeRequestBuilder := func() {
|
|
|
216
216
|
ll.assert(smart.isReference(quota), "exec.limits.build: quota of ComputeRequest must be a valid reference")
|
|
217
217
|
ll.assert(queue_name != "", "exec.limits.build: queue name is required for computeRequestBuilder")
|
|
218
218
|
|
|
219
|
-
|
|
220
|
-
requestBuilder := smart.ephemeralBuilder(
|
|
219
|
+
resourceTypes := getResourceTypes(queue_name)
|
|
220
|
+
requestBuilder := smart.ephemeralBuilder(resourceTypes.computeRequest)
|
|
221
221
|
|
|
222
222
|
requestBuilder.getField(_CR_FIELD_REQUEST).set(quota)
|
|
223
223
|
|
|
@@ -235,7 +235,7 @@ computeRequestBuilder := func() {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
export ll.toStrict({
|
|
238
|
-
|
|
238
|
+
getResourceTypes: getResourceTypes,
|
|
239
239
|
quotaBuilder: quotaBuilder,
|
|
240
240
|
storageSpaceRequestBuilder: storageSpaceRequestBuilder,
|
|
241
241
|
computeRequestBuilder: computeRequestBuilder
|
|
@@ -19,10 +19,6 @@ limits := import("@platforma-sdk/workflow-tengo:exec.limits")
|
|
|
19
19
|
delayedCompAlloc := import("@platforma-sdk/workflow-tengo:exec.delayed-compute-allocation")
|
|
20
20
|
|
|
21
21
|
_RTYPE_RUN_COMMAND_V1 := { Name: "RunCommand/executor", Version: "1" }
|
|
22
|
-
|
|
23
|
-
_runCommandResourceType := func(runnerType) {
|
|
24
|
-
return { Name: "RunCommand/" + runnerType, Version: "2" }
|
|
25
|
-
}
|
|
26
22
|
_RTYPE_RUN_COMMAND_CMD := { Name: "RunCommandCmd", Version: "1" }
|
|
27
23
|
_RTYPE_RUN_COMMAND_ARGS := { Name: "RunCommandArgs", Version: "1" }
|
|
28
24
|
_RTYPE_RUN_COMMAND_OPTIONS := { Name: "run-command/options", Version: "1" }
|
|
@@ -671,8 +667,8 @@ builder := func(workdir, ...initialState) {
|
|
|
671
667
|
|
|
672
668
|
ll.assert(!is_undefined(queue), "runcmd.builder.build: queue is required for any command run")
|
|
673
669
|
|
|
674
|
-
|
|
675
|
-
runRes = smart.ephemeralBuilder(
|
|
670
|
+
resourceTypes := limits.getResourceTypes(queue)
|
|
671
|
+
runRes = smart.ephemeralBuilder(resourceTypes.runCommand)
|
|
676
672
|
|
|
677
673
|
runRes.getField(_FIELD_WORKDIR_IN).set(workdir)
|
|
678
674
|
|
|
@@ -31,15 +31,15 @@ _hasRunner := func(e_id) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
_hasGetResourceTypesFor := ll.methodExists(plapi, "getResourceTypesFor")
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
if !
|
|
38
|
+
_getResourceTypesFor := func(queueName) {
|
|
39
|
+
if !_hasGetResourceTypesFor {
|
|
40
40
|
return undefined
|
|
41
41
|
}
|
|
42
|
-
return plapi.
|
|
42
|
+
return plapi.getResourceTypesFor(queueName)
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export ll.toStrict({
|
|
@@ -47,7 +47,7 @@ export ll.toStrict({
|
|
|
47
47
|
hasBatch: _hasRunner("batch"), // batch system execution is available
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
getResourceTypes: _getResourceTypesFor,
|
|
51
51
|
|
|
52
52
|
pureFutureFields: _isEnabled("pureFutureFields") || _api >= 1, // 'pure' future fields magic that provides deduplication
|
|
53
53
|
commandExpressions: _isEnabled("commandExpressions") || _api >= 2, // rich expressions in command arguments ( {{ system.ram_bytes / 20 }} )
|
|
@@ -323,7 +323,7 @@ _fill := func() {
|
|
|
323
323
|
quotaBuilder.ram(ram)
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
if limits.
|
|
326
|
+
if limits.getResourceTypes(queue).runCommand.Name == "RunCommand/" + execConstants.RUNNER_BATCH {
|
|
327
327
|
quotaBuilder.queue(execConstants.BATCH_QUEUE)
|
|
328
328
|
} else {
|
|
329
329
|
quotaBuilder.queue(queue)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/workflow-tengo",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.1",
|
|
4
4
|
"description": "Tengo SDK library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@milaboratories/software-pframes-conv": "2.2.9",
|
|
20
|
-
"@platforma-open/milaboratories.software-small-binaries": "^
|
|
21
|
-
"@platforma-open/milaboratories.software-
|
|
22
|
-
"@platforma-open/milaboratories.software-
|
|
20
|
+
"@platforma-open/milaboratories.software-small-binaries": "^2.0.1",
|
|
21
|
+
"@platforma-open/milaboratories.software-ptabler": "1.14.0",
|
|
22
|
+
"@platforma-open/milaboratories.software-ptexter": "1.2.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@platforma-sdk/tengo-builder": "2.4.
|
|
25
|
+
"@platforma-sdk/tengo-builder": "2.4.11"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"type-check": "pl-tengo check",
|