Skip to content

Add Windows CLI starter validation#15446

Open
sebastienros wants to merge 12 commits intorelease/13.2from
sebros/cli-startup-check-13-2-r132
Open

Add Windows CLI starter validation#15446
sebastienros wants to merge 12 commits intorelease/13.2from
sebros/cli-startup-check-13-2-r132

Conversation

@sebastienros
Copy link
Contributor

Description

Adds a new Windows PR CI validation for the Aspire CLI in tests.yml that dogfoods the CLI from the current PR artifacts, creates starter templates, runs aspire start, and verifies the expected resources come up.

This runs alongside the existing PR dogfood flow by downloading eng/scripts/get-aspire-cli-pr.ps1 from the PR head SHA and passing the current workflow run ID so the job can install the CLI built by the same CI run. The validation now covers both the Express/React starter (aspire-ts-starter) and the C# starter equivalent on this branch (aspire-starter).

Validation:

  • Parsed .github/workflows/tests.yml successfully with Ruby YAML parsing.
  • Verified local CLI template mapping and command behavior, including the need to pass --output in non-interactive mode.
  • Local smoke investigation also exposed an existing detached aspire start disposed-service-provider failure outside the workflow wiring.

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 20, 2026 17:45
@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15446

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15446"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Windows PR-only GitHub Actions job to dogfood the Aspire CLI produced by the current workflow run, generate starter templates, run aspire start, and validate expected resources reach a healthy running state.

Changes:

  • Introduces cli_starter_validation_win job that installs the PR-built CLI via get-aspire-cli-pr.ps1, creates two starter projects, starts them, and polls aspire resources for readiness.
  • Collects and uploads diagnostic logs/artifacts for troubleshooting.
  • Updates the final results gate to include the new validation job.

sebastienros and others added 3 commits March 20, 2026 10:56
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>
@sebastienros
Copy link
Contributor Author

Regarding the Copilot overview review: thanks for the summary. This one is informational rather than actionable feedback, so I did not make an additional code change for it.

sebastienros and others added 8 commits March 20, 2026 11:23
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>
@joperezr
Copy link
Member

closing and reopening to trigger CI.

@joperezr joperezr closed this Mar 21, 2026
@joperezr joperezr reopened this Mar 21, 2026
@github-actions
Copy link
Contributor

🎬 CLI E2E Test Recordings — 54 recordings uploaded (commit 6c26a14)

View recordings
Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunEmptyAppHostProject ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
GlobalMigration_PreservesAllValueTypes ▶️ View Recording
GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View Recording
RunWithMissingAwaitShowsHelpfulError ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
TypeScriptAppHostWithProjectReferenceIntegration ▶️ View Recording

📹 Recordings uploaded automatically from CI run #23385918629

with:
versionOverrideArg: ${{ inputs.versionOverrideArg }}

cli_starter_validation_win:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: to follow precedent as well as make this file easier to parse, can we split the actual implementation of the validation to a separate file that gets ipmorted here?

// If not trusted at all, run the trust operation
if (trustResult.IsNotTrusted)
{
if (_isWindows() && !hostEnvironment.SupportsInteractiveInput)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I understand the motivation here, I can't help but feel that this is probably kind of custom. Also, IIUC this would make it where it would be impossible to turrn this on in GitHub actions, Azure pipelines, jenkins etc, which while it is probably a good default, it means that if someone for whatever reason does want to prompt for trust it is not possible.

Totally ok to push back, but what do you think about having an env variable that we check instead that only controls this particular behavior, so something like: ASPIRE_SKIP_CERTIFICATE_TRUST or something along those lines? Again, totally ok if you think this is better, just curious to hear your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants