Skip to content

Forward-port #8591 to dev: Akka.Hosting in the akka.net repository, net10.0 only - #8594

Merged
Aaronontheweb merged 4 commits into
akkadotnet:devfrom
Aaronontheweb:feature/hosting-import-dev
Sep 21, 2026
Merged

Aaronontheweb merged 4 commits into
akkadotnet:devfrom
Aaronontheweb:feature/hosting-import-dev

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Member

Summary

Forward-port of #8591 to dev: Akka.Hosting now ships from this repository on the 1.6 line as well. Three commits:

  1. Cherry-pick of the v1.5 squash commit (84da5854d). Four conflicts, resolved by keeping dev's side and re-applying the Hosting lines: Directory.Build.props (keeps dev's MsExtTestVersion), RELEASE_NOTES.md (Hosting notes go into the 1.6.0 section, not the 1.5.72 one), .gitignore, and one docs page.
  2. FSharp.Core pin in Akka.Persistence.FSharp, copied from Akka.FSharp. Unrelated to Hosting: without it, solution restore on a .NET 10 SDK whose implicit FSharp.Core is older than 10.1.302 fails with NU1605. Split out so it can be dropped or taken separately.
  3. dev-specific adaptation.
    • The six Hosting libraries target net10.0 only, like every other library on dev. Microsoft.Bcl.AsyncInterfaces is dropped (netstandard2.0-only).
    • Test and example projects use $(MsExtTestVersion) and the repo's Verify version properties, matching Akka.DependencyInjection.Tests.
    • API approval baselines regenerated for net10.0. The .Net (net48) variants from v1.5 are removed since dev never produces them.
    • BREAKING_CHANGES_V1.6.md row for the net10.0-only TFM and the Microsoft.Extensions 10.0 floor.

AOT status

IsAotCompatible was tried on the six libraries and left off. Five are clean. Akka.Hosting carries four trim warnings, which are errors under the repo's TreatWarningsAsErrors:

Site Warning
WithHealthCheck<T> IL2091, T passed to ActivatorUtilities.GetServiceOrCreateInstance<T>
AddAkka<T> IL2091, T passed to AddHostedService<T>
AkkaConfigurationBuilder extensions list IL2057, Type.GetType(string)
LoggerConfigBuilder.LogMessageFormatter setter IL2070, Type.GetConstructor

Three are fixable with [DynamicallyAccessedMembers] annotations, which change the public API surface. The fourth is the akka.extensions HOCON path that the AOT track replaces with a typed Setup. They are the first work items for that track rather than something to squeeze into this PR.

Verification (Linux)

Check Result
dotnet build Akka.slnx -c Release 0 errors, 0 warnings, no NU1xxx or MSB3277
Six Hosting test projects 529 passed, 0 failed
Akka.DependencyInjection.Tests 19 passed
Akka.API.Tests 23 passed, no stray .received files
dotnet docfx build --warningsAsErrors clean
markdownlint and cspell over docs/** clean

No behavior differences between v1.5 and dev surfaced in the Hosting suites; nothing in the libraries needed changing for 1.6 APIs.

Follow-ups

  • Once this and the next 1.5.x release are out, archive akkadotnet/Akka.Hosting and transfer its open issues.
  • AOT track (dev only): reflection-free defaults in core, typed Setups, and the four warnings above.
  • Nit spotted along the way: all eight .fsproj files on dev still reference the undefined $(NetLibVersion), expanding to net10.0;. Harmless today.

…net#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.
…a.FSharp does, so restore no longer hits NU1605 on SDKs whose implicit FSharp.Core is older than 10.1.302
…edger row

Completes the forward-port of akkadotnet#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/**.
… 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.
@Aaronontheweb
Aaronontheweb force-pushed the feature/hosting-import-dev branch from 6b7bc0b to 85e4c04 Compare September 21, 2026 18:36
@Aaronontheweb Aaronontheweb added akka-hosting Akka.Hosting related issues akka.net v1.6 Akka.NET v1.6-related issues labels Sep 21, 2026
@Aaronontheweb
Aaronontheweb merged commit 8424a98 into akkadotnet:dev Sep 21, 2026
13 of 15 checks passed
@Aaronontheweb
Aaronontheweb deleted the feature/hosting-import-dev branch September 21, 2026 19:51
Aaronontheweb added a commit that referenced this pull request Sep 24, 2026
…steners reply OK once per forwarder (#8619)

Every Akka.Hosting.TestKit test deriving from EventFilterTestBase publishes
ForwardAllEventsTo once and waits a single 10 s for "OK". LoggingBus only
waits akka.logger-startup-timeout (5 s) for a logger's handshake before
moving on, and the logger subscribes to the EventStream only when that
handshake completes - so on a starved agent the message can be published
before the logger listens and is lost (seen on a 2-vCPU Windows agent:
EventFilterInfoTests.Can_intercept_messages_when_start_is_specified).

Core's EventFilterTestBase already retries (1 s per attempt, 200 ms apart);
the Hosting copy imported in #8594 never got that. Port it, with a 15 s
total.

Retrying means the listener can see several ForwardAllEventsTo messages
and replied OK to each, leaving a late extra "OK" in the TestActor queue
for the next ExpectMsg<LogEvent> or AfterAll's no-more-messages check to
trip on. Both listener copies (Hosting and core) now reply once per
forwarder.
Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this pull request Oct 1, 2026
Add rows for akkadotnet#8222 (Serializer overloads, ByteArraySerializer manifest),
akkadotnet#8465 (explicit TLS hostname check), akkadotnet#8132 (TCP connects bypass akka.io.dns)
and akkadotnet#7557 (object handler without predicate blocks later Receive calls).
State net10.0-only once, folding in akkadotnet#8594 and the dependency bumps; fix the
ByteString row's write types; narrow the akkadotnet#8698 row to module serializers;
drop the .Internal AddOrSet row and say why in the preamble; shorten rows;
use asterisk list markers.
Aaronontheweb added a commit that referenced this pull request Oct 1, 2026
…8698 (#8700)

* Audit BREAKING_CHANGES_V1.6.md against v1.5.71 and catch up through #8698

Restate the definition (binary / source / behavioral compatibility against
the last stable v1.5 release), drop rows that are not breaking under it
(Artery-only, DynamicTypeLoading-off-only, fixes, dev-only comparisons),
fold the TargetInvocationException and trim-annotation rows into one row
each, shorten the rest, mark every row Merged with its PR, and add the
breaking changes from #8694 and #8698.

* Add pre-ledger breaking changes to BREAKING_CHANGES_V1.6.md

Cover changes on dev since the v1.5 line diverged that landed before the
ledger existed: net10.0-only targeting and ByteString removal (#8132),
App.config HOCON loading removal (#7456), and the AddOrSet removal (#7622).

* Apply review feedback to BREAKING_CHANGES_V1.6.md

Add rows for #8222 (Serializer overloads, ByteArraySerializer manifest),
#8465 (explicit TLS hostname check), #8132 (TCP connects bypass akka.io.dns)
and #7557 (object handler without predicate blocks later Receive calls).
State net10.0-only once, folding in #8594 and the dependency bumps; fix the
ByteString row's write types; narrow the #8698 row to module serializers;
drop the .Internal AddOrSet row and say why in the preamble; shorten rows;
use asterisk list markers.

* Drop the #7557 ReceiveActor row from BREAKING_CHANGES_V1.6.md

The Receive(typeof(object), Func<object, bool>) regression is being fixed
in a separate PR instead of documented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

akka.net v1.6 Akka.NET v1.6-related issues akka-hosting Akka.Hosting related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant