Skip to main content

Run workloads

Start with the OmniCloud programming model for how images, components, Runs, and storage fit together. A workload specification is YAML that describes the components OmniCloud will execute.

You can submit it in two ways:

  • An ad hoc run executes the specification once and does not save a named definition.
  • A Workload Definition saves a named specification so you can update it and start it again later.

Use the interactive client in the examples below. Replace values beginning with YOUR_.

Run a one-off workload​

Submit a YAML specification directly:

dphi> run create docs/examples/minimal-workload.yaml --idempotency-key ad-hoc-001

The idempotency key identifies this submission so you can retry the same request safely within the retention window. The acceptance receipt records the Run ID and the phase at submission. This receipt example uses first-run-001 as its key:

dphi> run create docs/examples/minimal-workload.yaml --idempotency-key first-run-001
╭─────────────── OmniCloud ───────────────╮
│ Run 01K9A000000000000000000001: Pending │
│ hello: Pending │
│ Idempotency key: first-run-001 │
╰─────────────────────────────────────────╯

Use the returned Run ID in the commands below. If you lose it, see Recover a Run ID.

Observe the run and inspect its output:

dphi> run get YOUR_RUN_ID
dphi> run wait YOUR_RUN_ID
dphi> run logs YOUR_RUN_ID

Use an ad hoc run when you do not need to save or revise the specification.

A successful status observation can look like this:

dphi> run get 01K9A000000000000000000001
╭─ Run 01K9A000000000000000000001: Succeeded ─╮
│ Run ID 01K9A000000000000000000001 │
│ Source Ad hoc │
│ Accepted at 2026-11-04T10:00:00Z │
│ Finished at 2026-11-05T10:00:00Z │
╰─────────────────────────────────────────────╯
Timeline
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃ Event ┃ At ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
│ Accepted │ 2026-11-04T10:00:00Z │
│ Succeeded │ 2026-11-05T10:00:00Z │
└───────────┴──────────────────────┘
┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Component ┃ Phase ┃ Diagnostics ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ hello │ Succeeded │ │
└───────────┴───────────┴─────────────┘
Conditions: none

See the wait result and program-log output for the other commands.

Create a reusable definition​

workload create performs two actions together: it saves the named definition and starts its first run.

dphi> workload create report docs/examples/minimal-workload.yaml --idempotency-key report-v1

Do not immediately run workload start after this command unless you want a second, independent run. Observe the first Run ID returned by workload create.

To start another run later from the current definition:

dphi> workload start report --idempotency-key report-run-002

To replace the saved specification for future runs:

dphi> workload update report path/to/updated-workload.yaml
dphi> workload start report --idempotency-key report-run-003

Updating a definition never changes a run that OmniCloud has already accepted.

Select storage mounts​

A storage mount exposes a volume at a path inside a component. Omitted mounts retain the default volume at /data; an empty list attaches no persistent storage. Explicit lists select all volumes and their paths, up to four per component. To select another volume without changing application code, keep the path fixed and change the volume name. See the manifest reference and named mount walkthrough.

Human-readable workload get NAME shows the component mounts. A saved definition referencing a volume protects it from deletion even after its run finishes; update the definition to remove that reference before deleting. Active Pods also block deletion. Lifecycle management is human-only and does not grant listing or file-transfer permissions.

dphi> workload get report
┏━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Workload ┃ Revision ┃ Components ┃
┡━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━┩
│ report │ 1 │ 1 │
└──────────┴──────────┴────────────┘
Workload Mounts (read-write)
┏━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┓
┃ Component ┃ Volume ┃ Path ┃
┡━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━┩
│ hello │ results │ /output │
└───────────┴─────────┴─────────┘

Find active and completed runs​

run list shows active runs by default. run history shows terminal runs:

dphi> run list
dphi> run history
dphi> run list --phase Running --phase Failing

Compare active run output, terminal history, and an empty active list.

Terminal run records are retained for seven days. Save required evidence before the record expires.

Recover a Run ID​

Connect to the same spacecraft and sign in to the same Tenant where you submitted the Run. Use run list for active Runs, or run history for completed, failed, or canceled Runs.

Match the accepted time, component name, and Workload Definition when one was used. If the response includes a nextCursor, pass it to the same command with --cursor to check the next page. Copy the Run ID and confirm it with run get YOUR_RUN_ID before acting on it. Terminal records are retained for seven days.

Cancel a run​

Cancellation is asynchronous. Ask OmniCloud to stop the run, then observe its terminal state.

dphi> run cancel YOUR_RUN_ID
dphi> run wait YOUR_RUN_ID

The immediate reply can still show Pending. The cancellation example shows Canceling, another possible phase. A later Canceled confirms cancellation. run wait exits with status 1 when it observes Canceled.

Partial files may remain in /data. Inspect them before deciding whether they are safe to use.

Choose idempotency keys​

An idempotency key represents one request intent. If a create or start command has an uncertain network result, repeat the exact command with the same key. Never reuse that key for changed YAML or for a later run.

Within the retention window, a same-key retry can return the original acceptance receipt. Its phase can be Pending after the run has finished. Use run get with the returned Run ID to read the current state.

Deduplication is not permanent. Current internal request claims are removed seven days after terminal completion, so an old key can eventually create new work. Keep retries within the documented retention window.

The CLI generates a key when you omit one. For automation, provide your own and store it with the operation record so a retry can reuse it.