Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions website/src/content/docs/docs/cli/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Every command takes these:
| 0 | Everything selected succeeded, or agreed (`contract diff`, `logged-state verify`). |
| 1 | A table failed or was left out by a plan error, a contract difference or state disagreement was found, or the configuration is invalid. |
| 2 | The command line couldn't be parsed. |
| 75 | From 0.34.0 (not released yet). `plan`, `apply`, `load` or `copy` failed, but only in ways that running it again unchanged may fix. See [Retrying failed runs](#retrying-failed-runs). |
| 75 | From 0.34.0. `plan`, `apply`, `load` or `copy` failed, but only in ways that running it again unchanged may fix. See [Retrying failed runs](#retrying-failed-runs). |
| 130 | `load --follow` got a second Ctrl-C or SIGTERM and stopped at once. |

`--json` doesn't change the exit code. A declined `--reload` exits 1. From 0.27.0,
Expand All @@ -62,7 +62,7 @@ Every command takes these:

## Retrying failed runs

From 0.34.0 (not released yet), `plan`, `apply`, `load` and `copy` exit 75 instead of 1 when every
From 0.34.0, `plan`, `apply`, `load` and `copy` exit 75 instead of 1 when every
failure may pass on a second try, so a scheduler can retry those runs and alert on the rest. A failure counts as
retryable when it is one of these:

Expand Down
8 changes: 4 additions & 4 deletions website/src/content/docs/docs/cli/load.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,16 @@ $ sqlload load --json
| `schema_version` | `1`. New fields can appear without a change; it changes only when a field changes meaning or goes away. |
| `command` | `apply` or `load`. |
| `ok` | Whether every selected table planned and loaded: `true` exactly when the exit code is 0. |
| `retryable` | From 0.34.0 (not released yet). Whether running the command again unchanged may fix every failure: `true` exactly when the exit code is 75. It's `false` when `ok` is `true`, whenever a table failed for good, and whenever a plan error other than an unreachable source left one out. See [Retrying failed runs](/docs/cli/#retrying-failed-runs). |
| `retryable` | From 0.34.0. Whether running the command again unchanged may fix every failure: `true` exactly when the exit code is 75. It's `false` when `ok` is `true`, whenever a table failed for good, and whenever a plan error other than an unreachable source left one out. See [Retrying failed runs](/docs/cli/#retrying-failed-runs). |
| `summary` | How many objects were `created`, `altered` (each table once, however many changes it had) and `recreated`; tables `loaded` and `failed`; `rows` loaded. |
| `plan` | The same document `plan --json` prints, with its own `ok` and, from 0.34.0 (not released yet), `retryable`. Tables a plan error left out are in its `errors`, and tables with nothing to load in `skipped`. |
| `plan` | The same document `plan --json` prints, with its own `ok` and, from 0.34.0, `retryable`. Tables a plan error left out are in its `errors`, and tables with nothing to load in `skipped`. |
| `objects` | One entry per change to a table or stage, by `apply` or during a load: its `action` (`created`, `altered` or `recreated`), its `name` and the `detail`. A table that gains two columns has two `altered` entries. |
| `tables` | Each table loaded: its `status` (`loaded` or `failed`), `rows`, `duration_seconds`, a `note` (the cursor window it read, or that its table waits for first data), and the `error` when it failed. From 0.34.0 (not released yet), `retryable` says whether that failure may pass on a rerun. `source`, `target` and `write_strategy` are `null` only for a `load --follow` that failed before any table. `apply` loads nothing, so its list is empty. |
| `tables` | Each table loaded: its `status` (`loaded` or `failed`), `rows`, `duration_seconds`, a `note` (the cursor window it read, or that its table waits for first data), and the `error` when it failed. From 0.34.0, `retryable` says whether that failure may pass on a rerun. `source`, `target` and `write_strategy` are `null` only for a `load --follow` that failed before any table. `apply` loads nothing, so its list is empty. |

When the run can't start (the configuration doesn't parse, a connection fails), standard output
holds one error document instead, the same as `plan --json`'s:
`{"error": {"code": "config", "message": "…", "help": "…", "retryable": false}}`. `code` is
`config` for the configuration, else the command's name. From 0.34.0 (not released yet),
`config` for the configuration, else the command's name. From 0.34.0,
`retryable` is `true`, and the exit code 75, when the run couldn't start for a reason a rerun may
fix, such as a target that refused the connection or timed out.

Expand Down
Loading