6e8d346670
AddZbSecretsAkkaReplication called AddZbSecrets FIRST, which does TryAddSingleton<ISecretReplicator, NoOpSecretReplicator>(). The package's own TryAddSingleton<ISecretReplicator> therefore found a descriptor already present and was silently discarded. Consequence: ISecretReplicator resolved to the no-op sink, so every write published into nothing; and because SecretReplicationActor is only spawned as a side effect of constructing AkkaSecretReplicator, no actor was ever created either. No exception, no log line - a cluster that reports healthy and silently never converges. The worst available failure mode for a secrets store. Fix: register ISecretReplicator BEFORE AddZbSecrets, matching what the SQL-Server package already did. Found during OtOpcUa adoption (Task 6), which is the first code that ever built a container around this extension. Root cause of the gap: the SQL-Server package had a DI test asserting its replicator type (AddZbSecretsSqlServerTests:58) and the correct order; the Akka package had neither. Every Akka test exercised the actor, serializer and reconciler in isolation - none built a container, so nothing could see it. This is the third instance of the same defect class in this library (the inert ISecretReplicator seam, the unregistered concrete SqliteSecretStore, and now this), all of which share one cause: unit tests that never construct the DI graph. Adds AddZbSecretsAkkaReplicationTests (5 tests) asserting registration at the ServiceCollection level. Verified to discriminate: with the 0.2.0 order restored, 2 of the 5 fail; with the fix, all 5 pass. They assert descriptors rather than resolving from a provider on purpose - resolving ISecretReplicator eagerly spawns the actor, whose PreStart needs DistributedPubSub and therefore a joined cluster, which would make the test hang rather than fail. Full suite Release-green: 175 passed, 15 skipped, no new warnings.
19 lines
641 B
XML
19 lines
641 B
XML
<Project>
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net10.0</TargetFramework>
|
|
<Nullable>enable</Nullable>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<LangVersion>latest</LangVersion>
|
|
<Version>0.2.1</Version>
|
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
|
</PropertyGroup>
|
|
|
|
<!-- Embed the repo README in each packable nupkg (ignored by non-packable projects). -->
|
|
<ItemGroup Condition="'$(IsPackable)' == 'true'">
|
|
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="\" Visible="false" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|