microsoft / microsoft/dcp

Persistent container creation should work for concurrent runs

Open
#116 0 comments 0 reactions 1 assignee Claimed by @karolz-ms View on GitHub
bug reliability
Dominant language
Go
Stars
189
Forks
24
Avg merge
2d 16h
Merged PRs (30d)
18

Description

### Problem
Tests (e.g. using Aspire) might want to create and share the same persistent container (e.g. a database with test data). If the tests are running concurrently, there is a race to create the container if it does not exist initially.

Container creation is a multi-step process, but our code is not resilient enough if multiple instances of DCP start to create the same container. The result usually is that one instance succeeds, while others fail, reporting the container as `FailedToStart`.

### Additional notes and requirements
- If a persistent container is reused by specific application run, it needs to be connected to the network used by that run (and disconnected from it when the run ends).
- To fix this issue we might need to invest in better DCP data store first. See https://github.com/microsoft/dcp/issues/9 for more on that.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.