Skip to content

fix(cli): restore query output and simplify request handling - #189

Merged
francoischalifour merged 13 commits into
mainfrom
fc/project-audit
Nov 20, 2026
Merged

francoischalifour merged 13 commits into
mainfrom
fc/project-audit

Conversation

@francoischalifour

Copy link
Copy Markdown
Member

What

Restore CSV output for schema, honor configured query display defaults, and keep SQL after -- out of flag validation. Buffered and streamed query responses now use the same NDJSON parser, so both report the response line on an execution error.

Build query requests in the command and pass a single settings object to the output writer. Buffered and streamed HTTP requests share retry and mock-response handling. Malformed retry delays fall back to standard backoff.

Restore the terminal promptly on Ctrl+C in query top --watch, compute sort keys once per snapshot, and validate app-update slugs and local preview tokens at the request boundary.

Why

The schema command advertised CSV but rejected it after fetching results. Query handlers also inferred which flags were supplied by scanning raw arguments, allowing an operand to affect the request. Using the command parser's option metadata and sharing response-handling logic removes the paths that let these behaviors diverge.

The watch cleanup was exercised in a real terminal session with populated and empty results.

Checklist

  • Tests added or updated
  • CHANGELOG.md updated

Track supplied options in the command parser so flags after the separator remain operands and config defaults take effect. Validate column widths consistently and keep schema CSV on the CLI rendering path.
Use one line parser for buffered and streamed responses. Accept empty column frames, reject scalar rows, and include the source line with execution errors.
Build the lakehouse request in the query command. Share only format, display, and pager settings with schema, and pass those settings to the output writer as one object.
Use one retry loop and mock lookup for both response readers. Keep response decoding and live timeout handling with their respective readers.

@albert20260301 albert20260301 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the full 36-file diff at 8936174a. Parser-provided explicit options keep flag-shaped SQL operands out of request/presentation decisions; schema CSV uses the client renderer while query CSV remains API-native. The shared NDJSON reader retains error-line details and cancellation cleanup; callers already collected query results before display, so removing the intermediate generator does not change public output delivery.

The local full non-Docker gate passes: types, lint, formatting, generated references, Knip, 888 unit tests, 157 black-box tests, six desktop/phone browser tests, and extracted npm-consumer smoke. Retry parity, malformed-token handling, and terminal cleanup regressions are covered. Required CI is green, including the Docker-backed integration flow and native builds; I did not run that Docker flow locally.

@francoischalifour
francoischalifour merged commit 2895b25 into main Nov 20, 2026
15 checks passed
@francoischalifour
francoischalifour deleted the fc/project-audit branch November 20, 2026 10:02
francoischalifour pushed a commit that referenced this pull request Nov 25, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.16.0](v1.15.1...v1.16.0)
(2026-11-23)


### ⚠ BREAKING CHANGES

* **app:** Local app dev and lint require a shared literal app.ts
instead of app.json. Existing projects must adapt their own declaration,
operations, and local server to SDK 0.78; package upgrade preserves
source and does not perform that migration.

### Features

* **app:** adopt data-app SDK 0.79.0
([#191](#191))
([5455194](5455194))
* **app:** scaffold data apps from published SDK examples
([#187](#187))
([97fa08b](97fa08b))


### Bug Fixes

* **cli:** preserve query results and tolerate invalid profile expiries
([#192](#192))
([ad550d5](ad550d5))
* **cli:** restore query output and simplify request handling
([#189](#189))
([2895b25](2895b25))
* **config:** store Windows secrets in Credential Manager
([#182](#182))
([8403a07](8403a07))


### Miscellaneous Chores

* release 1.16.0
([#188](#188))
([1de319d](1de319d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: altertable-release[bot] <345426372+altertable-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants