@platforma-sdk/workflow-tengo 6.10.3 → 6.10.4
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.lib.tengo +11 -1
- package/dist/tengo/lib/exec.tmpdir-compat.lib.tengo +120 -12
- 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.build-table.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.merge-resource-maps.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.parse-to-json.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.process-pcolumn-batch-split.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.process-pcolumn-batch.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/dist/tengo/tpl/workflow.query-context-filter.plj.gz +0 -0
- package/package.json +3 -3
|
@@ -1349,7 +1349,17 @@ builder := func() {
|
|
|
1349
1349
|
tmpdirCompat.isSizedRequest(scratchFreeSpace, scratchFormulaAst)
|
|
1350
1350
|
)
|
|
1351
1351
|
if tmpdirCompatNeeded {
|
|
1352
|
-
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
inContainer := false
|
|
1356
|
+
if !is_undefined(soft) {
|
|
1357
|
+
inContainer = tmpdirCompat.usesDocker(
|
|
1358
|
+
ll.fromStrict(soft.descriptor), feats.isDockerAvailable)
|
|
1359
|
+
}
|
|
1360
|
+
for name, content in tmpdirCompat.filesToStage(inContainer) {
|
|
1361
|
+
filesToWrite[name] = content
|
|
1362
|
+
}
|
|
1353
1363
|
|
|
1354
1364
|
|
|
1355
1365
|
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
25
29
|
|
|
26
30
|
|
|
27
31
|
|
|
@@ -42,6 +46,12 @@ SCRIPT_FILE_NAME := ".pl-run-compat-f9b7eca1b8.sh"
|
|
|
42
46
|
|
|
43
47
|
|
|
44
48
|
|
|
49
|
+
SCRIPT_FILE_NAME_WINDOWS := ".pl-run-compat-f9b7eca1b8.cmd"
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
45
55
|
|
|
46
56
|
|
|
47
57
|
|
|
@@ -61,6 +71,14 @@ WORKDIR_TMP_REL_PATH := ".pl/tmp"
|
|
|
61
71
|
|
|
62
72
|
|
|
63
73
|
|
|
74
|
+
|
|
75
|
+
WORKDIR_TMP_REL_PATH_WINDOWS := ".pl\\tmp"
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
64
82
|
script := func() {
|
|
65
83
|
return `#!/bin/sh
|
|
66
84
|
|
|
@@ -87,6 +105,59 @@ exec "$@"
|
|
|
87
105
|
|
|
88
106
|
|
|
89
107
|
|
|
108
|
+
_toCRLF := func(value) {
|
|
109
|
+
return text.replace(text.replace(value, "\r\n", "\n", -1), "\n", "\r\n", -1)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
scriptWindows := func() {
|
|
134
|
+
return _toCRLF(`@echo off
|
|
135
|
+
|
|
136
|
+
rem Compatibility layer between a current workflow-tengo SDK and a Platforma Backend from before
|
|
137
|
+
rem the temporary-directory contract. Update the backend and this file stops appearing here.
|
|
138
|
+
rem
|
|
139
|
+
rem Written by exec.tmpdirCompat in @platforma-sdk/workflow-tengo.
|
|
140
|
+
|
|
141
|
+
setlocal
|
|
142
|
+
|
|
143
|
+
set "pl_tmp=%CD%\` + WORKDIR_TMP_REL_PATH_WINDOWS + `"
|
|
144
|
+
if not exist "%pl_tmp%" md "%pl_tmp%"
|
|
145
|
+
|
|
146
|
+
set "TMPDIR=%pl_tmp%"
|
|
147
|
+
set "TMP=%pl_tmp%"
|
|
148
|
+
set "TEMP=%pl_tmp%"
|
|
149
|
+
|
|
150
|
+
%*
|
|
151
|
+
exit /b %ERRORLEVEL%
|
|
152
|
+
`)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
90
161
|
|
|
91
162
|
|
|
92
163
|
isNeeded := func(feats, scratchSized) {
|
|
@@ -148,11 +219,43 @@ concat := func(prefix, tail) {
|
|
|
148
219
|
|
|
149
220
|
|
|
150
221
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
usesDocker := func(descriptor, isDockerAvailable) {
|
|
226
|
+
return isDockerAvailable && !is_undefined(descriptor.docker)
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
wrapperPrefix := func(inContainer) {
|
|
237
|
+
if !inContainer && isWindows() {
|
|
238
|
+
return [".\\" + SCRIPT_FILE_NAME_WINDOWS]
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
return ["sh", "./" + SCRIPT_FILE_NAME]
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
filesToStage := func(inContainer) {
|
|
250
|
+
files := {}
|
|
251
|
+
|
|
252
|
+
if !inContainer && isWindows() {
|
|
253
|
+
files[SCRIPT_FILE_NAME_WINDOWS] = scriptWindows()
|
|
254
|
+
return files
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
files[SCRIPT_FILE_NAME] = script()
|
|
258
|
+
return files
|
|
156
259
|
}
|
|
157
260
|
|
|
158
261
|
|
|
@@ -167,12 +270,12 @@ _assertNotWindows := func() {
|
|
|
167
270
|
|
|
168
271
|
|
|
169
272
|
patchSoftwareDescriptor := func(descriptor, isDockerAvailable) {
|
|
170
|
-
if
|
|
273
|
+
if usesDocker(descriptor, isDockerAvailable) {
|
|
171
274
|
docker := ll.fromStrict(descriptor.docker)
|
|
172
275
|
|
|
173
276
|
entrypoint := docker.entrypoint
|
|
174
277
|
if is_undefined(entrypoint) { entrypoint = [] }
|
|
175
|
-
docker.entrypoint = concat(
|
|
278
|
+
docker.entrypoint = concat(wrapperPrefix(true), entrypoint)
|
|
176
279
|
|
|
177
280
|
descriptor.docker = docker
|
|
178
281
|
return descriptor
|
|
@@ -180,7 +283,6 @@ patchSoftwareDescriptor := func(descriptor, isDockerAvailable) {
|
|
|
180
283
|
|
|
181
284
|
|
|
182
285
|
|
|
183
|
-
_assertNotWindows()
|
|
184
286
|
|
|
185
287
|
for kind in ["local", "binary"] {
|
|
186
288
|
if is_undefined(descriptor[kind]) { continue }
|
|
@@ -189,7 +291,7 @@ patchSoftwareDescriptor := func(descriptor, isDockerAvailable) {
|
|
|
189
291
|
ll.assert(is_array(pkg.cmd) && len(pkg.cmd) != 0,
|
|
190
292
|
"exec.tmpdirCompat: software descriptor %q has no 'cmd' to wrap", kind)
|
|
191
293
|
|
|
192
|
-
pkg.cmd = concat(
|
|
294
|
+
pkg.cmd = concat(wrapperPrefix(false), pkg.cmd)
|
|
193
295
|
descriptor[kind] = pkg
|
|
194
296
|
}
|
|
195
297
|
|
|
@@ -202,11 +304,11 @@ patchSoftwareDescriptor := func(descriptor, isDockerAvailable) {
|
|
|
202
304
|
|
|
203
305
|
|
|
204
306
|
wrapCommand := func(cmd) {
|
|
205
|
-
|
|
307
|
+
prefix := wrapperPrefix(false)
|
|
206
308
|
|
|
207
309
|
return {
|
|
208
|
-
cmd:
|
|
209
|
-
prependArgs: [
|
|
310
|
+
cmd: prefix[0],
|
|
311
|
+
prependArgs: concat(prefix[1:], [cmd])
|
|
210
312
|
}
|
|
211
313
|
}
|
|
212
314
|
|
|
@@ -255,11 +357,17 @@ rewriteScratchExpressions := func(value) {
|
|
|
255
357
|
|
|
256
358
|
export ll.toStrict({
|
|
257
359
|
SCRIPT_FILE_NAME: SCRIPT_FILE_NAME,
|
|
360
|
+
SCRIPT_FILE_NAME_WINDOWS: SCRIPT_FILE_NAME_WINDOWS,
|
|
258
361
|
WORKDIR_TMP_REL_PATH: WORKDIR_TMP_REL_PATH,
|
|
362
|
+
WORKDIR_TMP_REL_PATH_WINDOWS: WORKDIR_TMP_REL_PATH_WINDOWS,
|
|
259
363
|
SCRATCH_PATH_VARIABLE: SCRATCH_PATH_VARIABLE,
|
|
260
364
|
SCRATCH_SIZE_VARIABLES: SCRATCH_SIZE_VARIABLES,
|
|
261
365
|
|
|
262
366
|
script: script,
|
|
367
|
+
scriptWindows: scriptWindows,
|
|
368
|
+
filesToStage: filesToStage,
|
|
369
|
+
usesDocker: usesDocker,
|
|
370
|
+
wrapperPrefix: wrapperPrefix,
|
|
263
371
|
isNeeded: isNeeded,
|
|
264
372
|
isSizedRequest: isSizedRequest,
|
|
265
373
|
isWindows: isWindows,
|
|
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
|
|
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": "6.10.
|
|
3
|
+
"version": "6.10.4",
|
|
4
4
|
"description": "Tengo SDK library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"./dist/**/*"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@milaboratories/pframes-rs-wasip2": "1.1.
|
|
19
|
+
"@milaboratories/pframes-rs-wasip2": "1.1.61",
|
|
20
20
|
"@milaboratories/software-pframes-conv": "2.2.9",
|
|
21
21
|
"@platforma-open/milaboratories.software-small-binaries": "^2.1.1",
|
|
22
22
|
"@platforma-open/milaboratories.software-ptexter": "1.2.4",
|
|
23
|
-
"@platforma-open/milaboratories.software-ptabler": "2.1.
|
|
23
|
+
"@platforma-open/milaboratories.software-ptabler": "2.1.11"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@platforma-sdk/tengo-builder": "4.0.27"
|