Skip to content

Re-enable disabled CLI test (#14321)#15568

Merged
JamesNK merged 3 commits intomainfrom
enable-disabled-cli-tests
Mar 26, 2026
Merged

Re-enable disabled CLI test (#14321)#15568
JamesNK merged 3 commits intomainfrom
enable-disabled-cli-tests

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Mar 25, 2026

Description

Re-enable a disabled CLI test by removing its [ActiveIssue] attribute.

Test re-enabled

Why it's safe to re-enable

The underlying issue was resolved by #14150 ("Build in CLI if not in extension host or extension has new build capability"). That PR refactored the build-skip logic in DotNetAppHostProject.RunAsync:

  • Before: The build was skipped only when the extension reported the "devkit" capability via HasCapabilityAsync(KnownCapabilities.DevKit). The check lived in RunCommand itself and had race/timing issues with the test harness.
  • After: The build is now skipped for all extension hosts by default. It only runs if the extension explicitly reports the "build-dotnet-using-cli" capability. Additionally, watch mode is automatically enabled for extension hosts (without --start-debug-session), meaning the build code path is never reached in this scenario. The BuildCompletionSource signaling pattern also ensures RunCommand doesn't hang waiting for build results.

The test passes locally.

Fixes #14321

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
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

Remove [ActiveIssue] attributes from two CLI tests that now pass:

- Banner_NotDisplayedWithNoLogoFlag (#14307)
- RunCommand_SkipsBuild_WhenExtensionDevKitCapabilityIsAvailable (#14321)
Copilot AI review requested due to automatic review settings March 25, 2026 03:53
@github-actions
Copy link
Contributor

github-actions bot commented Mar 25, 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 -- 15568

Or

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

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

This PR re-enables two previously disabled CLI tests by removing their [ActiveIssue] attributes so they run again in the normal test suite.

Changes:

  • Re-enabled RunCommand_SkipsBuild_WhenExtensionDevKitCapabilityIsAvailable by removing its [ActiveIssue] marker.
  • Re-enabled Banner_NotDisplayedWithNoLogoFlag by removing its [ActiveIssue] marker.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/Aspire.Cli.Tests/Commands/RunCommandTests.cs Removes [ActiveIssue] to re-enable a RunCommand unit test (but the test name no longer matches the capability logic it exercises).
tests/Aspire.Cli.EndToEnd.Tests/BannerTests.cs Removes [ActiveIssue] to re-enable a banner/no-logo E2E test (but its wait condition appears inconsistent with current grouped help output).

Comment on lines 90 to 92
[Fact]
[ActiveIssue("https://github.com/microsoft/aspire/issues/14307")]
public async Task Banner_NotDisplayedWithNoLogoFlag()
{
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

Re-enabling this test will likely reintroduce the original timeout: the test body waits for help output to contain the literal text "Commands:", but the root command help is generated by GroupedHelpWriter (group headings like "App commands:", "Options:", etc.) and does not output a "Commands:" header. Consider updating the wait condition to look for stable text that is actually emitted (e.g., "Usage:" / group headings from HelpGroupStrings, or waiting for the success prompt and then asserting the banner text is absent).

Copilot uses AI. Check for mistakes.
@JamesNK JamesNK changed the title Re-enable disabled CLI tests (#14307, #14321) Re-enable disabled CLI test (#14321) Mar 25, 2026
@github-actions
Copy link
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@JamesNK JamesNK enabled auto-merge (squash) March 25, 2026 22:33
@github-actions
Copy link
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@JamesNK JamesNK merged commit 0c2f6b6 into main Mar 26, 2026
520 of 527 checks passed
@JamesNK JamesNK deleted the enable-disabled-cli-tests branch March 26, 2026 04:45
@github-actions
Copy link
Contributor

🎬 CLI E2E Test Recordings — 52 recordings uploaded (commit 1602a98)

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
Banner_NotDisplayedWithNoLogoFlag ▶️ View Recording
CertificatesClean_RemovesCertificates ▶️ View Recording
CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunEmptyAppHostProject ▶️ View Recording
CreateAndRunJavaEmptyAppHostProject ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateJavaAppHostWithViteApp ▶️ 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
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ 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 #23567568454

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aspire.Cli.Tests.Commands.RunCommandTests.RunCommand_SkipsBuild_WhenExtensionDevKitCapabilityIsAvailable

3 participants