aspire
aspire copied to clipboard
Add net9.0 support for EFCore components
Not blocking, but for futureproofing also change EnrichNpgsqlDbContext, EnrichMySqlDbContext, EnrichOracleDatabaseDbContext and EnrichCosmosDbContext to use ConfigureDbContext
We want to use these new APIs as part of these EF upgrade so that we can actually use the new methods and make sure they work in the scenarios they were designed for.
@radical Please check the build changes. I updated the ZipTestArchive target to handle the multi-target build step which doesn't have OutDir. And also solved a concurrency issue when the two tfms are built in parallel and would write the same file. The non-default TFM is added as a prefix on the zip filename.
This needs the workload testing bits to be re-enabled, which would give us a 9.0 sdk with 8.0 runtime to allow running the net9.0 tests here on helix.
The net9.0 tests here will need a 9 sdk to run on helix. We could normally get that from the workload-tests setup, but since that is disabled in the repo right now, and waiting for on https://github.com/dotnet/aspire/pull/5932 - we can't test it right now.
I hope to have the templates PR merged this week. If this needs to merged sooner, then an alternative would be to get the test infra (just msbuild should be enough) changes here.
net9.0 tests are running succesfully:
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests-net9.0Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests-net9.0Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests-net9.0Aspire.Oracle.EntityFrameworkCore.Tests-net9.0
I have tested it works locally.
- service with net9.0
- both
AddNpgsqlDbContextandEnrichNpgsqlDbContext - enabling/disabling metrics from code
Two tests failed. One seems to be a random issue with te TestHost.App playground and the fact that RabbitMQ management was assigned the same port as CatalogDb web app.
The second is related to this change, but the tests timed out. Increasing it for now since none show up as a problem.
One of the workload tests failed with:
Failed to download package 'OpenTelemetry.Instrumentation.Http.1.9.0' from 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/opentelemetry.instrumentation.http/1.9.0/opentelemetry.instrumentation.http.1.9.0.nupkg'.
The HTTP request to 'GET https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/opentelemetry.instrumentation.http/1.9.0/opentelemetry.instrumentation.http.1.9.0.nupkg' has timed out after 100000ms.
We can re-try.
@radical workload test failure? This one was already failing in the previous run btw.
backport this to rc1 please
/backport to release/9.0-rc1
Started backporting to release/9.0-rc1: https://github.com/dotnet/aspire/actions/runs/11238857605
@sebastienros backporting to release/9.0-rc1 failed, the patch most likely resulted in conflicts:
$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Add net9.0 support for EFCore components
.git/rebase-apply/patch:45: trailing whitespace.
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
M eng/Versions.props
M global.json
M src/Components/Common/EntityFrameworkUtils.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Components/Common/EntityFrameworkUtils.cs
Auto-merging global.json
Auto-merging eng/Versions.props
Applying: Update Npgsql
Using index info to reconstruct a base tree...
M Directory.Packages.props
M eng/Versions.props
Falling back to patching base and 3-way merge...
Auto-merging eng/Versions.props
CONFLICT (content): Merge conflict in eng/Versions.props
Auto-merging Directory.Packages.props
CONFLICT (content): Merge conflict in Directory.Packages.props
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 advice.mergeConflict false"
Patch failed at 0002 Update Npgsql
Error: The process '/usr/bin/git' failed with exit code 128
Please backport manually!
@sebastienros an error occurred while backporting to release/9.0-rc1, please check the run log for details!
Error: git am failed, most likely due to a merge conflict.