Skip to content

Conversation

@MattKotsenas
Copy link
Member

Description

Previously, the resilience pipeline used to create the Kusto databases had two shortcomings:

  1. Only handled the throttle exception
  2. Relatively long delay before retry

Address both of those issues by:

  • Extract the resilience pipeline into its own internal class so it can be tested
  • Update the pipeline to handle exceptions that implement Kusto's common interface
  • Update the pipeline to use a shorter timeout but with more tries and an exponential backoff

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@Copilot Copilot AI review requested due to automatic review settings September 30, 2025 22:33
@github-actions
Copy link
Contributor

github-actions bot commented Sep 30, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11752

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11752"

@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Sep 30, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Sep 30, 2025
Copy link
Contributor

Copilot AI left a comment

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 improves the retry logic for Azure Kusto emulator operations by making it more robust and configurable. The changes extract the resilience pipeline into a dedicated class and expand retry capabilities beyond just throttle exceptions.

Key changes:

  • Creates a new internal class to handle Kusto-specific resilience patterns with improved retry configuration
  • Replaces the inline pipeline with a more comprehensive solution that handles any non-permanent Kusto exception
  • Adds comprehensive unit tests to verify retry behavior for different exception types

Reviewed Changes

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

File Description
src/Aspire.Hosting.Azure.Kusto/AzureKustoEmulatorResiliencePipelines.cs New internal class providing pre-configured resilience pipeline with exponential backoff and transient error detection
src/Aspire.Hosting.Azure.Kusto/AzureKustoBuilderExtensions.cs Removes inline pipeline definition and uses the new centralized resilience pipeline
tests/Aspire.Hosting.Azure.Kusto.Tests/KustoResiliencePipelinesTests.cs Adds unit tests covering retry behavior for temporary, permanent, and non-Kusto exceptions

@davidfowl davidfowl merged commit b3582d2 into dotnet:main Oct 1, 2025
311 checks passed
@davidfowl
Copy link
Member

Do we want to backport this to 9.5.1?

@dotnet-policy-service dotnet-policy-service bot added this to the 13.0 milestone Oct 1, 2025
@eerhardt
Copy link
Member

eerhardt commented Oct 1, 2025

/backport to release/9.5

@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2025

Started backporting to release/9.5: https://github.com/dotnet/aspire/actions/runs/18166908504

@eerhardt
Copy link
Member

eerhardt commented Oct 1, 2025

Do we want to backport this to 9.5.1?

I don't think it will hurt. Customer feedback we've heard on a new integration.

@MattKotsenas MattKotsenas deleted the refactor/kusto-emulator-retry branch October 1, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-integrations Issues pertaining to Aspire Integrations packages community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants