Skip to content

feat: add ListActiveQueriesAsync and CancelActiveQueryAsync - #26

Open
krinart wants to merge 1 commit into
trunkfrom
feat/active-queries
Open

feat: add ListActiveQueriesAsync and CancelActiveQueryAsync#26
krinart wants to merge 1 commit into
trunkfrom
feat/active-queries

Conversation

@krinart

@krinart krinart commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds SpiceClient.ListActiveQueriesAsync() (GET /v1/sql/active) and SpiceClient.CancelActiveQueryAsync(queryId) (POST /v1/sql/{id}/cancel), matching support already shipped in the gospice SDK.
  • Since the runtime doesn't hand a submitted query its own ID, ListActiveQueriesAsync is how a caller discovers the ID that CancelActiveQueryAsync needs.
  • Query IDs are validated as canonical UUIDs client-side before being placed in a URL path, so malformed input never reaches the runtime.

Test plan

  • New unit tests in SpiceTest/ActiveQueriesTest.cs against a loopback stub HTTP server (no live runtime required) covering success, empty-list, permission/not-found/status-code error paths, and UUID validation edge cases.
  • dotnet build/dotnet test pass locally for net8.0/net9.0/netstandard2.0 (net10.0 not buildable in this sandbox, no SDK installed; unaffected by this change).

…ng SQL queries

Wraps the runtime's GET /v1/sql/active and POST /v1/sql/{id}/cancel endpoints,
bringing the .NET SDK in line with gospice's active-queries support. The
runtime never hands a submitted query its own ID, so ListActiveQueriesAsync is
how a caller finds the ID CancelActiveQueryAsync needs.
krinart added a commit that referenced this pull request Aug 19, 2026
krinart added a commit that referenced this pull request Aug 20, 2026
* Prepare release 0.4.0

* docs: add Nsql/NsqlGenerateSqlAsync to v0.4.0 release notes

#25 merged Nsql support into trunk after this release-prep branch was
created; merge trunk in and document it alongside the other v0.4.0
features.

* docs: note that active-queries (#26) and async-queries (#27) are not part of v0.4.0

* Update release notes for v0.4.0

Removed release status section and details about excluded features for v0.4.0.

* Reintroduce mTLS Client Certificate Support in release notes

Reintroduced the Mutual TLS (mTLS) Client Certificate Support section in the release notes for v0.4.0, ensuring clarity on its implementation and usage.
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