Repository navigation
[release/13.6] Use shared helper for CLI log creation - #21282
Jose Perez Rodriguez (joperezr) merged 2 commits into
Conversation
Backport of #21276. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8f47f33a-b5a8-4258-95d7-843d027f4064
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21282Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21282" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
Docker diagnostic exports retain owner-only permissions, preventing non-root host runners from collecting root-owned logs.
1 open issue
What changed in this PR
Backports #21276 to release/13.6, using the shared directory helper and tightening Unix permissions for CLI diagnostic logs.
Changes:
- Restricts log files to
0600and repairs the dedicated logs directory to0700, while preserving existing custom-directory permissions. - Handles access-denied failures without preventing CLI startup.
- Adds permission and logging regression tests, plus diagnostic privacy documentation.
| File | Description |
|---|---|
| tests/Aspire.Cli.Tests/Diagnostics/FileLoggerProviderTests.cs | Tests permissions, access failures, and log persistence. |
| src/Aspire.Cli/README.md | Documents log privacy and sensitive content. |
| src/Aspire.Cli/Program.cs | Passes the dedicated logs directory to the provider. |
| src/Aspire.Cli/Diagnostics/FileLoggerProvider.cs | Applies private Unix permissions and handles creation failures. |
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Tests selectorSelects the full PR test matrix + all PR-gated jobs (ALL) — a rule matching 'eng/Versions.props' selects ALL Selection computed for commit |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
d0a2421
into
release/13.6
|
✅ No documentation update needed. excluded → backport. exclusion_reasons: base_branch_is_release, title_release_prefix ( |

Description
Backport of #21276 to
release/13.6.Use the shared directory helper when creating the CLI logs directory.
Fixes # (issue)
Validation
./restore.sh— passed, 0 warnings and 0 errors.MSBUILDTERMINALLOGGER=false dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class '*.FileLoggerProviderTests' --filter-class '*.ProgramTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'— passed, 23 tests, 0 failures and 0 skipped.Checklist
<remarks />and<code />elements on your triple slash comments?Customer Impact
Makes CLI log creation use the shared helper.
Testing
Release restore passed; 23 focused logger and startup tests passed (exact commands recorded above).
Risk
Low. Localized CLI log creation change; no public API changes.
Regression?
Unknown.