Skip to content

Update to .NET 11 - #896

Open
Saancreed wants to merge 11 commits into
v11.0-previewfrom
net11
Open

Saancreed wants to merge 11 commits into
v11.0-previewfrom
net11

Conversation

@Saancreed

Copy link
Copy Markdown
Member

Unfortunately, the Npgsql shenanigans which require us to pull packages from daily .NET package feed make me very reluctant to merge this before upstream resolves this in a reasonable manner. See the "Update integration tests to .NET 11 and Npgsql.EFCore to rc.1" and "Update Extensions version to satisfy EFCore requirements" for details.

And because the output is now isolated, hijack the ContentRoot early enough to prevent the test host from complaining.
@github-actions

Copy link
Copy Markdown

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
950 946 0 4 0 0 2m 27s

Skipped

Tests Status
LeanCode.IntegrationTests.TimestampTzTests.Sorting_by_LocalTimestampWithoutOffset_returns_results_in_expected_order skipped ⏭️
LeanCode.IntegrationTests.TimestampTzTests.Sorting_by_UtcTimestamp_returns_results_in_expected_order skipped ⏭️
LeanCode.IntegrationTests.TimestampTzTests.Sorting_by_LocalTimestampWithoutOffset_generates_SQL_with_expected_AT_TIME_ZONE_operator skipped ⏭️
LeanCode.Azure.Tests.AzureStorageAuditLogIntegrationTests.Ensure_that_all_logs_are_correctly_uploaded_to_multiple_files skipped ⏭️

🎉 No failed tests in this run.

Github Test Reporter by CTRF 💚

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 61.90476% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.34%. Comparing base (aa8a1e2) to head (f89807d).

Files with missing lines Patch % Lines
...eanCode.AzureIdentity/DefaultLeanCodeCredential.cs 0.00% 4 Missing ⚠️
.../Incoming/ServiceToServiceAuthenticationHandler.cs 0.00% 2 Missing and 1 partial ⚠️
...ructure/LeanCode.Firebase/FirebaseConfiguration.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           v11.0-preview     #896      +/-   ##
=================================================
- Coverage          85.41%   85.34%   -0.07%     
=================================================
  Files                246      246              
  Lines               5210     5227      +17     
  Branches             385      385              
=================================================
+ Hits                4450     4461      +11     
- Misses               676      681       +5     
- Partials              84       85       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tomaszlaskowskiLC tomaszlaskowskiLC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Saancreed I agree on waiting until the package issue is resolved. Is there expected timeline for that?

)
{
message.Tokens = await tokenStore.GetTokensAsync(userId, cancellationToken);
message.Fids = await tokenStore.GetTokensAsync(userId, cancellationToken);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

TIL, that Token is getting obsolete. 😛

Anyway, it's not obvious that you can pass Tokens as Fids.
If we would like to keep "Tokens" everywhere else and use Fids property in this client, we should add comment with an explanation here and mention it in the docs.

Also, let's ensure there is no changes required on the client side (I mean mobile apps 😛).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah, good point. I initially found https://firebase.google.com/docs/projects/manage-installations#retrieving-an-fcm-registration-token which made me think "ok, so it's fine to keep using FirebaseMessaging.getInstance().token", but it appears that it's kinda misleading and this isn't actually related to migration to FIDs.

We may want to keep using Tokens for some time, as it's documented to also accept FIDs during the migration period… whatever that is.

new AppOptions
{
Credential = GoogleCredential.FromJson(cfg),
Credential = CredentialFactory.FromJson<ServiceAccountCredential>(cfg).ToGoogleCredential(),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

NIT: technically this narrows accepted credentials to service accounts (although it should be the way-to-go here).
Might be worth noting in the docs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Noting, yes. Notice how the changelog entries for v11 are still missing, it will be a good place to put it there once it actually materializes.

Comment thread Directory.Packages.props
@@ -97,36 +103,36 @@
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="$(ExtensionsVersion)" />

<PackageVersion Include="Microsoft.Extensions.Telemetry.Testing" Version="8.0.0-rc.2.23510.2" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No bump for this one?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is already the newest version: https://www.nuget.org/packages/Microsoft.Extensions.Telemetry.Testing

I'm not sure what we need this for, but the package appears to be kind of abandoned. Didn't want to touch this during the bump though.

) : IntegrationFactAttribute(sourceFilePath, sourceLineNumber)
public sealed class PostgresOnlyFactAttribute : IntegrationFactAttribute
{
public static bool IsPostgres => Environment.GetEnvironmentVariable(TestDatabaseConfig.ConfigEnvName) == "postgres";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

NIT: I guess IsPostgres belongs more to TestDatabaseConfig.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure, can move it there.

ConvertDateTimeBySystemTimeZoneIdMethod,
Expression.Property(Expression.Property(node.Expression, UtcTimestampProperty), UtcDateTimeProperty),
// Npgsql 11 translates UtcDateTime as a no-op which retains DateTimeOffset as the SQL
// expression's CLR type. ToUniversalTime retags it as DateTime, which the outer translator requires.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can also link your issue here (shows blocker explicitly): npgsql/efcore.pg#3912. 😄

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

IIRC I committed that before I made this issue 🙃

@Saancreed

Copy link
Copy Markdown
Member Author

Is there expected timeline for that?

Nothing confirmed yet, but I'd expect rc.2 to address that. If not, we'll have to wait for 11.0.0 to be released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants