Skip to content

Propagate cancellation tokens through persistence dialects, licensing and acceptance test infrastructure - #5754

Merged
johnsimons merged 1 commit into
masterfrom
john/cancel_p7_persistence_licensing
Aug 13, 2026
Merged

johnsimons merged 1 commit into
masterfrom
john/cancel_p7_persistence_licensing

Conversation

@johnsimons

Copy link
Copy Markdown
Member

Retires the cancellation analyzer debt blocks in six projects, which is
Phase 7 of the propagation work.

ServiceControl.Persistence.EFCore.SqlServer / .PostgreSql: the dialect
implementations now match their interfaces, whose tokens are already
optional.

ServiceControl.RavenDB: EmbeddedDatabase.DeleteDatabase takes a token and
forwards it, so deleting a database can be cancelled.

Particular.LicensingComponent: IAuditQuery and IThroughputCollector and
their implementations, plus BrokerThroughputCollectorHostedService's
stoppingToken renamed to cancellationToken. Five catch blocks now catch
OperationCanceledException filtered on the token before catching
Exception, so shutdown cancellation is no longer reported as a failure to
gather throughput or to reach the audit remotes.

ServiceControl.AcceptanceTesting: the HTTP helpers and assertion helpers
take and forward optional tokens. The scenario poll loop captured
cancellation as a test failure on shutdown, so it now swallows its own
cancellation and holds the linked token in a local rather than reading a
disposed source. The project block is narrowed to the types that sit on
NServiceBus.AcceptanceTesting extension points, which drive them without
a token.

ServiceControl.Audit.Persistence.RavenDB: the PS0020 carve-out on
LicenseStatusCheck moves from the project editorconfig to an inline
pragma. The filter is deliberate, since the try runs on a linked token
that is always cancelled in the timeout case being mapped.

@johnsimons
johnsimons requested a review from rbev August 12, 2026 21:23
@johnsimons johnsimons self-assigned this Aug 12, 2026
Base automatically changed from john/cancel_phase6 to master August 13, 2026 03:40
@johnsimons
johnsimons force-pushed the john/cancel_p7_persistence_licensing branch from 9f17387 to 73d5446 Compare August 13, 2026 03:56
… and acceptance test infrastructure

Retires the cancellation analyzer debt blocks in six projects, which is
Phase 7 of the propagation work.

ServiceControl.Persistence.EFCore.SqlServer / .PostgreSql: the dialect
implementations now match their interfaces, whose tokens are already
optional.

ServiceControl.RavenDB: EmbeddedDatabase.DeleteDatabase takes a token and
forwards it, so deleting a database can be cancelled.

Particular.LicensingComponent: IAuditQuery and IThroughputCollector and
their implementations, plus BrokerThroughputCollectorHostedService's
stoppingToken renamed to cancellationToken. Five catch blocks now catch
OperationCanceledException filtered on the token before catching
Exception, so shutdown cancellation is no longer reported as a failure to
gather throughput or to reach the audit remotes.

ServiceControl.AcceptanceTesting: the HTTP helpers and assertion helpers
take and forward optional tokens. The scenario poll loop captured
cancellation as a test failure on shutdown, so it now swallows its own
cancellation and holds the linked token in a local rather than reading a
disposed source. The project block is narrowed to the types that sit on
NServiceBus.AcceptanceTesting extension points, which drive them without
a token.

ServiceControl.Audit.Persistence.RavenDB: the PS0020 carve-out on
LicenseStatusCheck moves from the project editorconfig to an inline
pragma. The filter is deliberate, since the try runs on a linked token
that is always cancelled in the timeout case being mapped.
@johnsimons
johnsimons force-pushed the john/cancel_p7_persistence_licensing branch from 73d5446 to ec0b69c Compare August 13, 2026 05:25
@johnsimons
johnsimons merged commit f274291 into master Aug 13, 2026
54 checks passed
@johnsimons
johnsimons deleted the john/cancel_p7_persistence_licensing branch August 13, 2026 06:18
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