Skip to content

Conversation

mitchdenny
Copy link
Member

@mitchdenny mitchdenny commented Apr 7, 2025

Fixes: #8573

This PR adds an RPC protocol compat check. When connecting the back channel it asks the apphost to specify which capabilities that it has. At the moment the only capability is baseline.v0 which it validates on connection.

In the future as the CLI starts to support more scenarios it will be able to ask the apphost if it supports a particular feature and either fail or fallback gracefully.

@Copilot Copilot AI review requested due to automatic review settings April 7, 2025 00:59
@mitchdenny mitchdenny self-assigned this Apr 7, 2025
@mitchdenny mitchdenny requested review from davidfowl and removed request for Copilot April 7, 2025 01:00
Copy link
Contributor

@Copilot 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 9 out of 9 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/Aspire.Cli/Backchannel/AppHostBackchannel.cs:109

  • The variable name 'capabilties' is misspelled. Rename it to 'capabilities' for clarity and consistency.
var capabilties = await rpc.InvokeWithCancellationAsync<string[]>("GetCapabilitiesAsync",

@mitchdenny mitchdenny added this to the 9.2 milestone Apr 7, 2025
@mitchdenny mitchdenny force-pushed the mitchdenny/apphost-compat-and-capabilities branch from d45b05e to 565af31 Compare April 7, 2025 01:59
@danmoseley danmoseley added the Servicing-approved Approved for servicing release label Apr 7, 2025
@danmoseley
Copy link
Member

/backport to release/9.2

@danmoseley danmoseley removed the Servicing-approved Approved for servicing release label Apr 7, 2025
Copy link
Contributor

github-actions bot commented Apr 7, 2025

Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14314447857

@danmoseley danmoseley merged commit ecf3678 into main Apr 7, 2025
174 checks passed
Copy link
Contributor

github-actions bot commented Apr 7, 2025

@danmoseley backporting to "release/9.2" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Add RPC protocol compat check.
.git/rebase-apply/patch:173: trailing whitespace.
            
.git/rebase-apply/patch:258: trailing whitespace.
                        
.git/rebase-apply/patch:344: trailing whitespace.
                    
.git/rebase-apply/patch:539: trailing whitespace.
            
.git/rebase-apply/patch:569: trailing whitespace.
            
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	src/Aspire.Cli/Commands/PublishCommand.cs
M	src/Aspire.Cli/Commands/RunCommand.cs
M	src/Aspire.Hosting/Backchannel/AppHostRpcTarget.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Aspire.Hosting/Backchannel/AppHostRpcTarget.cs
Auto-merging src/Aspire.Cli/Commands/RunCommand.cs
CONFLICT (content): Merge conflict in src/Aspire.Cli/Commands/RunCommand.cs
Auto-merging src/Aspire.Cli/Commands/PublishCommand.cs
CONFLICT (content): Merge conflict in src/Aspire.Cli/Commands/PublishCommand.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Add RPC protocol compat check.
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@danmoseley danmoseley deleted the mitchdenny/apphost-compat-and-capabilities branch April 7, 2025 16:27
@danmoseley
Copy link
Member

/backport to release/9.2

Copy link
Contributor

github-actions bot commented Apr 7, 2025

Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14314458956

Copy link
Contributor

github-actions bot commented Apr 7, 2025

@danmoseley backporting to "release/9.2" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Add RPC protocol compat check.
.git/rebase-apply/patch:173: trailing whitespace.
            
.git/rebase-apply/patch:258: trailing whitespace.
                        
.git/rebase-apply/patch:344: trailing whitespace.
                    
.git/rebase-apply/patch:539: trailing whitespace.
            
.git/rebase-apply/patch:569: trailing whitespace.
            
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	src/Aspire.Cli/Commands/PublishCommand.cs
M	src/Aspire.Cli/Commands/RunCommand.cs
M	src/Aspire.Hosting/Backchannel/AppHostRpcTarget.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Aspire.Hosting/Backchannel/AppHostRpcTarget.cs
Auto-merging src/Aspire.Cli/Commands/RunCommand.cs
CONFLICT (content): Merge conflict in src/Aspire.Cli/Commands/RunCommand.cs
Auto-merging src/Aspire.Cli/Commands/PublishCommand.cs
CONFLICT (content): Merge conflict in src/Aspire.Cli/Commands/PublishCommand.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Add RPC protocol compat check.
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

mitchdenny added a commit that referenced this pull request Apr 7, 2025
* 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]>
danmoseley pushed a commit that referenced this pull request Apr 8, 2025
* Add RPC protocol compat check. (#8577)

* 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]>

* Fix --watch hangs. (#8585)

* Fix --watch hangs.

* Don't prebuild in watch mode.

* Fix up merge.

* Add watch/no-build conflict fix.

* Fix spelling.

* Spelling.

---------

Co-authored-by: David Fowler <[email protected]>
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make sure the aspire cli can detect incompatible versions of the apphost
3 participants