chore: Migrate Query CLI to use Query v2 Service#18
Open
abhisek wants to merge 4 commits into
Open
Conversation
Member
abhisek
commented
May 27, 2026
- chore: Update gRPC SDK
- chore: Migrate query cli to use Query v2 Service
- fix: TUI for human on get schema
SafeDep Report SummaryPackage Details
This report is generated by SafeDep Github App |
There was a problem hiding this comment.
Pull request overview
Migrates the query CLI from the v1 QueryService to the v2 QueryService in the SafeDep gRPC SDK. The v2 API returns typed column metadata, query stats, join edges, enum values, and usage rules, so this PR expands the internal types, decoders, renderers, and tests to surface that richer schema/result information. The PR also bumps the gRPC SDK + google.golang.org/grpc versions and applies gofmt to a handful of unrelated files.
Changes:
- Update
cloudquerytypes/service to consume the v2 proto: typedColumn/Stats, schemaEdges/Usage/EnumValue/Indexed/Groupable/Aggregatable,columnTypeNamehelper, and removal of client-side column-set derivation (server now supplies ordered columns). - Extend
query schema get(new--tablefilter, table-grouped TUI with caps codes + enum truncation + refs footnotes + joins + usage sections) andquery exec(typed JSON columns, stats/footer, raised proto bounds: SQL 16000, page token 2048). - Bump gRPC SDK to
1.6.2-20260524054719-…andgoogle.golang.org/grpcto1.81.0; gofmt-only adjustments acrossinternal/cmd/endpoint/*,internal/auth,internal/agent,internal/storage, etc.
Reviewed changes
Copilot reviewed 14 out of 26 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod, go.sum | Bump SafeDep gRPC SDK and grpc to v1.81.0. |
| internal/cloudquery/types.go | Add Column, Stats, EnumValue, JoinEdge, Usage; extend SchemaTable/SchemaColumn. |
| internal/cloudquery/service.go | Switch client to v2; decode columns/stats/edges/usage/enums; add columnTypeName. |
| internal/cloudquery/service_test.go | New tests for typed columns, schema decoding, enum mapping, and gRPC status pass-through. |
| internal/cmd/query/exec.go | Typed JSON columns, stats, RFC3339 generated_at, TUI footer; bumps for new proto bounds. |
| internal/cmd/query/exec_input.go | Doc-only update reflecting v2 page-token bound. |
| internal/cmd/query/exec_test.go | Cover typed columns, stats, footer, next-page hint. |
| internal/cmd/query/schema.go | Add --table filter, sectioned TUI with caps codes, enum truncation, refs footnote, joins, usage. |
| internal/cmd/query/schema_test.go | Cover filtering, sectioned table render, enum truncation, time annotation, caps helpers. |
| docs/cmd/query-exec.md, docs/cmd/query-schema-get.md | Document new output shapes, bounds, and --table flag. |
| internal/cmd/endpoint/, internal/auth/, internal/agent/, internal/storage/ | gofmt-only whitespace adjustments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
arunanshub
previously approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



