Documentation
¶
Index ¶
- func Get(c *echo.Context) error
- func List(c *echo.Context) error
- func ListPartitions(c *echo.Context) error
- func Logs(c *echo.Context) error
- func Post(c *echo.Context) error
- func Retry(c *echo.Context) error
- func RetryCallbacks(c *echo.Context) error
- func RetryPartition(c *echo.Context) error
- type PostRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListPartitions ¶
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 ¶
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 Retry ¶
Retry retries a failed run, preserving cached/succeeded task results and re-executing only failed/skipped/pending tasks.
func RetryCallbacks ¶
RetryCallbacks triggers retries for failed callbacks associated with the run.
func RetryPartition ¶
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.