Repository navigation
Redact restore diagnostics and clarify update validation failures - #22208
David Negstad (danegsta) wants to merge 11 commits into
Conversation
Capture stdout and stderr from the validation restore that runs after applying candidate update steps, display them before the update is rolled back, and clarify that a failed validation restore means the update was not applied. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve isolated restore settings alongside diagnostic output capture and exercise the failure case through dry-run validation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22208Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22208" |
There was a problem hiding this comment.
🟡 Changes recommended
Failed restore diagnostics retain credential-bearing feed URLs in displayed output and persistent logs, requiring redaction before buffering and regression coverage for both paths.
1 open issue
1 file not reviewed
src/Aspire.Cli/Resources/UpdateCommandStrings.Designer.cs: Generated file
What changed in this PR
This PR makes failed aspire update validation restores diagnosable for .NET AppHosts, building on the dry-run workflow introduced in #22207.
Changes:
- Captures restore stdout and stderr, displays them on failure, and logs the captured diagnostics at Debug level.
- Revises the failure message to identify the channel and state that the update was not applied.
- Extends failure-path tests to verify both output streams and refreshes localization resources.
| File | Description |
|---|---|
tests/Aspire.Cli.Tests/Projects/ProjectUpdaterTests.cs |
Verifies stdout and stderr from failed dry-run validation. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.zh-Hant.xlf |
Refreshes the Traditional Chinese translation entry. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.zh-Hans.xlf |
Refreshes the Simplified Chinese translation entry. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.tr.xlf |
Refreshes the Turkish translation entry. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.ru.xlf |
Refreshes the Russian translation entry. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.pt-BR.xlf |
Refreshes the Brazilian Portuguese translation entry. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.pl.xlf |
Refreshes the Polish translation entry. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.ko.xlf |
Refreshes the Korean translation entry. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.ja.xlf |
Refreshes the Japanese translation entry. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.it.xlf |
Refreshes the Italian translation entry. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.fr.xlf |
Refreshes the French translation entry. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.es.xlf |
Refreshes the Spanish translation entry. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.de.xlf |
Refreshes the German translation entry. |
src/Aspire.Cli/Resources/xlf/UpdateCommandStrings.cs.xlf |
Refreshes the Czech translation entry. |
src/Aspire.Cli/Resources/UpdateCommandStrings.resx |
Revises the validation failure message and placeholder notes. |
src/Aspire.Cli/Resources/UpdateCommandStrings.Designer.cs |
Synchronizes the resource accessor’s documentation. |
src/Aspire.Cli/Projects/ProjectUpdater.cs |
Captures, logs, and displays restore diagnostics before rollback. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Preserve restore diagnostics assertions while adopting the parent's dry-run test helper. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve display-only restore diagnostics with the renamed isolated restore option. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Reuse upstream restore capture and regression coverage, remove persistent raw diagnostic logging, and retain the channel-aware validation failure message. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Use candidate and referenced-project source settings with the existing NuGet redactor before buffering or logging either output stream. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Collect RestoreAdditionalProjectSources from AppHost and referenced-project evaluations and suppress raw probe diagnostics before redacting restore output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
James Newton-King (JamesNK)
left a comment
There was a problem hiding this comment.
One credential-redaction issue: raw subprocess Trace logging bypasses the updater callbacks.
Preserve sensitive-source collection alongside isolated restore preview support. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Keep redacted callback logging while disabling the child process logger that runs before output callbacks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Tests selector3 / 101 PR test projects · 4 PR jobs, from 21 changed files. Selected PR test projects (3 / 101)
Selected PR jobs (4)
How these were chosen — grouped by what changed📦 affected project 🔧 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |

Description
aspire updatenow captures native restore diagnostics following #22355, but those diagnostics can contain credential-bearing feed URLs that are persisted in the CLI log. This follow-up applies the existing NuGet redactor before stdout or stderr is buffered or logged, while preserving useful diagnostics for troubleshooting validation failures.The redactor uses known sources from candidate and referenced-project NuGet configurations, plus
RestoreAdditionalProjectSourcesvalues obtained during project evaluation. Raw evaluation diagnostics are suppressed so those source properties do not leak through the probes themselves. Restore diagnostics remain logged for success and failure, and are displayed only on failure.The failure summary now includes the channel and project and explicitly states that the update was not applied.
Redaction scope
This reuses package-only polyglot restore redaction; it does not scan diagnostic text for unknown URLs or inspect restore graph files. Sources introduced only by restore-time targets, additive source changes after planning, and arbitrary non-source secrets are outside this change's coverage.
Stacked on #22207. Follows up on #22355. No new dependencies.
Validation
The following command passed 10/10 cases, covering project and file-based AppHosts, successful and failed restores, both output streams, root and referenced-project sources, evaluated additive sources, encoded credentials, probe suppression, and candidate feed configuration:
Checklist
<remarks />and<code />elements on your triple slash comments?