Skip to content

v0.2.1: UTF-8 output, --compact, schema warnings, ReadyToRun#21

Merged
sbroenne merged 6 commits into
mainfrom
v0.2.1-improvements
Jul 10, 2026
Merged

v0.2.1: UTF-8 output, --compact, schema warnings, ReadyToRun#21
sbroenne merged 6 commits into
mainfrom
v0.2.1-improvements

Conversation

@sbroenne

Copy link
Copy Markdown
Owner

Summary

Follow-up improvements after the v0.2.0 review, plus a trimming feasibility investigation. Non-breaking; ships as v0.2.1.

Added

  • --compact option on all commands to emit single-line JSON for piping into line-based tools (e.g. jq).
  • schema now reports a top-level partial flag and a warnings array when one or more rowsets fail, and each failed rowset carries error/exception fields.
  • Unit tests for the newly extracted BuildConnectionString (SSPI composition, catalog inclusion/omission, explicit-string precedence).

Changed

  • UTF-8 console output is now forced, so non-ASCII catalog/dimension/measure names and values serialize and parse correctly regardless of host code page (real correctness fix for international models).
  • Schema rowset failures are reported via warnings/per-rowset error fields instead of a synthetic error row inside rows.
  • Release builds use ReadyToRun for faster startup, and GitHub Release notes are now populated from the matching CHANGELOG.md section instead of a generic string.
  • Env-var-sensitive tests are serialized via a shared xUnit collection to remove a parallelism race.

Fixed

  • Stale hard-coded version fallback (0.1.0) used when the assembly informational version is unavailable.

Trimming investigation

Attempted a trimmed self-contained publish. It fails at build (IL2026) because JSON output uses reflection-based serialization of anonymous types, and ADOMD.NET itself is heavily reflection-based and not trim-annotated, so it would break at runtime even after refactoring all output to source-generated DTOs. Conclusion: trimming is not viable; ReadyToRun is the safe packaging win and is included here instead.

Verification

  • 48/48 tests pass; dotnet format clean.
  • Live-tested against FinHubAS/KPILakeRevenue: --compact output, UTF-8 role names, and the schema partial/warnings path (via an unsupported rowset GUID) all behaved correctly.
  • Confirmed the ReadyToRun single-file publish builds and runs (adomd --version -> 0.2.1).

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

Stefan Broenner and others added 6 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>
…og release notes

- Force UTF-8 console output so non-ASCII AS names/values serialize correctly
- Add --compact option for single-line JSON output
- Surface schema rowset failures via top-level partial/warnings + per-rowset error fields
- Extract testable BuildConnectionString; add unit tests
- Fix stale version fallback string
- release.yml: ReadyToRun publish + release notes extracted from CHANGELOG
- Serialize env-var-sensitive tests via shared xUnit collection

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@sbroenne
sbroenne merged commit 3508156 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