microsoft / microsoft/aspire

[Failing test]: AzureCosmosDBEmulatorFunctionalTests.VerifyWaitForOnCosmosDBEmulatorBlocksDependentResources — Cosmos DB emulator image evaluation period has expired

Open Beginner friendly
#18,898 2 comments 0 reactions 0 assignees View on GitHub
area-integrations area-testing failing-test triage:bot-seen
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Build information

Build: https://github.com/microsoft/aspire/actions/runs/30228147364
Build error leg or test failing: `Tests / Hosting.Azure / Hosting.Azure (ubuntu-latest)` — `Aspire.Hosting.Azure.Tests.AzureCosmosDBEmulatorFunctionalTests.VerifyWaitForOnCosmosDBEmulatorBlocksDependentResources(usePreview: False)`

### Fill in the error message template

## Error Message

```json
{
"ErrorMessage": "The evaluation period has expired.",
"ErrorPattern": "",
"BuildRetry": false,
"ExcludeConsoleLog": false
}
```

### Details

This is **not flakiness** — the `mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:stable` container image has a baked-in evaluation expiry that has now passed. The container exits with code 1 immediately after start, so the test can never reach `Running` and every run fails deterministically.

Container output (from the failing job):

```
Status: Downloaded newer image for mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:stable
Digest: sha256:53724d515b65a93238113a8f981df62ce238a93685fd2061cfb60444f881e2cf
...
Error: The evaluation period has expired.
./cosmosdb-emulator: ERROR: PAL initialization failed. Error: 104
```

Resulting test failure:

```
Xunit.MicrosoftTestingPlatform.XunitException: Aspire.Hosting.DistributedApplicationException :
Stopped waiting for resource 'resource' to become healthy because it failed to start.
```

Earlier attempts in the same run failed the same way via the 10-minute `WaitForResourceAsync` timeout:

```
System.OperationCanceledException : Resource 'resource' failed to reach one of the target states: [Running] before the operation was cancelled.
- Current State: Exited
- Exit Code: 1
```

### Impact

This blocks unrelated PRs. It reproduced on 4 consecutive attempts of run 30228147364 (the auto-rerun-transient-failures automation retried it three times and gave up), and the same job failed on unrelated PR #18895 in the same window. It affects any PR whose changed paths route to the `Hosting.Azure` test leg.

### Notes

The sibling tests in this class are already disabled for a different reason (#5820), so this is the last remaining test in the class that still starts the Cosmos emulator.

Disabling with `[ActiveIssue]` pointing at this issue to unblock CI. This should be re-enabled once a refreshed emulator image is published — and it's worth considering pinning to a digest, or adding a startup check that surfaces "evaluation period has expired" as a clear diagnostic, so the next expiry is obvious instead of showing up as a generic timeout.

Contributor guide

Open the contributing guide

Research direction

Start with Aspire.Hosting.Azure.Tests.AzureCosmosDBEmulatorFunctionalTests.VerifyWaitForOnCosmosDBEmulatorBlocksDependentResources and inspect how the Cosmos DB emulator is started and annotated. Reproduce the failure in the Hosting.Azure test leg, then apply the issue's ActiveIssue-based CI workaround; done means the test leg no longer fails because the expired image cannot start, while re-enabling remains dependent on a refreshed image.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, docker
Domain
cloud, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.