-
-
Notifications
You must be signed in to change notification settings - Fork 515
Upgrade to .NET 10 and Aspire 13 #2036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
9
commits into
main
Choose a base branch
from
copilot/upgrade-to-net10-aspire13
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
47688ca
Initial plan
Copilot 284a78f
Upgrade to .NET 10 and Aspire 13
Copilot 382f45b
Fix Aspire 13 breaking changes and build issues
Copilot f2f0f14
Add upgrade notes documentation
Copilot a66d929
Fix Kibana configuration, update VSCode paths, and remove upgrade notes
Copilot c19bb00
Fix Aspire SDK version and add TODO for Kibana lifecycle hook migration
Copilot 51cc6ca
PR Feedback
niemyjski 26cab69
Updates package dependencies
niemyjski 8c68fbd
WIP - Upgrade swashbuckle
niemyjski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "sdk": { | ||
| "version": "9.0.100-rc*", | ||
| "version": "10.0.100", | ||
| "rollForward": "latestMinor" | ||
| } | ||
| } |
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
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
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
52 changes: 29 additions & 23 deletions
52
src/Exceptionless.AppHost/Extensions/KibanaConfigWriterHook.cs
niemyjski marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,42 @@ | ||
| using System.Text; | ||
| using Aspire.Hosting.Lifecycle; | ||
| using System.Text; | ||
niemyjski marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| using Aspire.Hosting.ApplicationModel; | ||
|
|
||
| namespace Aspire.Hosting; | ||
|
|
||
| internal class KibanaConfigWriterHook : IDistributedApplicationLifecycleHook | ||
| internal static class KibanaConfigWriterExtensions | ||
| { | ||
| public async Task AfterEndpointsAllocatedAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken) | ||
| public static IResourceBuilder<KibanaResource> ConfigureElasticsearchHosts( | ||
| this IResourceBuilder<KibanaResource> builder, | ||
| IEnumerable<ElasticsearchResource> elasticsearchResources) | ||
| { | ||
| if (appModel.Resources.OfType<KibanaResource>().SingleOrDefault() is not { } kibanaResource) | ||
| return; | ||
|
|
||
| var elasticsearchInstances = appModel.Resources.OfType<ElasticsearchResource>(); | ||
|
|
||
| if (!elasticsearchInstances.Any()) | ||
| return; | ||
| builder.WithAnnotation(new EnvironmentCallbackAnnotation(async context => | ||
| { | ||
| var hostsVariableBuilder = new StringBuilder(); | ||
|
|
||
| var hostsVariableBuilder = new StringBuilder(); | ||
| foreach (var elasticsearchInstance in elasticsearchResources) | ||
| { | ||
| if (elasticsearchInstance.PrimaryEndpoint.IsAllocated) | ||
| { | ||
| if (hostsVariableBuilder.Length > 0) | ||
| hostsVariableBuilder.Append(","); | ||
|
|
||
| var endpoint = elasticsearchInstance.PrimaryEndpoint; | ||
| hostsVariableBuilder.Append(endpoint.Scheme) | ||
| .Append("://") | ||
| .Append(endpoint.Host) | ||
| .Append(":") | ||
| .Append(endpoint.Port); | ||
| } | ||
| } | ||
github-code-quality[bot] marked this conversation as resolved.
Fixed
Show fixed
Hide fixed
|
||
|
|
||
| foreach (var elasticsearchInstance in elasticsearchInstances) | ||
| { | ||
| if (elasticsearchInstance.PrimaryEndpoint.IsAllocated) | ||
| if (hostsVariableBuilder.Length > 0) | ||
| { | ||
| var connectionString = await elasticsearchInstance.GetConnectionStringAsync(); | ||
| if (hostsVariableBuilder.Length > 0) | ||
| hostsVariableBuilder.Append(","); | ||
| hostsVariableBuilder.Append(elasticsearchInstance.PrimaryEndpoint.Scheme).Append("://").Append(elasticsearchInstance.PrimaryEndpoint.ContainerHost).Append(":").Append(elasticsearchInstance.PrimaryEndpoint.Port); | ||
| context.EnvironmentVariables["ELASTICSEARCH_HOSTS"] = hostsVariableBuilder.ToString(); | ||
| } | ||
| } | ||
|
|
||
| kibanaResource.Annotations.Add(new EnvironmentCallbackAnnotation(context => | ||
| { | ||
| context.EnvironmentVariables.Add("ELASTICSEARCH_HOSTS", hostsVariableBuilder.ToString()); | ||
| await Task.CompletedTask; | ||
| })); | ||
|
|
||
| return builder; | ||
| } | ||
| } | ||
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.