Skip to content

Commit 522cd23

Browse files
committed
Restrict script language versions
Closes #874 Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
1 parent 08af9e2 commit 522cd23

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

dsl-reference.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,12 +825,21 @@ Enables the execution of custom scripts or code within a workflow, empowering wo
825825

826826
| Name | Type | Required | Description |
827827
|:--|:---:|:---:|:---|
828-
| language | `string` | `yes` | The language of the script to run |
828+
| language | `string` | `yes` | The language of the script to run.<br>*Supported values are: [`js`](https://tc39.es/ecma262/2024/) and [`python`](https://www.python.org/downloads/release/python-3131/).* |
829829
| code | `string` | `no` | The script's code.<br>*Required if `source` has not been set.* |
830830
| source | [externalResource](#external-resource) | `no` | The script's resource.<br>*Required if `code` has not been set.* |
831831
| arguments | `map` | `no` | A list of the arguments, if any, of the script to run |
832832
| environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured script process |
833833

834+
> [!WARNING]
835+
> To ensure cross-compatibility, Serverless Workflow strictly limits the versions of supported scripting languages. These versions may evolve with future releases. If you wish to use a different version of a language, you may do so by utilizing the [`container process`](#container-process).
836+
837+
**Supported languages**
838+
| Language | Version |
839+
|:-----------|:---------:|
840+
| `JavaScript` | [`ES2024`](https://tc39.es/ecma262/2024/) |
841+
| `Python` | [`3.13.1`](https://www.python.org/downloads/release/python-3131/) |
842+
834843
###### Examples
835844

836845
```yaml

dsl.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ When the evaluation of an expression fails, runtimes **must** raise an error wit
348348
| workflow | [`workflowDescriptor`](#workflow-descriptor) | Describes the current workflow. |
349349
| runtime | [`runtimeDescriptor`](#runtime-descriptor) | Describes the runtime. |
350350

351-
⚠️ **Warning**: Use `$secrets` with caution: incorporating them in expressions or passing them as call inputs may inadvertently expose sensitive information.
351+
> [!WARNING]
352+
> Use `$secrets` with caution: incorporating them in expressions or passing them as call inputs may inadvertently expose sensitive information.
352353
353354
##### Runtime Descriptor
354355

@@ -407,7 +408,8 @@ The following table shows which arguments are available for each runtime express
407408
| Task `export.as` | Transformed task output | `$context` |||||||||
408409
| Workflow `output.as` | Last task's transformed output | Transformed workflow output || | || ||| |
409410

410-
⚠️ **Warning**: Use `$secrets` with caution: incorporating them in expressions or passing them as call inputs may inadvertently expose sensitive information.
411+
> [!WARNING]
412+
> Use `$secrets` with caution: incorporating them in expressions or passing them as call inputs may inadvertently expose sensitive information.
411413
412414
### Fault Tolerance
413415

0 commit comments

Comments
 (0)