Skip to content

🪲 BUG-#82: Fix backoff mutating retry_delay permanently across calls - #100

Merged
FernandoCelmer merged 2 commits into
developfrom
feature/82
Mar 31, 2026
Merged

🪲 BUG-#82: Fix backoff mutating retry_delay permanently across calls#100
FernandoCelmer merged 2 commits into
developfrom
feature/82

Conversation

@FernandoCelmer

Copy link
Copy Markdown
Member

Description

  • dotflow/core/action.py — Use local variable current_delay instead of mutating self.retry_delay during backoff
  • tests/core/test_action.py — Add test_backoff_does_not_mutate_retry_delay to verify retry_delay is preserved after retries

Motivation and Context

When @action(retry=N, backoff=True) is used, the exponential backoff logic modifies self.retry_delay in place. Since the Action instance is shared across all calls, subsequent calls start with the last doubled delay instead of the original value.

Closes #82

Types of changes

  • Bug fix (change that fixes an issue)
  • New feature (change which adds functionality)
  • Documentation

Checklist

  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the CHANGELOG
  • I have updated the documentation accordingly

@FernandoCelmer FernandoCelmer added the bug Something isn't working label Mar 31, 2026
@FernandoCelmer
FernandoCelmer merged commit 8ac6f5e into develop Mar 31, 2026
10 checks passed
@FernandoCelmer
FernandoCelmer deleted the feature/82 branch March 31, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant