@@ -55,6 +55,9 @@ message StatusEvent {
5555
5656 // Task Execution
5757 TaskExecution task_execution = 4 ;
58+
59+ // Task State
60+ TaskStatus.State task_state = 5 ;
5861}
5962
6063// This Task Execution field includes detail information for
@@ -140,9 +143,23 @@ message Runnable {
140143 message Script {
141144 oneof command {
142145 // Script file path on the host VM.
146+ //
147+ // To specify an interpreter, please add a `#!<interpreter>`(also known as
148+ // [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
149+ // first line of the file.(For example, to execute the script using bash,
150+ // `#!/bin/bash` should be the first line of the file. To execute the
151+ // script using`Python3`, `#!/usr/bin/env python3` should be the first
152+ // line of the file.) Otherwise, the file will by default be excuted by
153+ // `/bin/sh`.
143154 string path = 1 ;
144155
145156 // Shell script text.
157+ //
158+ // To specify an interpreter, please add a `#!<interpreter>\n` at the
159+ // beginning of the text.(For example, to execute the script using bash,
160+ // `#!/bin/bash\n` should be added. To execute the script using`Python3`,
161+ // `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
162+ // by default be excuted by `/bin/sh`.
146163 string text = 2 ;
147164 }
148165 }
@@ -220,13 +237,12 @@ message TaskSpec {
220237 int32 max_retry_count = 5 ;
221238
222239 // Lifecycle management schema when any task in a task group is failed.
223- // The valid size of lifecycle policies are [0, 10].
224- // For each lifecycle policy, when the condition is met,
225- // the action in that policy will execute.
226- // If there are multiple policies that the task execution result matches,
227- // we use the action from the first matched policy. If task execution result
228- // does not meet with any of the defined lifecycle policy, we consider it as
229- // the default policy. Default policy means if the exit code is 0, exit task.
240+ // Currently we only support one lifecycle policy.
241+ // When the lifecycle policy condition is met,
242+ // the action in the policy will execute.
243+ // If task execution result does not meet with the defined lifecycle
244+ // policy, we consider it as the default policy.
245+ // Default policy means if the exit code is 0, exit task.
230246 // If task ends with non-zero exit code, retry the task with max_retry_count.
231247 repeated LifecyclePolicy lifecycle_policies = 9 ;
232248
@@ -265,6 +281,10 @@ message LifecyclePolicy {
265281 }
266282
267283 // Action to execute when ActionCondition is true.
284+ // When RETRY_TASK is specified, we will retry failed tasks
285+ // if we notice any exit code match and fail tasks if no match is found.
286+ // Likewise, when FAIL_TASK is specified, we will fail tasks
287+ // if we notice any exit code match and retry tasks if no match is found.
268288 Action action = 1 ;
269289
270290 // Conditions that decide why a task failure is dealt with a specific action.
0 commit comments