run

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(c *echo.Context) error

func List

func List(c *echo.Context) error

func ListPartitions

func ListPartitions(c *echo.Context) error

ListPartitions returns the paginated instance list for a fanned task.

The envelope carries `total`, `limit`, `offset` and `next_offset` because a 10k-partition group does not fit in one response and a client with no continuation key cannot tell a complete answer from a truncated one. Those four keys are the pagination contract the CLI and UI page on; `status_counts` is deliberately NOT paginated (see partitionStatusCounts).

`?partition=<value>` is the keyed read: retrying a partition by the identity a human actually knows (`region=eu-west-1`) must not require walking pages until the value appears.

func Logs

func Logs(c *echo.Context) error

Logs streams (or replays) one task's container log.

GET /v1/jobs/:id/runs/:run_id/logs?task_id=<uuid>
    [&task_run_id=<uuid>] [&partition=<value>] [&since=<rfc3339>]

Fan-out contract

A fanned step has N task_runs rows for one (run, task_id) — N containers, N logs. `task_id` alone therefore does not name a log stream, and the run-detail payload this handler used to match against COLLAPSES the group to one entry whose RuntimeID is an arbitrary instance's. Streaming that was silently serving the wrong container's output.

So, on a fanned task, the caller must select an instance:

  • `task_run_id=<uuid>` — the TaskRun primary key (from the partitions endpoint / `caesium run partitions --json`). Authoritative.
  • `partition=<value>` — the partition key, when the value is more convenient than the row id.
  • neither — 400 with a JSON body listing every instance (partition value, index, status, task_run_id) so the client can retry with one. Failing loudly is deliberate: silently streaming instance 0 is the defect this replaced, and a truncated/wrong log is worse than an error.

An UNFANNED task ignores both selectors and behaves exactly as before.

func Post

func Post(c *echo.Context) error

func Retry

func Retry(c *echo.Context) error

Retry retries a failed run, preserving cached/succeeded task results and re-executing only failed/skipped/pending tasks.

func RetryCallbacks

func RetryCallbacks(c *echo.Context) error

RetryCallbacks triggers retries for failed callbacks associated with the run.

func RetryPartition

func RetryPartition(c *echo.Context) error

RetryPartition resets a single failed instance of a fanned task.

Types

type PostRequest

type PostRequest struct {
	Params   map[string]string `json:"params,omitempty"`
	Priority string            `json:"priority,omitempty"`
}

PostRequest holds the optional body for POST /v1/jobs/:id/run.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL