Skip to content

.NET: Improve Cosmos DB Emulator startup reliability - #3932

Merged
westey (westey-m) merged 5 commits into
microsoft:mainfrom
TheovanKraay:cosmosdb-build-fix
Aug 31, 2026
Merged

.NET: Improve Cosmos DB Emulator startup reliability#3932
westey (westey-m) merged 5 commits into
microsoft:mainfrom
TheovanKraay:cosmosdb-build-fix

Conversation

@TheovanKraay

Copy link
Copy Markdown
Contributor

Motivation and Context

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings February 13, 2026 19:45
@markwallace-microsoft Mark Wallace (markwallace-microsoft) added the .NET Usage: [Issues, PRs], Target: .Net label Feb 13, 2026
@github-actions github-actions Bot changed the title Improve Cosmos DB Emulator startup reliability .NET: Improve Cosmos DB Emulator startup reliability Feb 13, 2026

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 improves the reliability of Cosmos DB Emulator startup in GitHub Actions CI/CD workflows by implementing retry logic, extended timeouts, and better diagnostics. The changes address intermittent failures when starting the emulator during automated testing.

Changes:

  • Added comprehensive retry logic with up to 3 attempts and cleanup between retries
  • Increased timeout from 4 minutes to 10 minutes per attempt
  • Added detailed status monitoring and diagnostic logging
  • Included a trivial comment change to the C# file to trigger CosmosDB emulator testing

Reviewed changes

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

File Description
dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosChatHistoryProvider.cs Added comment to trigger CI/CD CosmosDB emulator testing
.github/workflows/dotnet-build-and-test.yml Enhanced Cosmos DB Emulator startup with retry logic, extended timeout, cleanup procedures, and diagnostic logging

Comment thread dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosChatHistoryProvider.cs Outdated
Comment thread .github/workflows/dotnet-build-and-test.yml
Comment thread .github/workflows/dotnet-build-and-test.yml
Comment thread .github/workflows/dotnet-build-and-test.yml
- Updated workflow structure to match new dotnet-build/dotnet-test split
- Integrated enhanced emulator startup with 600s timeout and 3 retries
- Updated environment variable to COSMOSDB_EMULATOR_AVAILABLE
- Preserved all reliability improvements from original PR
# Conflicts:
#	.github/workflows/dotnet-build-and-test.yml
This was referenced Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Usage: [Issues, PRs], Target: .Net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants