Skip to content

Apply additional actions to ScheduleRetryIndefinitely attempts - #5252

Open
johnkaram02 wants to merge 1 commit into
JasperFx:mainfrom
johnkaram02:fix/schedule-retry-indefinitely-additional-actions
Open

johnkaram02 wants to merge 1 commit into
JasperFx:mainfrom
johnkaram02:fix/schedule-retry-indefinitely-additional-actions

Conversation

@johnkaram02

Copy link
Copy Markdown
Contributor

Fixes #

ScheduleRetryIndefinitely() adds a failure slot per delay but doesn't track it in FailureActions._slots, unlike ScheduleRetry() and the other policies. AndPauseProcessing(), AndPauseSending() and And(...) attach to the slots in _slots, so when they're chained after ScheduleRetryIndefinitely() they're silently dropped.

This PR tracks the slots, so chained actions apply to the scheduled retry attempts. Attempts after the listed delays still come from InfiniteSource, which, as with RequeueIndefinitely(), doesn't carry additional actions. This PR leaves that unchanged.

Adds FailureRuleCollectionTests.schedule_indefinite_retries_and_pause, which fails on main and passes with the fix. Ran CoreTests on net10.0 namespace by namespace: 0 failures. CHANGELOG.md is not touched.

ScheduleRetryIndefinitely adds a failure slot for each delay but doesn't
track the slots like ScheduleRetry and the other policies do. Additional
actions chained after it, such as AndPauseProcessing() or And(...), have
no slots to attach to and are silently dropped.

Track the slots so chained actions apply to the scheduled retry attempts.
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.

1 participant