pub struct Runnable {
pub display_name: String,
pub ignore_exit_status: bool,
pub background: bool,
pub always_run: bool,
pub environment: Option<Environment>,
pub timeout: Option<Duration>,
pub labels: BTreeMap<String, String>,
pub executable: Option<Executable>,
}
Expand description
Runnable describes instructions for executing a specific script or container as part of a Task.
Fields§
§display_name: String
Optional. DisplayName is an optional field that can be provided by the caller. If provided, it will be used in logs and other outputs to identify the script, making it easier for users to understand the logs. If not provided the index of the runnable will be used for outputs.
ignore_exit_status: bool
Normally, a runnable that returns a non-zero exit status fails and causes
the task to fail. However, you can set this field to true
to allow the
task to continue executing its other runnables even if this runnable
fails.
background: bool
Normally, a runnable that doesn’t exit causes its task to fail. However,
you can set this field to true
to configure a background runnable.
Background runnables are allowed continue running in the background while
the task executes subsequent runnables. For example, background runnables
are useful for providing services to other runnables or providing
debugging-support tools like SSH servers.
Specifically, background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as task failures.
always_run: bool
By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for Runnables that copy output files off of the VM or for debugging.
The always_run flag does not override the Task’s overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables.
environment: Option<Environment>
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
timeout: Option<Duration>
Timeout for this Runnable.
labels: BTreeMap<String, String>
Labels for this Runnable.
executable: Option<Executable>
Required. The script, container, or barrier for this runnable to execute.
Trait Implementations§
source§impl Message for Runnable
impl Message for Runnable
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Runnable
impl PartialEq for Runnable
impl StructuralPartialEq for Runnable
Auto Trait Implementations§
impl Freeze for Runnable
impl RefUnwindSafe for Runnable
impl Send for Runnable
impl Sync for Runnable
impl Unpin for Runnable
impl UnwindSafe for Runnable
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request