[Bug]: Kusto result flush drops outcomes and reports success on ingestion failure

Open Beginner friendly
#468 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go

Research direction

Read tests/e2e/results/kusto_sink.go around lines 70–108 and the existing failure test in tests/e2e/results/kusto_sink_test.go around lines 106–126. Use the fake ingestor to check flush behavior when marshaling or ingestion fails. Done means failures are returned to the aggregate sink and the buffered batch remains available for retry after an unsuccessful flush.

Written by the indexing model from the issue text.

Description

bug
Problem

The portable E2E Kusto result sink removes every buffered outcome before attempting ingestion. If marshaling or FromReader fails, Flush logs the error, returns nil, and leaves no buffered outcomes available for retry.

Expected behavior is to return the ingestion error or retain the batch for a bounded retry. Actual behavior silently loses result telemetry while callers, including Multi.Flush, observe success.

Reproduction
  1. Construct a KustoSink with one or more buffered outcomes.
  2. Inject an ingestor whose FromReader returns an error such as ingestion timeout.
  3. Call Flush().
  4. Observe that Flush() returns nil after writing an error to stderr.
  5. Call Flush() again and observe that the original outcomes are gone and cannot be retried.
TauGrid or tau version

63b8faf6a6278479953cda62f5ddcd47a4e676c3

Environment

tests/e2e/results with Kusto result export enabled. The defect can be reproduced entirely with the existing fake ingestor and does not require a live Kusto cluster.

Relevant output
results: kusto ingestion failed (outcomes lost): ingestion timeout
# Flush still returns success.
Additional context

tests/e2e/results/kusto_sink.go:70-108 clears k.buf before serialization and ingestion, then converts both marshal and ingestion failures into log-only success. The existing test around tests/e2e/results/kusto_sink_test.go:106-126 demonstrates the behavior. Preserve the batch until success and return actionable errors to the aggregate sink.

Confirmation
  • I searched existing issues for this problem.
  • I removed secrets, private endpoints, customer data, and other sensitive information.
  • This is not a security vulnerability.
Dominant language
Go
Stars
59
Forks
8
Avg merge
1d 15h
Merged PRs (30d)
84

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/taugrid

All issues in Azure/taugrid

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.