Repository navigation
Clean up stale dashboard run locks - #20140
James Newton-King (JamesNK) merged 4 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20140Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20140" |
There was a problem hiding this comment.
🟢 Approval recommended
The cleanup is safely gated by exclusive lock acquisition and has focused regression coverage.
Pull request overview
Extends dashboard run pruning to remove stale, unheld lock files while preserving active locks.
Changes:
- Deletes exclusively acquirable top-level run lock files.
- Adds regression coverage for abandoned, active, and current-run locks.
File summaries
| File | Description |
|---|---|
src/Aspire.Dashboard/ServiceClient/DashboardRunStore.cs |
Adds abandoned lock cleanup during pruning. |
tests/Aspire.Dashboard.Tests/Model/DashboardDataSourceTests.cs |
Verifies only unheld locks are deleted. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
9f2d9f7
into
microsoft:main
|
🔍 CI Failure Analysis: Transient Infrastructure Failure The CI build failed due to transient infrastructure issues. Failed jobs:
If a rerun was not already requested automatically, visit the workflow run page to rerun the failed jobs manually. |
Description
Dashboard lock files normally disappear through
DeleteOnClose, but an interrupted process or filesystem operation can leave an unheld sibling lock file behind. Because persistent run pruning and temporary-directory housekeeping only enumerated directories, a lock whose corresponding directory was already gone could remain indefinitely.This change extends both cleanup paths to enumerate their expected lock-file patterns and attempt an exclusive acquisition. Successfully acquired locks are unheld and are deleted when the lock is disposed; locks held by active dashboard processes and files outside the expected naming pattern remain untouched. Each dashboard also skips its own known lock instead of provoking an expected sharing violation.
Added focused tests covering abandoned locks, actively held locks, current dashboard locks, and unrelated temporary lock-file names. Also ran the nearest retention, active-run, and deletion-failure pruning tests.
Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?