Skip to content

Conversation

@mitchdenny
Copy link
Member

Manual backport of #8577 to release/9.2

Customer Impact

This PR introduces an API to the AppHost RPC target which allows the CLI to query for a set of capabilities. If the required capabilities are not available then the CLI can terminate with an error message indicating the missing required capability. At the moment there is only one capability baseline.v0. This will also allow us to implement graceful fallback of behaviors in the future.

Testing

Manual

Risk

Moderate

Regression?

No

* Add RPC protocol compat check.

* Fix merge conflict.

* Fix spelling.

* Update DotNetCliRunner.cs

Co-authored-by: David Fowler <[email protected]>

* Improve error message with version info.

---------

Co-authored-by: David Fowler <[email protected]>
Copilot AI review requested due to automatic review settings April 7, 2025 22:21
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Apr 7, 2025
@mitchdenny mitchdenny changed the base branch from main to release/9.2 April 7, 2025 22:21
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.

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

Files not reviewed (4)
  • eng/Signing.props: Language not supported
  • eng/Versions.props: Language not supported
  • playground/OpenAIEndToEnd/OpenAIEndToEnd.WebStory/OpenAIEndToEnd.WebStory.csproj: Language not supported
  • playground/publishers/Publishers.AppHost/qots/Dockerfile: Language not supported

private static readonly ActivitySource s_activitySource = new ActivitySource(nameof(AppHostHelper));

internal static async Task<(bool IsCompatableAppHost, bool SupportsBackchannel)> CheckAppHostCompatabilityAsync(DotNetCliRunner runner, FileInfo projectFile, CancellationToken cancellationToken)
internal static async Task<(bool IsCompatableAppHost, bool SupportsBackchannel, string? AspireHostingSdkVersion)> CheckAppHostCompatabilityAsync(DotNetCliRunner runner, FileInfo projectFile, CancellationToken cancellationToken)
Copy link

Copilot AI Apr 7, 2025

Choose a reason for hiding this comment

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

Consider renaming 'IsCompatableAppHost' to 'IsCompatibleAppHost' to correct the spelling throughout the compatibility check API.

Suggested change
internal static async Task<(bool IsCompatableAppHost, bool SupportsBackchannel, string? AspireHostingSdkVersion)> CheckAppHostCompatabilityAsync(DotNetCliRunner runner, FileInfo projectFile, CancellationToken cancellationToken)
internal static async Task<(bool IsCompatibleAppHost, bool SupportsBackchannel, string? AspireHostingSdkVersion)> CheckAppHostCompatabilityAsync(DotNetCliRunner runner, FileInfo projectFile, CancellationToken cancellationToken)

Copilot uses AI. Check for mistakes.
.StartAsync(":hammer_and_wrench: Building app host...", async context => {
await _runner.BuildAsync(effectiveAppHostProjectFile, cancellationToken).ConfigureAwait(false);
});
if (!appHostCompatabilityCheck?.IsCompatableAppHost ?? throw new InvalidOperationException("IsCompatableAppHost is null"))
Copy link

Copilot AI Apr 7, 2025

Choose a reason for hiding this comment

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

Consider renaming 'IsCompatableAppHost' to 'IsCompatibleAppHost' to maintain consistency and correct spelling in condition checks.

Suggested change
if (!appHostCompatabilityCheck?.IsCompatableAppHost ?? throw new InvalidOperationException("IsCompatableAppHost is null"))
if (!appHostCompatabilityCheck?.IsCompatibleAppHost ?? throw new InvalidOperationException("IsCompatibleAppHost is null"))

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

Spelling!

Copy link
Member Author

Choose a reason for hiding this comment

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

Internal .. going to leave it like this for now. Will fix in main.

* Fix --watch hangs.

* Don't prebuild in watch mode.

* Fix up merge.
@danmoseley danmoseley added the Servicing-approved Approved for servicing release label Apr 8, 2025
@danmoseley danmoseley enabled auto-merge (squash) April 8, 2025 01:07
@danmoseley danmoseley merged commit 0623631 into release/9.2 Apr 8, 2025
174 checks passed
@danmoseley danmoseley deleted the manual-backport-8577 branch April 8, 2025 01:19
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-integrations Issues pertaining to Aspire Integrations packages Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants