A Pipeline moves through a series of states from the moment you create it. The Pipeline is first set up, then begins replicating data, and may later be disabled, resynced, or deleted. Every action that you request moves it from one state to the next.
The state controls what you can do with a Pipeline, and reports the outcome of what you have already done:
- An action is accepted only from certain states, so the state tells you whether the Pipeline can accept the request you want to send.
- An action does not finish while Hevo is answering your request, so you read the state to find out whether the work completed.
Every Pipeline reports its current condition through the following three fields:
| Field | Description |
|---|---|
| state | The lifecycle state, exactly as Hevo tracks it. An action such as enabling, disabling, or deleting moves the Pipeline through a transitional state and then to a final state. |
| disabled | Indicates whether the Pipeline is disabled. This value is true while the Pipeline is in the Disabled or Disabling state. |
| health | Condition of the Pipeline's runs, as the Pipeline Overview in the Hevo UI shows it. |
Read these fields together to find out whether a Pipeline is replicating data, whether it has failed, and whether an action that you requested has finished.
Refer to the following sections to understand the condition of a Pipeline:
- Pipeline States: Every state a Pipeline can be in.
- Pipeline Health: The condition of the Pipeline's runs.
- Checking a Pipeline after an Action: Find out when an action has finished.
- Actions Allowed in Each State: Understand which actions a state accepts.
- Pipeline Behavior when a Change is in Progress: Understand why a request is rejected while an earlier change is still being applied.
Pipeline States
A Pipeline is always in one of the following states, which are divided into five groups:
- Setup: The Pipeline is being created.
- Running: The Pipeline has been created, and is replicating data or disabled.
- Transitional: An action that you requested is in progress.
- Failed: An action did not succeed.
- Deleted: The Pipeline has been removed.
Setup
A Pipeline passes through these states while it is being created.
| State | Description |
|---|---|
| Created | Pipeline has been created, but the full configuration is still in progress. |
| Created Source | Source has been configured for the Pipeline. |
| Created Destination | Destination has been configured for the Pipeline. |
| Configured Pipeline | The Pipeline configuration has been completed. |
| Configured Object | Objects have been configured for replication. |
Running
A Pipeline remains in one of these states once it has been created.
| State | Description |
|---|---|
| Initialized | Pipeline has been fully set up and is replicating data. A Pipeline that is running normally reports this state with disabled set to false. A Pipeline does not have an ENABLED state. |
| Disabled | Pipeline has been disabled and is no longer replicating data. |
Transitional
A Pipeline is in one of these states while an action that you requested is in progress.
| State | Description |
|---|---|
| Initializing | Pipeline is starting and preparing to replicate data, or is applying a change to its configuration or its object selection. The state changes to Initialized once the Pipeline is ready. |
| Enabling | Replication is being resumed. The Pipeline returns to its schedule. If the first historical load of the Pipeline is still incomplete, the Source schema is also refreshed. The state changes to Initialized once the Pipeline starts replicating data. |
| Disabling | Replication is being stopped and the schedule is being removed. Jobs that are already running are allowed to finish, unless you set cancel_active_jobs to true. The state changes to Disabled once replication stops. |
| Restarting | The Pipeline is being resynced. Running jobs are canceled, the Source schema is refreshed, and the data of every object is re-ingested from the beginning. The state changes to Initialized once the schedule is restored, and the data is re-ingested in the subsequent runs. |
| Deleting | The Pipeline and the Source associated with it are being deleted. The Pipeline is no longer returned by the API, and reading it returns a 404. |
Failed
A Pipeline reports one of these states when an action that you requested did not succeed. The API does not return these names. Every one of them is returned as the single value Failed, so the response does not say which action failed. Read the Pipeline’s recent jobs, or the Hevo UI, to find out. The names below are the internal ones.
| State | Description |
|---|---|
| INITIALIZE_FAILED | The Pipeline did not start after it was created and has not replicated any data. |
| ENABLE_FAILED | The Pipeline was not enabled and is not replicating data. |
| DISABLE_FAILED | The Pipeline was not disabled and continues to replicate data. |
| RESTART_FAILED | The Pipeline resync failed and its objects were not re-ingested. |
| DELETE_FAILED | The Pipeline was not deleted, but the API treats it as deleted. It is never listed, and reading it, acting on it or deleting it again all return a 404. It also cannot be resynced. Contact Hevo Support for a Pipeline in this state. |
You can resync a Pipeline from the Initialized state, and from the Failed state, unless the failure was a failed deletion. Read Actions Allowed in Each State for the actions that each state accepts.
Deleted
The API never returns Deleted. The Pipeline is no longer returned by the API, and every request for it answers with a 404.
Pipeline Health
The health object reports how the Pipeline's runs are going, as the Pipeline Overview in the Hevo UI shows it. Read the state field to find out whether an action that you requested has finished, and the health object to check the condition of its runs.
Hevo returns the health object for a single Pipeline only, in the response of the Get Details of a Pipeline endpoint and in the response of an action. It is not returned in a list of Pipelines, or when the job monitoring service is unavailable.
The health object contains the following fields:
| Field | Description |
|---|---|
| value | Current condition of the Pipeline: HEALTHY: The last run completed and nothing needs attention. NEEDS_ATTENTION: The last run failed and the Pipeline needs attention. DEFERRED: A run is holding until it can proceed. RUN_IN_PROGRESS: A run is in progress. HISTORICAL_RUN_IN_PROGRESS: A historical load is in progress. |
| display_name | The label that the Hevo UI shows for this condition. For example, Healthy. |
| severity | Severity level that the Hevo UI uses to show this condition. For example, success. |
Checking a Pipeline after an Action
An action does not finish while Hevo is answering your request. The response returns a 202 with the Pipeline in a transitional state, which tells you that Hevo accepted the request and started the work.
To find out whether the work succeeded, send a request to the Get Details of a Pipeline endpoint and check its state. Repeat this at regular intervals until the state changes to one that is not transitional.
For example, enabling a Pipeline produces the following sequence:
| Request | Response | Description |
|---|---|---|
POST /api/v2/pipelines/12345/actions/enable | 202, with state as Enabling | Hevo accepted the request and started enabling the Pipeline. |
GET /api/v2/pipelines/12345 | state is Enabling | The Pipeline is still being enabled. |
GET /api/v2/pipelines/12345 | state is Initialized | The Pipeline is enabled and replicating data. |
A Pipeline usually reaches its final state within a few seconds. If the state changes to Failed, the action did not succeed. Do not wait for a value that ends with _FAILED, because the API never returns such a value.
Actions Allowed in Each State
An action is accepted only from certain states. The following table lists the states that each action can be performed from:
| Action | Allowed from |
|---|---|
| Enable | Disabled only, and at least one object must be selected for replication |
| Disable | Initialized only |
| Trigger Manual Sync | Initialized only |
| Trigger Resync for a Set of Objects | Any state except Disabling, Disabled, and a failure of the setup, the enable or the disable. It is accepted while the Pipeline is Initializing, Enabling or Restarting, and after a failed Pipeline resync. |
| Resync a Pipeline | Initialized, or Failed (except after a failed deletion) |
| Modify Pipeline or Source configuration | Initialized or Disabled |
| Manage objects | Initialized or Disabled |
| Delete | Any state |
An action that cannot be performed in the Pipeline's current state returns a 400, and the response names that state. This applies only when the Pipeline is not in a transitional state.
From a transitional state (Initializing, Enabling, Disabling or Restarting), a rejected action returns a 409 instead.
Every configuration change and object-selection change moves a replicating Pipeline to Initializing, so a request sent straight after such a change returns a 409.
Pipeline Behavior when a Change is in Progress
Hevo applies one change to a Pipeline at a time. A change is an action that you requested, such as enabling or disabling the Pipeline, or an edit to its configuration. If you send a request while another change is still being applied, Hevo does not apply your request and returns a 409 error.
A change is already in progress in the following cases:
- The Pipeline is in a transitional state, such as
EnablingorDisabling, because an action that you requested earlier has not finished. Wait until the Pipeline reaches its final state, and then send the same request again. - An edit that was started in the Hevo UI is still open. Submit or cancel that edit in the Hevo UI, and then send the request again. Only some requests check for an open edit. These are modifying the Pipeline, modifying its Source, managing its objects and triggering a manual sync. Enabling, disabling, resyncing and deleting do not check, and run as usual.
A 409 error and a 400 error require different responses from you:
- A
409error means that your request is valid, but Hevo cannot apply it yet. Send the same request again, without changing it, once the Pipeline is free. - A
400error means that Hevo did not apply the request. This happens when something in the request is incorrect, or when the current state of the Pipeline does not allow the action. Correct the request, or wait until the Pipeline is in a state that allows the action, and then send the request again.