You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cube-cli): never print a validation failure with nothing to act on
Review of the paired PR. All three are the same shape: the response contract
lives in cubedevinc/cubejs-enterprise and this command ships separately, so an
entry that doesn't match what it expects still has to print as something. A
blank line is the one output `validate` must never produce — printing the
errors IS the command.
- `format_error` renders a bare-string entry as itself and a half-filled
object as whichever half it has, falling back to the entry's own JSON rather
than the empty string `output::field` would give for both lookups.
- A response without `branchName` no longer yields "Data model on is valid":
it falls back to the branch the caller asked for, or a generic label for
`--dev-mode`, where the personal `dev-…` name only exists server-side.
- `valid: false` with no errors said "failed to compile:" and then listed
nothing, followed by "has 0 compilation error(s)". It now says the model
could not be validated, which points at the runtime — where the answer is.
Still fails closed: a report this command can't read is not evidence the
model compiles.
Adds a `validate` row to the README's command table, and unit tests for the
new pure functions.
|`validate`| compile a deployment's data model and report the compiler's errors; exits non-zero so it gates CI. `--branch` picks a branch, `--dev-mode` your active dev-mode working copy; neither validates the deploy branch |
133
134
|`logs`| tail deployment pod logs (`--pod`, `-c/--container`; defaults to the Cube API container) |
134
135
|`github` (`gh`) | status, installations, repos, branches, connect (import a repo into a deployment + first build) |
135
136
|`data-model` (`dm`) | list, get, put, delete, rename files; branches, create-branch, enable-branch, disable-branch, dev-mode, exit-dev-mode, commit, pull. File writes only land on a **dev-mode branch**: `dev-mode <branch>` forks a personal `dev-…` branch and prints its name — pass that via `--branch` (or omit `--branch` to use your active dev-mode branch); puts to any other branch are rejected by the API. `enable-branch` / `disable-branch` toggle whether a shared branch's staging environment stays always active (vs. only while viewed in the UI); `branches` reports it as `ENABLED` and `environments list --type staging` lists the enabled ones |
0 commit comments