generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Current Behaviour:
The timeout parameter for Action objects is not a format string. (source in the spec)
This means it's not possible to parametrize timeouts through job/step/task parameters
Expected Behaviour:
It is possible to parametrize timeouts using syntax like: timeout: "{{Param.OnRunTimeoutSeconds}}"
Reproduction Steps:
Try to Run:
specificationVersion: 'jobtemplate-2023-09'
name: Bash CLI Job
parameterDefinitions:
- name: OnRunTimeoutSeconds
type: INT
minValue: 1
description: The number of seconds the onRun action can operate before encountering a timeout.
userInterface:
label: Run Timeout Seconds
control: SPIN_BOX
- name: BashScript
type: STRING
userInterface:
control: MULTILINE_EDIT
label: Bash Script
description: "Sleeps 100 seconds then exits"
default: |
for i in {1..100}; do
echo "Iter $i"
sleep 1
done
steps:
- name: CliScript
script:
actions:
onRun:
timeout: "{{Param.OnRunTimeoutSeconds}}"
command: bash
args: ['{{Task.File.Run}}']
embeddedFiles:
- name: Run
type: TEXT
runnable: true
data: |
#!/usr/bin/env bash
# Configure the script to fail if any individual command fails.
set -euo pipefail
# Echo each command before running it.
set -x
{{Param.BashScript}}
Metadata
Metadata
Assignees
Labels
No labels