Skip to content

v0.2.0: multi-result-set support, truncation reporting, retries, secret redaction, and test suite - #17

Merged
sbroenne merged 4 commits into
mainfrom
stbrnner-microsoft-supreme-parakeet
Jul 10, 2026
Merged

v0.2.0: multi-result-set support, truncation reporting, retries, secret redaction, and test suite#17
sbroenne merged 4 commits into
mainfrom
stbrnner-microsoft-supreme-parakeet

Conversation

@sbroenne

Copy link
Copy Markdown
Owner

Summary

This release addresses a critical review of the CLI covering correctness, security, and reliability, adds a full test suite, and bumps dependencies to their latest versions.

Fixes

  • ExecuteTabular now reads all result sets from a query (previously silently dropped everything after the first).
  • catalogs/schema/query/dmv output now reports rowCount and truncated so callers can tell when --limit has cut off rows.
  • CancellationToken is now wired end-to-end (Ctrl+C now cancels in-flight operations, exits with code 130).
  • Connection string can now be supplied via ADOMD_CONNECTION_STRING env var instead of only --connection-string, reducing secret exposure in shell history/process listings.
  • schema command gained a repeatable --rowset <GUID> escape hatch for arbitrary schema rowsets, plus README docs for common rowset GUIDs.
  • Added --retries/--retry-delay-ms options with backoff for connection opening.
  • Exception messages are now redacted (password/pwd/secret/client secret/access token) before being written to stderr/JSON.
  • Distinct exit codes: 0 success, 2 error, 130 cancelled.

Dependencies

  • Microsoft.AnalysisServices.AdomdClient 19.114.0 -> 19.114.8
  • Spectre.Console 0.57.1 -> 0.57.2
  • SDK (global.json) 10.0.300 -> 10.0.301
  • dependabot.yml now also covers the new test project

Tests

  • New src/Adomd.Cli.Tests xUnit project, 42 tests covering settings validation, retry/backoff (including cancellation), secret redaction, and truncation/rowset logic.
  • CI/CodeQL workflows updated to build/test the whole solution.

Release process

  • release.yml now verifies the pushed tag matches the csproj VersionPrefix, and publishes a SHA256 checksum alongside the release zip.

Breaking change

JSON output shape changed:

  • catalogs/schema rows are now wrapped: { "rowCount": n, "truncated": bool, "rows": [...] } instead of a bare array.
  • query/dmv no longer return top-level rows/rowCount - they return resultSets: [ { rowCount, truncated, rows }, ... ] since a query can produce multiple result sets.

Documented in CHANGELOG.md under [0.2.0].

Manual verification

Tested live against a real Analysis Services instance (FinHubAS / KPILakeRevenue catalog) via Windows Integrated auth: probe, schema --limit, query/dmv with DAX, ADOMD_CONNECTION_STRING env var path, schema --rowset (valid + invalid GUID), retry/backoff against a bad host, and error paths - all behaved as expected. This can't be run in CI since it requires a live AS server.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Stefan Broenner and others added 4 commits July 10, 2026 08:36
…lation, env-var secrets, schema escape hatch, dep bumps

- Add Adomd.Cli.Tests xUnit project (24 tests) covering settings validation, connection-string resolution, query resolution, and rowset truncation
- ExecuteTabular now iterates NextResult() so multi-statement query batches return all result sets instead of silently dropping all but the first
- Every JSON rowset now reports { rowCount, truncated, rows } so callers can tell when --limit cut off data
- query/dmv now return a resultSets array (breaking change, pre-1.0)
- Wire CancellationToken into query execution (command.Cancel()); distinct exit code 130 for cancellation vs 2 for errors
- Support ADOMD_CONNECTION_STRING env var as an alternative to --connection-string to avoid secrets in shell history/process args
- Add --rowset <GUID> escape hatch to schema command for arbitrary schema rowsets
- Release workflow verifies tag version matches csproj VersionPrefix before publishing
- Bump Microsoft.AnalysisServices.AdomdClient to 19.114.8, Spectre.Console to 0.57.2, .NET SDK pin to 10.0.301
- Update README and add CHANGELOG.md documenting the above

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…et GUID docs

- CommonSettings: --retries/--retry-delay-ms options; OpenConnection retries via new cancellable RetryHelper (unit tested independently of ADOMD)
- SecretRedactor: scrubs password/pwd/secret/client secret/access token fragments from exception messages before they hit stderr or the JSON error payload, in case a provider echoes the connection string
- release.yml: generates and publishes a SHA256 checksum file alongside the zip
- README: documents --retries/--retry-delay-ms, checksum verification, redaction behavior, and a table of common schema --rowset GUIDs sourced from AdomdSchemaGuid
- 18 new tests (RetryHelper, SecretRedactor, retry option validation); 42/42 passing
- Verified live against FinHubAS/KPILakeRevenue: retries observably extend connection attempts on failure, normal probe/schema/query paths unaffected

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@sbroenne
sbroenne merged commit 3fe9659 into main Jul 10, 2026
3 checks passed
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.

1 participant