GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — test(reminders): add lifecycle conformance scenarios by ReubenBond · Pull Request #10896 · dotnet/orleans Conversation
|
| Severity | Finding |
|---|---|
test/Orleans.Testing.Reminders/ReminderServiceLifecycleHarness.cs — WaitForOwnerCountAsync mixes two different owner-count notions: the fast-path uses GetOwners()… |
|
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs — The "no local owner before entering the loading window" assertion only checks immediately after… |
Adds a shared, deterministic reminder-service lifecycle conformance suite to reduce provider-specific drift and make ownership/recovery/churn semantics verifiable with consistent diagnostics across providers.
Changes:
ReminderServiceLifecycleTestRunner + IReminderServiceLifecycleHarness for deterministic lifecycle/churn scenarios in Orleans.Reminders.TestKit.ReminderServiceLifecycleHarness and extends ReminderDiagnosticObserver to track local start/stop and schedule-change counts needed by the new scenarios.| File | Description |
|---|---|
| test/Orleans.Testing.Reminders/ReminderServiceLifecycleHarness.cs | New harness adapting InProcessTestCluster + ReminderTestClock + diagnostics to the shared lifecycle runner. |
| test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs | Adds lifecycle counters and a schedule-change waiter to support deterministic lifecycle assertions. |
| test/Orleans.Testing.Reminders/Orleans.Testing.Reminders.csproj | Adds a project reference to Orleans.Reminders.TestKit so test utilities can use the shared runner/harness contract. |
| test/Orleans.Reminders.Tests/TimerTests/ReminderTestsBase.cs | Integrates lifecycle conformance scenarios into provider reminder suites via a per-provider runner. |
| test/Orleans.Reminders.TestKit.Tests/ReminderServiceLifecycleConformanceTests.cs | New TestKit conformance tests for lifecycle scenarios plus fault-injection self-tests. |
| src/Orleans.Reminders/Orleans.Reminders.csproj | Adds InternalsVisibleTo for Orleans.Testing.Reminders to enable test-only range-reconciliation barriers. |
| src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs | New shared deterministic lifecycle/churn runner and harness contract used by provider suites and TestKit tests. |
| src/Orleans.Reminders.TestKit/README.md | Documents the new lifecycle runner and harness usage pattern. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Review tier: Lite
Findings: 1
| Severity | Finding |
|---|---|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… |
|
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… |
|
src/Orleans.Reminders.TestKit/README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… |
|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… |
| Severity | Finding |
|---|---|
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs — The "no local owner before entering the loading window" assertion only checks immediately after… View resolved comment |
|
test/Orleans.Testing.Reminders/ReminderServiceLifecycleHarness.cs — WaitForOwnerCountAsync mixes two different owner-count notions: the fast-path uses GetOwners()… View resolved comment |
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:263
/// <summary>Gets the number of local reminder instances stopped for an identity.</summary>
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:272
/// <summary>Gets the number of local schedule changes for an identity.</summary>
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:281
/// <summary>Waits for the requested number of local schedule changes for an identity.</summary>
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs:62
/// <summary>Gets the number of local reminder instances stopped for an identity.</summary>
int GetLocalStopCount(GrainId grainId, string reminderName);
/// <summary>Gets the number of local schedule changes for an identity.</summary>
int GetScheduleChangeCount(GrainId grainId, string reminderName);
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
baf92fa to
22e6d4b
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Review tier: Lite
Findings: 2
| Severity | Finding |
|---|---|
test/Extensions/Orleans.AdoNet.Tests/Reminders/ReminderServiceLifecycleTests_AdoNet.cs — using UnitTests.General; is unused in this file and will trigger IDE0005 (remove unnecessary… |
| Severity | Finding |
|---|---|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… View comment |
|
src/Orleans.Reminders.TestKit/README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… View comment |
|
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… View comment |
|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… View comment |
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:254
/// <summary>Gets the number of local reminder instances started for an identity.</summary>
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:263
/// <summary>Gets the number of local reminder instances stopped for an identity.</summary>
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:272
/// <summary>Gets the number of local schedule changes for an identity.</summary>
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:281
/// <summary>Waits for the requested number of local schedule changes for an identity.</summary>
src/Orleans.Reminders.TestKit/README.md:189
using var or use clock.DiagnosticObserver (which is disposed with the clock) to avoid leaking subscriptions in real-world usage.var observer = ReminderDiagnosticObserver.Create(); // create before deployment
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Review tier: Lite
Findings: 2
| Severity | Finding |
|---|---|
test/Extensions/Orleans.AdoNet.Tests/Reminders/ReminderServiceLifecycleTests_AdoNet.cs — using UnitTests.General; is unused in this file and will trigger IDE0005 (remove unnecessary… View comment |
|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… View comment |
|
src/Orleans.Reminders.TestKit/README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… View comment |
|
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… View comment |
|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… View comment |
Previously missed (3) — in code that hasn't changed since the last review.
test/Orleans.Testing.Reminders/ReminderServiceLifecycleHarness.cs:159
private bool IsActiveSilo(SiloAddress? siloAddress)
=> siloAddress is not null && ActiveSilos.Contains(siloAddress);
test/Orleans.Reminders.TestKit.Tests/ReminderServiceLifecycleConformanceTests.cs:122
var fixture = new ReminderServiceLifecycleFixture();
await fixture.InitializeAsync();
try
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs:59
This issue also appears on line 61 of the same file.
/// <summary>Gets the number of local reminder instances started for an identity.</summary>
int GetLocalStartCount(GrainId grainId, string reminderName);
/// <summary>Gets the number of local reminder instances stopped for an identity.</summary>
int GetLocalStopCount(GrainId grainId, string reminderName);
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs:62
/// <summary>Gets the number of local schedule changes for an identity.</summary>
int GetScheduleChangeCount(GrainId grainId, string reminderName);
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Review tier: Lite
Findings: 2
| Severity | Finding |
|---|---|
test/Extensions/Orleans.AdoNet.Tests/Reminders/ReminderServiceLifecycleTests_AdoNet.cs — using UnitTests.General; is unused in this file and will trigger IDE0005 (remove unnecessary… View comment |
|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… View comment |
|
src/Orleans.Reminders.TestKit/README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… View comment |
|
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… View comment |
|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… View comment |
Previously missed (1) — in code that hasn't changed since the last review.
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs:162
Consider adding a startup-readiness barrier at the start of every RunReminderService_* scenario (or centralizing it in a helper) so scenario order cannot affect determinism.
async () =>
{
var expectedStart = _harness.UtcNow.UtcDateTime + due;
await grain.RegisterOrUpdateAsync(Name, due, Period).WaitAsync(cancellationToken);
await _harness.WaitForOwnerCountAsync(grain.GetGrainId(), Name, 1, cancellationToken);
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Review tier: Lite
Findings: 2
| Severity | Finding |
|---|---|
test/Extensions/Orleans.AdoNet.Tests/Reminders/ReminderServiceLifecycleTests_AdoNet.cs — using UnitTests.General; is unused in this file and will trigger IDE0005 (remove unnecessary… View comment |
|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… View comment |
|
src/Orleans.Reminders.TestKit/README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… View comment |
|
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… View comment |
|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… View comment |
Previously missed (2) — in code that hasn't changed since the last review.
test/Orleans.Testing.Reminders/ReminderServiceLifecycleHarness.cs:160
private bool IsActiveSilo(SiloAddress? siloAddress)
=> siloAddress is not null && ActiveSilos.Contains(siloAddress);
test/Orleans.Testing.Reminders/ReminderTestClock.cs:33
{
TimeProvider = new FakeTimeProvider(initialTime);
DiagnosticObserver = ReminderDiagnosticObserver.Create();
MinimumReminderPeriod = minimumReminderPeriod;
RefreshReminderListPeriod = refreshReminderListPeriod;
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The current CI failures are deterministic and specific to the reminder lifecycle scenarios added by this PR. Across Windows/Linux and multiple provider matrices, ReminderService_OneSiloJoinLeaveTransfersOwnership and ReminderService_UpdateDoesNotRestartLocalOwner time out after two minutes with TaskCanceledException from ReminderServiceLifecycleTestRunner (including lines 464 and 209). This needs a branch synchronization/timeout fix before another retry. Failed run: https://github.com/dotnet/orleans/actions/runs/33161717052 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Review tier: Lite
Findings: 2
| Severity | Finding |
|---|---|
test/Extensions/Orleans.AdoNet.Tests/Reminders/ReminderServiceLifecycleTests_AdoNet.cs — using UnitTests.General; is unused in this file and will trigger IDE0005 (remove unnecessary… View comment |
|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… View comment |
|
src/Orleans.Reminders.TestKit/README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… View comment |
|
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… View comment |
|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… View comment |
Previously missed (1) — in code that hasn't changed since the last review.
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs:650
if (!await _harness.ReminderTable.RemoveRow(grainId, name, row.ETag!).WaitAsync(cancellationToken))
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs:255
/// <summary>Gets the number of local reminder instances started for an identity.</summary>
public int GetLocalStartCount(GrainId grainId, string reminderName)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Review tier: Lite
Findings: 1
| Severity | Finding |
|---|---|
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs — This adds new public API surface (IReminderServiceLifecycleHarness and… |
| Severity | Finding |
|---|---|
test/Extensions/Orleans.AdoNet.Tests/Reminders/ReminderServiceLifecycleTests_AdoNet.cs — using UnitTests.General; is unused in this file and will trigger IDE0005 (remove unnecessary… View resolved comment |
|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — ownerFilter is invoked while holding the observer's private lock. Since ownerFilter is… View resolved comment |
|
src/Orleans.Reminders.TestKit/README.md — The lifecycle README example creates a separate ReminderDiagnosticObserver, but ReminderTestClock… View resolved comment |
|
src/Orleans.Reminders.TestKit/ReminderServiceLifecycleTestRunner.cs — These interface docs mention "for an identity", but the harness methods are keyed by (grainId,… View resolved comment |
|
test/Orleans.Testing.Reminders/ReminderDiagnosticObserver.cs — The XML docs say "started for an identity", but this API is keyed by (grainId, reminderName) and… View resolved comment |
Previously missed (1) — in code that hasn't changed since the last review.
test/Orleans.Reminders.TestKit.Tests/ReminderServiceLifecycleConformanceTests.cs:123
This issue also appears in the following locations of the same file:
var fixture = new ReminderServiceLifecycleFixture();
await fixture.InitializeAsync();
try
{
using var cancellation = CancellationTokenSource.CreateLinkedTokenSource(
test/Orleans.Reminders.TestKit.Tests/ReminderServiceLifecycleConformanceTests.cs:166
var fixture = new ReminderServiceLifecycleFixture();
await fixture.InitializeAsync();
try
{
test/Orleans.Reminders.TestKit.Tests/ReminderServiceLifecycleConformanceTests.cs:191
var fixture = new ReminderServiceLifecycleFixture();
await fixture.InitializeAsync();
try
{
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Follow-up on run 33161717052: the missing transitions were causal, not timeout-budget issues. A grain call can persist registration/update/removal on a silo which is not the reminder's ring owner, so the owner transition is only observable after the next reminder-table refresh. The runner now arms the owner/schedule wait before advancing exactly one refresh. Join/leave had also consumed one refresh before its final delivery advance, so advancing the original due time overshot the persisted first due; it now advances only the exact remaining interval. Cleanup removes only scenario rows by current ETag and advances one refresh for quiescence. Controlled TestKit regressions gate update reconciliation on that refresh and assert the join/leave advance sequence reaches, rather than passes, the due boundary. The later full matrix run is green across Windows/Linux and all provider jobs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.