Repository navigation
v1.5: move Akka.Hosting into the akka.net repository - #8591
Merged
Aaronontheweb merged 11 commits intoSep 21, 2026
Merged
Conversation
Plain content copy of the akkadotnet/Akka.Hosting repository at commit cefe3c4ccdc3149c2a2b1c8980f956b303bf1b1a (dev, 2026-09-09). No files are modified in this commit; the monorepo adaptation follows in the next one so reviewers can diff the two. Included: Akka.Hosting, Akka.Remote.Hosting, Akka.Cluster.Hosting, Akka.Persistence.Hosting, Akka.Hosting.TestKit, Akka.Hosting.TestKit.Xunit2, their test projects, Akka.Hosting.API.Tests, and the SimpleDemo, LoggingDemo and Asp.LoggingDemo examples under src/examples/Hosting. Not included: Akka.Hosting.Tests.Performance (NBench), the OpenTelemetry demo and its Aspire AppHost, and the repo's own build, CI and docs scaffolding. Commit history and tags remain in the archived Akka.Hosting repository.
Adapts the verbatim import from the previous commit to the monorepo so the six Hosting packages build, test and ship at the Akka.NET version. Build - Library projects target $(NetStandardLibVersion);$(NetLibVersion); every Akka.* PackageReference becomes a ProjectReference; Microsoft.Extensions.* and HealthChecks use the new MsExtHostingVersion ([9.0.0,)) property and OpenTelemetry uses OpenTelemetryVersion ([1.12.0,)); local readme and LangVersion overrides removed; GenerateDocumentationFile on, with the XML doc cref fixes that required. - Test projects mirror Akka.DependencyInjection.Tests (xunitSettings.props, $(NetTestVersion), xunit v3). Akka.Remote.Hosting.Tests moves from xunit v2 to v3. Hosting tests target net10.0 only: Akka.Hosting.Tests uses [UnsafeAccessor] and init-only records that do not compile for net48. - Akka.Hosting.Tests no longer references Akka.Logger.Serilog (it pulled a NuGet copy of Akka next to the project references). The Serilog end-to-end specs are replaced by CustomLoggerEnd2EndSpecs, which drive the same three cases through an in-project capturing logger and SemanticLogMessageFormatter. - X509Certificate2 construction in Akka.Remote.Hosting.Tests uses X509CertificateLoader (SYSLIB0057 is an error under TreatWarningsAsErrors). - Examples use project references, IsPackable=false and $(NetTestVersion). - Akka.slnx gains /Contrib/Hosting/ and /Examples/Hosting/. - One NuGetAuditSuppress in Directory.Build.props for GHSA-g94r-2vxg-569j (OpenTelemetry.Api W3C header parsing). The fix ships in OpenTelemetry 1.15.3, which requires Microsoft.Extensions.* 10.0 and would raise the floor for every Hosting consumer on the 1.5 line. Akka.Hosting never parses propagation headers. Revisit when the Microsoft.Extensions floor moves. API approvals - Akka.Hosting.API.Tests is folded into Akka.API.Tests: ApproveHosting, ApproveRemoteHosting, ApproveClusterHosting, ApprovePersistenceHosting and ApproveHostingTestKit, with .DotNet and .Net baselines. The net48 baselines were derived from the netstandard2.0 assemblies (only the TargetFrameworkAttribute line differs); the Windows CI run confirms them. - xunit.v3 assemblies flow into Akka.API.Tests transitively through Akka.Hosting.TestKit; they are aliased so the project's xunit v2 attributes stay unambiguous. Docs - The Hosting README becomes docs/articles/hosting/ (index, configuration builder, dependency injection, configuration, logging, OpenTelemetry, health checks) with a new top-level Hosting entry in the articles toc. In-repo links to github.com/akkadotnet/Akka.Hosting now point at the new pages. - RELEASE_NOTES.md announces that Akka.Hosting ships from this repository. Verified locally on Linux: dotnet build Akka.slnx -c Release (0 errors); 529 Hosting tests across six projects pass; Akka.API.Tests passes (23, five new); docfx metadata clean for the Hosting assemblies; markdownlint and cspell clean over docs/**.
MsExtVersion goes from [6.0.*,) to [10.0.0,). It now covers Akka (Microsoft.Extensions.ObjectPool), Akka.DependencyInjection (DependencyInjection.Abstractions) and every Akka.Hosting package, so the separate MsExtHostingVersion property introduced by the import is gone. With the floor at 10.0, Akka.Hosting can take OpenTelemetry 1.15.3, which patches GHSA-g94r-2vxg-569j; the NuGetAuditSuppress for that advisory is removed. Microsoft.Bcl.AsyncInterfaces stays at its 6.0 floor: raising it produced 240 MSB3277 unification warnings against xunit.v3's own 6.0 floor in every net10.0 test project and buys nothing. Consumer impact: applications get Microsoft.Extensions.* 10.0.x transitively. The 10.0 packages still carry netstandard2.0 assets, so net48, net6.0 and net8.0 applications keep working. Noted in RELEASE_NOTES.md. Verified: restore and build of Akka.slnx with no NU16xx or NU19xx messages, no package downgrades; Akka.DependencyInjection.Tests, the six Hosting test projects and Akka.API.Tests pass (571 tests, no API change); packed nuspecs for Akka and Akka.Hosting show the 10.0.0 floors on both TFM groups.
…ed repo-wide, so the import dropped it and five SSL specs failed on CI)
…e (same treatment as the MultiNode.TestAdapter tests)
…EndSpecs instead of asserting on the first one (Debug-level system events raced it on CI)
…s budget for the two-node cluster to converge and await the proxy system disposal (akkadotnet/Akka.Hosting#663)
…3 s to 30 s in the singleton, sharding and sharded-daemon specs (singleton resolution timed out on CI)
… SeparateProxyWithManagerNameTest to 30 s (missed by the previous sweep; timed out on CI)
…riants, matching Akka.TestKit.Tests, and widen the upper margin to 2 s since this project runs collections in parallel (FishForMessage overshot on CI)
Aaronontheweb
added a commit
that referenced
this pull request
Sep 21, 2026
…et10.0 only (#8594) * Forward-port: move Akka.Hosting into the akka.net repository (#8591) Cherry-pick of the v1.5 squash commit 84da585 onto dev. Conflicts resolved by keeping dev's side and re-applying the Hosting-specific lines: - Directory.Build.props: MsExtVersion [10.0.0,), OpenTelemetryVersion [1.15.3,); dev's MsExtTestVersion 10.0.10 kept. - RELEASE_NOTES.md: dev keeps its 1.6.0 section; the Hosting and Microsoft.Extensions notes are added there instead of the 1.5.72 entry. - .gitignore: dev's /.playwright-mcp kept alongside the test-certificate exception. - docs/articles/utilities/logging.md: dev's wording kept; both links to the old Akka.Hosting repository now point at xref:hosting-logging. The dev-specific adaptation (net10.0-only Hosting packages, API approval baselines, breaking-changes ledger) follows in the next commit. * Akka.Persistence.FSharp: pin FSharp.Core to $(FsharpVersion) like Akka.FSharp does, so restore no longer hits NU1605 on SDKs whose implicit FSharp.Core is older than 10.1.302 * Akka.Hosting on dev: target net10.0 only, regenerate API baselines, ledger row Completes the forward-port of #8591 for the 1.6 line. - The six Hosting libraries target $(NetStandardLibVersion) (net10.0) only, like every other library on dev; v1.5's $(NetLibVersion) does not exist here. Microsoft.Bcl.AsyncInterfaces is dropped from the TestKit libraries and their tests: it existed only for netstandard2.0. - Test and example projects use $(MsExtTestVersion) for Microsoft.Extensions packages, matching Akka.DependencyInjection.Tests; Akka.Hosting.Tests uses the repo's Verify version properties. - Akka.API.Tests: the five Hosting baselines are regenerated for net10.0 (Verify's UniqueForRuntime names them .DotNet on this branch). The .Net variants brought over from v1.5 are net48 baselines dev never produces and are removed. Beyond the TargetFramework line, the diff is dev's newer PublicApiGenerator rendering nullability natively. - BREAKING_CHANGES_V1.6.md records the net10.0-only TFM and the Microsoft.Extensions 10.0 floor. IsAotCompatible was tried on the six libraries and left off: Akka.Hosting carries four IL2xxx trim warnings (WithHealthCheck<T> and AddAkka<T> generic activation, Type.GetType in the extensions list, Type.GetConstructor in the log formatter setter) which are errors under TreatWarningsAsErrors. Fixing them changes the public API surface and belongs to the AOT track. Verified on Linux: dotnet build Akka.slnx -c Release with 0 errors and 0 warnings; 571 tests pass across the six Hosting test projects, Akka.DependencyInjection.Tests and Akka.API.Tests; docfx build clean; markdownlint and cspell clean over docs/**. * Akka.Hosting: replace the six empty catch blocks Slopwatch rejects on dev The Slopwatch lane runs only on dev, so this is the first time the imported code went through it. Every empty catch is replaced with real handling: - AkkaTraceContextProcessor: the LogRecord trace-context setters are still reached through reflection, but the PropertyInfos are cached once and a failed SetValue switches the feature off for the process instead of being swallowed on every record. TryParseTraceId/TryParseSpanId validate the lowercase-hex input up front and no longer catch at all. - TestKit.Shared: a shutdown failure during DisposeAsyncCore is written to the test output instead of vanishing; it still does not mask the test's outcome. - ReceiveTests: WaitForRadioSilenceAsync_should_fail_immediately_with_bad_input asserts the exception with FluentAssertions instead of try/catch. - LoggingDemo WorkerService: catches OperationCanceledException only when the service is stopping, logs it, and disposes the timer in finally. dotnet slopwatch analyze --fail-on error: 0 errors. Akka.Hosting.Tests trace context specs and Akka.Hosting.TestKit.Tests ReceiveTests pass.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Moves Akka.Hosting into this repository on the v1.5 line. From the next 1.5.x release,
Akka.Hosting,Akka.Remote.Hosting,Akka.Cluster.Hosting,Akka.Persistence.Hosting,Akka.Hosting.TestKitandAkka.Hosting.TestKit.Xunit2build, test and publish alongside every Akka.NET release at the same version number. Package IDs, namespaces and public APIs do not change.This is the first half of the plan (v1.5 first, then
dev). Theakkadotnet/Akka.Hostingrepository is frozen at the cutoff commit and will be archived once both lines have shipped a release that contains Hosting.Why
x.y.z.1hotfix versions. Downstream repos drift as a result (Akka.Management 1.5.70 floors Hosting at 1.5.68, Persistence.Azure sits at 1.5.60, the templates at 1.5.59). One version and one pipeline removes the manual coupling.dev-only and starts after thedevimport.What is in the three commits
cefe3c4c(dev, 2026-09-09) intosrc/contrib/hosting/andsrc/examples/Hosting/. No files modified, so the second commit can be reviewed as a diff against upstream. Left behind on purpose:Akka.Hosting.Tests.Performance(NBench), the OpenTelemetry demo and its Aspire AppHost (moving to akkadotnet-code-samples), and the old repo's build, CI and docs scaffolding.$(NetStandardLibVersion);$(NetLibVersion); Akka package references become project references;GenerateDocumentationFileon, with the XML doc cref fixes that required.Akka.DependencyInjection.Tests(xunit v3,xunitSettings.props). They target net10.0 only:Akka.Hosting.Testsuses[UnsafeAccessor]and init-only records that do not compile for net48. The libraries still ship netstandard2.0 and net6.0.Akka.Hosting.Testsno longer referencesAkka.Logger.Serilog(it pulled a NuGet copy of Akka next to the project references). The three Serilog end-to-end cases now run through an in-project capturing logger andSemanticLogMessageFormatter.Akka.Hosting.API.Testsis folded intoAkka.API.Testsas five new approvals. The net48 baselines were derived from the netstandard2.0 assemblies (only theTargetFrameworkAttributeline differs); the Windows lane in this PR confirms them.docs/articles/hosting/with a new top-level Hosting section; in-repo links to the old GitHub repo now point there.Akka.slnxgains/Contrib/Hosting/and/Examples/Hosting/.RELEASE_NOTES.mdannounces the move.MsExtVersionfrom[6.0.*,)to[10.0.0,), covering Akka core, Akka.DependencyInjection and all Hosting packages). This lets Hosting take OpenTelemetry 1.15.3, which patches GHSA-g94r-2vxg-569j, so no audit suppression is needed. The 10.0 packages still carry netstandard2.0 assets; net48, net6.0 and net8.0 applications keep working and see their transitive Microsoft.Extensions references lift to 10.0.x. Noted in the release notes.Verification (Linux)
dotnet build Akka.slnx -c ReleaseAkka.DependencyInjection.TestsAkka.API.Testsdocs/**AkkaandAkka.HostingnuspecsNew dependencies entering the repo:
Microsoft.Extensions.Hosting.Abstractions,Logging.Abstractions,Configuration.Abstractions,Diagnostics.HealthChecks(MIT) andOpenTelemetry(Apache-2.0), all referenced only by the Hosting packages.Follow-ups (not in this PR)
devwith the net10.0 retarget and theBREAKING_CHANGES_V1.6.mdentry.