pub enum PipelineStatus {
Stopped,
Provisioning,
Initializing,
Paused,
Running,
Unavailable,
Suspending,
Stopping,
}
Expand description
Pipeline status.
This type represents the state of the pipeline tracked by the pipeline
runner and observed by the API client via the GET /v0/pipelines/{name}
endpoint.
§The lifecycle of a pipeline
The following automaton captures the lifecycle of the pipeline. Individual states and transitions of the automaton are described below.
-
States labeled with the hourglass symbol (⌛) are timed states. The automaton stays in timed state until the corresponding operation completes or until it transitions to become failed after the pre-defined timeout period expires.
-
State transitions labeled with API endpoint names (
/start
,/pause
,/stop
) are triggered by invoking corresponding endpoint, e.g.,POST /v0/pipelines/{name}/start
. Note that these only express desired state, and are applied asynchronously by the automata.
Stopped ◄─────────── Stopping ◄───── All states can transition
│ ▲ to Stopping by either:
/start or /pause │ │ (1) user calling /stop?force=true, or;
▼ │ (2) pipeline encountering a fatal
⌛Provisioning Suspending resource or runtime error,
│ ▲ having the system call /stop?force=true
▼ │ /stop effectively
⌛Initializing ──────────────┤ ?force=false
│ │
┌─────────┼────────────────────┴─────┐
│ ▼ │
│ Paused ◄──────► Unavailable │
│ │ ▲ ▲ │
│ /start │ │ /pause │ │
│ ▼ │ │ │
│ Running ◄─────────────┘ │
└────────────────────────────────────┘
§Desired and actual status
We use the desired state model to manage the lifecycle of a pipeline. In this model, the pipeline has two status attributes associated with it at runtime: the desired status, which represents what the user would like the pipeline to do, and the current status, which represents the actual state of the pipeline. The pipeline runner service continuously monitors both fields and steers the pipeline towards the desired state specified by the user.
Only four of the states in the pipeline automaton above can be
used as desired statuses: Paused
, Running
, Suspended
and
Stopped
. These statuses are selected by invoking REST endpoints
shown in the diagram (respectively, /pause
, /start
, and /stop
).
The user can monitor the current state of the pipeline via the
GET /v0/pipelines/{name}
endpoint. In a typical scenario,
the user first sets the desired state, e.g., by invoking the
/start
endpoint, and then polls the GET /v0/pipelines/{name}
endpoint to monitor the actual status of the pipeline until its
deployment_status
attribute changes to Running
indicating
that the pipeline has been successfully initialized and is
processing data, or Stopped
with deployment_error
being set.
JSON schema
{
"description": "Pipeline status.\n\nThis type represents the state of the pipeline tracked by the pipeline\nrunner and observed by the API client via the `GET /v0/pipelines/{name}` endpoint.\n\n### The lifecycle of a pipeline\n\nThe following automaton captures the lifecycle of the pipeline.\nIndividual states and transitions of the automaton are described below.\n\n* States labeled with the hourglass symbol (⌛) are **timed** states. The\nautomaton stays in timed state until the corresponding operation completes\nor until it transitions to become failed after the pre-defined timeout\nperiod expires.\n\n* State transitions labeled with API endpoint names (`/start`, `/pause`,\n`/stop`) are triggered by invoking corresponding endpoint,\ne.g., `POST /v0/pipelines/{name}/start`. Note that these only express\ndesired state, and are applied asynchronously by the automata.\n\n```text\nStopped ◄─────────── Stopping ◄───── All states can transition\n│ ▲ to Stopping by either:\n/start or /pause │ │ (1) user calling /stop?force=true, or;\n▼ │ (2) pipeline encountering a fatal\n⌛Provisioning Suspending resource or runtime error,\n│ ▲ having the system call /stop?force=true\n▼ │ /stop effectively\n⌛Initializing ──────────────┤ ?force=false\n│ │\n┌─────────┼────────────────────┴─────┐\n│ ▼ │\n│ Paused ◄──────► Unavailable │\n│ │ ▲ ▲ │\n│ /start │ │ /pause │ │\n│ ▼ │ │ │\n│ Running ◄─────────────┘ │\n└────────────────────────────────────┘\n```\n\n### Desired and actual status\n\nWe use the desired state model to manage the lifecycle of a pipeline.\nIn this model, the pipeline has two status attributes associated with\nit at runtime: the **desired** status, which represents what the user\nwould like the pipeline to do, and the **current** status, which\nrepresents the actual state of the pipeline. The pipeline runner\nservice continuously monitors both fields and steers the pipeline\ntowards the desired state specified by the user.\n\nOnly four of the states in the pipeline automaton above can be\nused as desired statuses: `Paused`, `Running`, `Suspended` and\n`Stopped`. These statuses are selected by invoking REST endpoints\nshown in the diagram (respectively, `/pause`, `/start`, and `/stop`).\n\nThe user can monitor the current state of the pipeline via the\n`GET /v0/pipelines/{name}` endpoint. In a typical scenario,\nthe user first sets the desired state, e.g., by invoking the\n`/start` endpoint, and then polls the `GET /v0/pipelines/{name}`\nendpoint to monitor the actual status of the pipeline until its\n`deployment_status` attribute changes to `Running` indicating\nthat the pipeline has been successfully initialized and is\nprocessing data, or `Stopped` with `deployment_error` being set.",
"type": "string",
"enum": [
"Stopped",
"Provisioning",
"Initializing",
"Paused",
"Running",
"Unavailable",
"Suspending",
"Stopping"
]
}
Variants§
Trait Implementations§
Source§impl Clone for PipelineStatus
impl Clone for PipelineStatus
Source§fn clone(&self) -> PipelineStatus
fn clone(&self) -> PipelineStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PipelineStatus
impl Debug for PipelineStatus
Source§impl<'de> Deserialize<'de> for PipelineStatus
impl<'de> Deserialize<'de> for PipelineStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<&PipelineStatus> for PipelineStatus
impl From<&PipelineStatus> for PipelineStatus
Source§fn from(value: &PipelineStatus) -> Self
fn from(value: &PipelineStatus) -> Self
Source§impl FromStr for PipelineStatus
impl FromStr for PipelineStatus
Source§impl Hash for PipelineStatus
impl Hash for PipelineStatus
Source§impl Ord for PipelineStatus
impl Ord for PipelineStatus
Source§fn cmp(&self, other: &PipelineStatus) -> Ordering
fn cmp(&self, other: &PipelineStatus) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PipelineStatus
impl PartialEq for PipelineStatus
Source§impl PartialOrd for PipelineStatus
impl PartialOrd for PipelineStatus
Source§impl Serialize for PipelineStatus
impl Serialize for PipelineStatus
Source§impl ToString for PipelineStatus
impl ToString for PipelineStatus
Source§impl TryFrom<&String> for PipelineStatus
impl TryFrom<&String> for PipelineStatus
Source§type Error = ConversionError
type Error = ConversionError
Source§impl TryFrom<&str> for PipelineStatus
impl TryFrom<&str> for PipelineStatus
Source§type Error = ConversionError
type Error = ConversionError
Source§impl TryFrom<String> for PipelineStatus
impl TryFrom<String> for PipelineStatus
Source§type Error = ConversionError
type Error = ConversionError
impl Copy for PipelineStatus
impl Eq for PipelineStatus
impl StructuralPartialEq for PipelineStatus
Auto Trait Implementations§
impl Freeze for PipelineStatus
impl RefUnwindSafe for PipelineStatus
impl Send for PipelineStatus
impl Sync for PipelineStatus
impl Unpin for PipelineStatus
impl UnwindSafe for PipelineStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.