Repository navigation
[DO NOT MERGE] Investigate Windows OpenSSH verification failures - #21685
James Newton-King (JamesNK) wants to merge 6 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <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 -- 21685Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21685" |
There was a problem hiding this comment.
🟡 Changes recommended
Leading-zero array indices are accepted by config set but not resolved consistently by config get, causing round-trip failures for keys such as plugins.00.
1 open issue
1 file not reviewed
src/Aspire.Cli/Resources/ConfigCommandStrings.Designer.cs: Generated file
What changed in this PR
This temporary, do-not-merge branch investigates Windows OpenSSH verification timeouts in Aspire CLI. It also includes the array-aware configuration editing changes from #21572.
Changes:
- Adds lifecycle-only OpenSSH probe diagnostics without changing the five-second timeout.
- Targets repeated Windows reproduction runs and temporarily makes CI manually triggered.
- Adds array-aware configuration editing, reading, deletion, and listing, with regression tests, snapshots, and updated help resources.
| File | Description |
|---|---|
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.SetConfigurationAsync_NumericPropertiesRemainObjects.verified.json |
Records preservation of numeric object keys. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.SetConfigurationAsync_EditsArrayAndPreservesOtherEntries_key=skillSources.team.plugins[0]_isGlobal=True.verified.json |
Records global bracket-index editing. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.SetConfigurationAsync_EditsArrayAndPreservesOtherEntries_key=skillSources.team.plugins[0]_isGlobal=False.verified.json |
Records local bracket-index editing. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.SetConfigurationAsync_EditsArrayAndPreservesOtherEntries_key=skillSources.team.plugins.0_isGlobal=True.verified.json |
Records global dotted-index editing. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.SetConfigurationAsync_EditsArrayAndPreservesOtherEntries_key=skillSources.team.plugins.0_isGlobal=False.verified.json |
Records local dotted-index editing. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.SetConfigurationAsync_EditsArrayAndPreservesOtherEntries_key=skillSources-team-plugins-0_isGlobal=True.verified.json |
Records global colon-index editing. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.SetConfigurationAsync_EditsArrayAndPreservesOtherEntries_key=skillSources-team-plugins-0_isGlobal=False.verified.json |
Records local colon-index editing. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.SetConfigurationAsync_CreatesNestedArraysAndObjects.verified.json |
Records nested container creation. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.SetConfigurationAsync_CreatesArrayAndAppendsWithoutGaps_original={}.verified.json |
Records creation of a missing array. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.SetConfigurationAsync_CreatesArrayAndAppendsWithoutGaps_original={-plugins--null}.verified.json |
Records array creation from null. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.GetLocalConfigurationAsync_FlattensArraysWithBracketIndices.verified.txt |
Records indexed listing and empty containers. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.DeleteConfigurationAsync_RemovesArrayElementAndCompactsIndices_key=plugins[0]_isGlobal=True.verified.json |
Records global bracket-index deletion. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.DeleteConfigurationAsync_RemovesArrayElementAndCompactsIndices_key=plugins[0]_isGlobal=False.verified.json |
Records local bracket-index deletion. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.DeleteConfigurationAsync_RemovesArrayElementAndCompactsIndices_key=plugins.0_isGlobal=False.verified.json |
Records dotted-index deletion. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.DeleteConfigurationAsync_RemovesArrayElementAndCompactsIndices_key=plugins-0_isGlobal=False.verified.json |
Records colon-index deletion. |
tests/Aspire.Cli.Tests/Snapshots/ConfigurationServiceTests.DeleteConfigurationAsync_PreservesEmptyArraysAndArrayElements.verified.json |
Records empty-array and element preservation. |
tests/Aspire.Cli.Tests/Snapshots/ConfigCommandTests.ConfigCommands_BracketArrayPathsRoundTrip.verified.json |
Records command round-trip output. |
tests/Aspire.Cli.Tests/Configuration/ConfigurationServiceTests.cs |
Tests array operations and rejected edits. |
tests/Aspire.Cli.Tests/Commands/ConfigCommandTests.cs |
Tests command round trips and error handling. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.zh-Hant.xlf |
Updates Traditional Chinese localization metadata. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.zh-Hans.xlf |
Updates Simplified Chinese localization metadata. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.tr.xlf |
Updates Turkish localization metadata. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.ru.xlf |
Updates Russian localization metadata. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.pt-BR.xlf |
Updates Brazilian Portuguese localization metadata. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.pl.xlf |
Updates Polish localization metadata. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.ko.xlf |
Updates Korean localization metadata. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.ja.xlf |
Updates Japanese localization metadata. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.it.xlf |
Updates Italian localization metadata. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.fr.xlf |
Updates French localization metadata. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.es.xlf |
Updates Spanish localization metadata. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.de.xlf |
Updates German localization metadata. |
src/Aspire.Cli/Resources/xlf/ConfigCommandStrings.cs.xlf |
Updates Czech localization metadata. |
src/Aspire.Cli/Resources/ConfigCommandStrings.resx |
Adds array-path help and validation messages. |
src/Aspire.Cli/Resources/ConfigCommandStrings.Designer.cs |
Exposes matching resource accessors. |
src/Aspire.Cli/Git/GitCommandRunner.cs |
Logs OpenSSH probe timing and outcome. |
src/Aspire.Cli/Configuration/ConfigurationService.cs |
Implements array-aware paths and traversal. |
docs/specs/cli-config-sources.md |
Documents array syntax and editing behavior. |
.github/workflows/reproduce-flaky-tests.yml |
Targets five Windows runners with five iterations each. |
.github/workflows/ci.yml |
Temporarily replaces automatic triggers with manual dispatch. |
Review effort: Balanced
| if (!int.TryParse(part.Name, NumberStyles.None, CultureInfo.InvariantCulture, out var index)) | ||
| { | ||
| throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationArrayIndexInvalid, key), nameof(key)); | ||
| } |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Noncanonical array indices such as plugins.00 are accepted by writes but treated literally by reads, causing successful updates to fail round-trip retrieval.
1 file not reviewed
src/Aspire.Cli/Resources/ConfigCommandStrings.Designer.cs: Generated file
Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Leading-zero dotted indices can update an array element that the same key cannot read back, requiring consistent index handling and a round-trip regression test.
1 file not reviewed
src/Aspire.Cli/Resources/ConfigCommandStrings.Designer.cs: Generated file
Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Noncanonical array indices break read/write consistency, while the increased timeout and mismatched test workflow undermine the planned diagnostic investigation.
3 open issues
1 file not reviewed
src/Aspire.Cli/Resources/ConfigCommandStrings.Designer.cs: Generated file
Review effort: Balanced
| TEST_FILTER: '--filter-class "*.GitCommandRunnerTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"' | ||
|
|
||
| # Target operating systems (comma-separated) | ||
| # Options: ubuntu-latest, windows-latest, macos-latest | ||
| TARGET_OSES: "ubuntu-latest,windows-latest" | ||
| TARGET_OSES: "ubuntu-latest,windows-latest,macos-latest" |
| // the caller's acquisition deadline or leaving an unbounded probe. | ||
| var result = await ProcessCaptureRunner.RunAsync<string?>( | ||
| probe, TimeSpan.FromSeconds(5), | ||
| probe, TimeSpan.FromSeconds(30), |

Description
DO NOT MERGE: completed temporary investigation for #21572.
The original Windows failures occurred just beyond the five-second OpenSSH version-probe limit. Natural reproduction did not fail: 375 isolated cases and 144 concurrent cases passed on Windows CI. A deterministic six-second startup regression did reproduce the cutoff locally: the valid probe returned
TimedOutafter 5.099 seconds. This confirms the cutoff failure mode, not the precise cause of the original runner delay.The fix allows 30 seconds for version probing while preserving the enclosing acquisition cancellation budget, successful-exit and OpenSSH-banner checks. Lifecycle logging records only elapsed time, exit code, failure kind, and cancellation state. Regression coverage includes slow startup, invalid banners, nonzero exits, and cancellation.
The clean fix has been transferred to the original PR branch locally, after rebasing it onto main. It is uncommitted and has not been pushed to #21572. Temporary workflow changes and the concurrent-startup stress harness were excluded. This investigation PR is being closed.
Validation
dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-method "*.VerifyOpenSshAsync_*" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true": failed as expected before the timeout fix; slow startup timed out, four other cases passed.dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class "*.GitCommandRunnerTests" --filter-class "*.ConfigSourceServiceTests" --filter-class "*.ConfigurationServiceTests" --filter-class "*.ConfigCommandTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true": passed, 391 tests; four Linux-only tests skipped on Windows.dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj --no-build --no-launch-profile -- --filter-method "*.ConfigureUnattendedSsh_VerifiesOpenSshAndAppliesBatchModeAfterUrlRewrites" --filter-method "*.VerifyOpenSshAsync_*" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true": passed in 20 repetitions after building, 200 cases.git diff --check: passed. No workflow changes remain on the original PR branch.The controlled pre-fix failure and post-fix success establish the startup-budget regression. Repeated isolated and concurrent CI runs verify the proposed fix without claiming that the original natural failure was reproduced.
Security considerations
Executable selection, rejection of custom command strings, OpenSSH-banner validation, exit-code checks, and
BatchMode=yesare unchanged. The probe remains bounded and honors caller cancellation. No commands, paths, or captured output are added to logs.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?