Migrate ADX operator federation Kusto data-plane usage to azkustodata
- Dominant language
- Go
- Stars
- 28
- Forks
- 17
- Avg merge
- 11h 40m
- Merged PRs (30d)
- 42
Description
## Context
The ADX operator still uses the legacy `github.com/Azure/azure-kusto-go/kusto` data-plane client for federation, heartbeat, and hub artifact reconciliation.
This is separate from the ARM management client usage, which already uses `armkusto` and is not in scope.
## Files
- `operator/adx.go`
- `operator/adx_test.go`
## Current legacy usage
- Creates data-plane clients with `kusto.NewConnectionStringBuilder` and `kusto.New`.
- Uses default credential and user-assigned managed identity auth through the old connection string builder.
- Executes management commands with legacy `client.Mgmt`.
- Executes heartbeat table queries with legacy `client.Query`.
- Builds statements with legacy `kusto/kql`.
- Reads rows with `NextRowOrError` and `ToStruct`.
## Major paths to migrate
- `ensureHeartbeatTable`: `.show tables | count`, `.create table`.
- `HeartbeatFederatedClusters` / `heartbeatFederatedCluster`: schema collection and heartbeat ingestion.
- Schema discovery: `.show databases`, `.show database schema`, `.show functions`, `.show function schema as json`.
- Heartbeat ingest: `.ingest inline into table`.
- `FederateClusters`: reads heartbeat rows and reconciles hub artifacts.
- Hub artifact reconciliation: hub tables, entity groups, `.execute database script`, `.create-or-alter function`.
## Acceptance criteria
- Operator production code no longer imports `github.com/Azure/azure-kusto-go/kusto...` packages.
- Federation heartbeat send/read behavior remains covered by tests.
- Hub table, entity group, and generated function reconciliation continue to work.
- ARM `armkusto` provisioning code remains unchanged except where needed to keep interfaces clean.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in operator/adx.go and compare the legacy data-plane client usage with the interfaces and tests in operator/adx_test.go. Run the existing federation and heartbeat tests before changing anything. Done means the production code no longer imports the legacy Kusto packages, heartbeat behavior remains covered, and hub artifact reconciliation still works while ARM provisioning stays unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- backend, databases, distributed-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100