Docs: Document concurrency model for parallel execution
- Dominant language
- Go
- Stars
- 569
- Forks
- 364
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 136
Description
## Description
The exegraph parallel execution engine introduces concurrent access to several types: `environment.Environment`, `environment.Manager`, `kubectl.Cli`, `service_target_containerapp`, `service_target_aks`, and `serviceManager`. These types now have internal mutexes to protect concurrent access.
Future contributors adding methods to these types must acquire the appropriate locks, but there's no centralized documentation explaining the concurrency model.
## Proposed Solution
Add a section to `docs/` (e.g., `docs/architecture/concurrency-model.md`) or `cli/azd/AGENTS.md` that:
- Lists which types are now accessed concurrently under the graph engine
- Documents the locking contracts for each type
- Explains what a contributor must do when adding a write path
## Context
- Requested by @vhvb1989 in [PR #7776 comment](https://github.com/Azure/azure-dev/pull/7776#issuecomment-4280643268)
- Related: #7969 (lock acquisition order for saveMu)
- Without this, races will be introduced by contributors who don't know about the concurrency requirements
Contributor guide
Assessment
This issue has not been assessed yet.