Repository navigation
Apply additional actions to ScheduleRetryIndefinitely attempts - #5252
Open
johnkaram02 wants to merge 1 commit into
Open
johnkaram02 wants to merge 1 commit into
johnkaram02 wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #
ScheduleRetryIndefinitely()adds a failure slot per delay but doesn't track it inFailureActions._slots, unlikeScheduleRetry()and the other policies.AndPauseProcessing(),AndPauseSending()andAnd(...)attach to the slots in_slots, so when they're chained afterScheduleRetryIndefinitely()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 withRequeueIndefinitely(), doesn't carry additional actions. This PR leaves that unchanged.Adds
FailureRuleCollectionTests.schedule_indefinite_retries_and_pause, which fails onmainand passes with the fix. RanCoreTestson net10.0 namespace by namespace: 0 failures.CHANGELOG.mdis not touched.