Skip to content

Migrate alerter to azkustodata#1185

Open
mkeesey wants to merge 2 commits into
mainfrom
alerter-azkustodata
Open

Migrate alerter to azkustodata#1185
mkeesey wants to merge 2 commits into
mainfrom
alerter-azkustodata

Conversation

@mkeesey

@mkeesey mkeesey commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This migrates the alerter query engine to use the updated azkustodata library. Ingestor was migrated several months ago.

A primary benefit of the upgrade is better cleanup with partial reads - this library version better propagates result closure to the http layer to prevent partially-read bodies from getting a connection fully stuck.

Copilot AI 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.

Pull request overview

This PR migrates the alerter query engine and related test/mocking code from the legacy kusto client to the newer azkustodata library, aiming to improve HTTP connection cleanup when query results are only partially read.

Changes:

  • Replaced legacy kusto/table.Row usage with azkustodata/azkustodata/query (azquery.Row) across the alerter query pipeline.
  • Updated multi-cluster Kusto client to use IterativeDataset/Dataset APIs and explicitly close iterative datasets.
  • Refactored tests and fakes to construct azquery.Row values and validate row consumption/closure behavior.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
alerter/service.go Removes legacy kusto interface surface and wires executor to the new multi-kusto client.
alerter/rules/store.go Switches rule statement representation to azkustodata.Statement and kql builder.
alerter/multikustoclient/client.go Implements querying via azkustodata datasets, adds parameter options and row emission logic.
alerter/multikustoclient/client_test.go Reworks tests to use azquery datasets/rows and asserts dataset closure/consumption.
alerter/multikustoclient/auth.go Updates auth configurator types to azkustodata.ConnectionStringBuilder.
alerter/lint_test.go Updates lint fake client to emit azquery.Row without legacy iterator mocking.
alerter/fake.go Removes legacy mock-row iterator logic from the fake alerter Kusto client.
alerter/engine/client.go Updates engine client callback signature to azquery.Row.
alerter/engine/context.go Builds azkustodata.Statement and kql.Parameters for the new query engine.
alerter/engine/worker.go Updates worker handler signatures to consume azquery.Row.
alerter/engine/worker_test.go Updates worker tests for the new row type.
alerter/engine/status_test.go Updates status tests to pass azquery.Row values.
alerter/engine/fake.go Updates fake engine client callback signature for azquery.Row.
alerter/engine/executor.go Updates row parsing and severity conversion to azkustodata/value types.
alerter/engine/executor_test.go Refactors executor tests to build azquery.Row/azvalue values.

Comment thread alerter/multikustoclient/client.go Outdated
Comment thread alerter/engine/executor.go
This migrates the alerter query engine to use the updated azkustodata
library. Ingestor was migrated several months ago.

A primary benefit of the upgrade is better cleanup with partial reads -
this library version better propagates result closure to the http layer
to prevent partially-read bodies from getting a connection fully stuck.

Copilot AI 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.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.

@mkeesey mkeesey marked this pull request as ready for review July 1, 2026 18:03
@mkeesey mkeesey enabled auto-merge (rebase) July 1, 2026 18:03
if v < int64(math.MinInt) {
return math.MinInt
}
return int(v)
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