Error handling for GetCapabilitiesAsync connection issues#8614
Merged
Error handling for GetCapabilitiesAsync connection issues#8614
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
davidfowl
approved these changes
Apr 8, 2025
danmoseley
reviewed
Apr 8, 2025
danmoseley
reviewed
Apr 8, 2025
| if (!capabilities.Any(s => s == "baseline.v0")) | ||
| catch (RemoteMethodNotFoundException ex) | ||
| { | ||
| logger.LogError(ex, "Failed to connect to AppHost backchannel. The AppHost must be updated to a version that supports the baseline.v0 capability."); |
Member
There was a problem hiding this comment.
nit, wouldn't this only happen if GetCapabilitiesAsync wasn't defined, which it will be in every version.
Member
Author
There was a problem hiding this comment.
Correct :) But we are being defensive because this caught us out.
danmoseley
approved these changes
Apr 8, 2025
Member
Author
|
/backport to release/9.2 |
Contributor
|
Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14343458431 |
radical
pushed a commit
that referenced
this pull request
Apr 9, 2025
* Error out when GetCapabiltiesAsync is missing or unexpected exception occurs. * Update src/Aspire.Cli/DotNetCliRunner.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Youssef1313
added a commit
that referenced
this pull request
Apr 9, 2025
* Migrate from VSTest to Microsoft.Testing.Platform * Address TODO * Cleanup stuff around runsettings * Add comment * Progress * Remove locale * Always show live output * Restore test session timeout * Fix timeout * Fix typo * Fix duplicate commnand-line options * Fix Linux * Fix for Linux * Fix * Fix * Filter failing * Fix * ignore exit code 8 * Fix extra dot * Ignore exit code * Fix duplicate --ignore-exit-code * Fix playground tests on helix * Move to RepoTesting.props * Fix results dir * Fix * Progress * Fix duplicate command-line option * Missing report-trx * Run executable * Address review comments * Revert "Run executable" This reverts commit d10e168. * dotnet dll * Introduce version selector for Aspire templates (#8625) * Introduce version selecto to aspire new * Update src/Aspire.Cli/Commands/NewCommand.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/Aspire.Cli/Commands/NewCommand.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: David Fowler <davidfowl@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Error handling for GetCapabilitiesAsync connection issues (#8614) * Error out when GetCapabiltiesAsync is missing or unexpected exception occurs. * Update src/Aspire.Cli/DotNetCliRunner.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Obsolete AddAzureContainerAppsInfrastructure (#8639) * Obsolete AddAzureContainerAppsInfrastructure This method is no longer meant to be used. Instead developers should be calling AddAzureContainerAppEnvironment. Covert the tests using this API to the new API * Fix volume output naming issue We weren't discriminating between volumes and bindmounts, which caused a cache collision. * Switch the prefix at the beginning * Add error handling for package updates in workflow (#8390) * Filter out tracing health endpoints in service defaults templates (#8643) * Filter out tracing health endpoints Fixes #8580 * Fix typo * Show neutral icon for container exiting with status code 0 (#8477) * Show neutral icon for container exiting with status code 0 * Show info/stop icons for all exited resources with status code 0 * Add finished test for custom resource, remove exit code expectation * update tests * [tests] Correctly mark Aspire.Dashboard.Tests.Integration.Playwright.AppBarTests with RequiresPlaywright (#8647) * [tests] Skip generating Directory.Packages.Versions.props for Test (#8621) .. Utility projects. * Fix running playground tests on windows --------- Co-authored-by: Ankit Jain <radical@gmail.com> Co-authored-by: Dan Moseley <danmose@microsoft.com> Co-authored-by: Mitch Denny <midenn@microsoft.com> Co-authored-by: David Fowler <davidfowl@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com> Co-authored-by: Damian Edwards <damian@damianedwards.com> Co-authored-by: Adam Ratzman <adam@adamratzman.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement error handling for missing or unexpected exceptions during the connection to the AppHost backchannel, ensuring proper logging and exception propagation.
Previously if we got an unexpected exception we would keep retrying. We now treat an unexpected exception as a failure condition. We also specifically handle the scenario where the GetCapabiltiiesAsync method is missing on the remote app host which can occur with some preview builds of 9.2.0 (9.1.0 builds are already treated as explicitly incompatible by this stage).