Skip to content

feat!: add ability to skip retry delay#103

Merged
ns-vasilev merged 5 commits intomainfrom
feature/retry
May 6, 2026
Merged

feat!: add ability to skip retry delay#103
ns-vasilev merged 5 commits intomainfrom
feature/retry

Conversation

@ns-vasilev
Copy link
Copy Markdown
Member

No description provided.

@ns-vasilev ns-vasilev self-assigned this May 5, 2026
@ns-vasilev ns-vasilev requested a review from a team as a code owner May 5, 2026 14:36
@ns-vasilev ns-vasilev changed the title feat: add ability to skip retry delay feat!: add ability to skip retry delay May 5, 2026
@spacecode-github-bot
Copy link
Copy Markdown

spacecode-github-bot commented May 5, 2026

2 Warnings
⚠️ PR title should follow Conventional Commits format (e.g., "feat: add new feature")
⚠️

⚠️ Some source files are missing corresponding test files:

  • RetryPolicyError → expected test file: RetryPolicyErrorTests.swift
  • RetryResult → expected test file: RetryResultTests.swift
  • RetryAction → expected test file: RetryActionTests.swift

Generated by 🚫 Danger

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 89.06250% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.00%. Comparing base (1732c77) to head (6383524).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...itTests/RetryService/RetryPolicyServiceTests.swift 92.50% 6 Missing ⚠️
Sources/Typhoon/Classes/Model/RetryAction.swift 0.00% 3 Missing ⚠️
...urces/Typhoon/Classes/Model/RetryPolicyError.swift 80.00% 2 Missing ⚠️
...lasses/RetryPolicyService/RetryPolicyService.swift 92.59% 2 Missing ⚠️
...asses/RetryPolicyService/IRetryPolicyService.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #103      +/-   ##
==========================================
- Coverage   98.60%   98.00%   -0.60%     
==========================================
  Files          27       29       +2     
  Lines        1854     1951      +97     
==========================================
+ Hits         1828     1912      +84     
- Misses         26       39      +13     
Files with missing lines Coverage Δ
...on/Classes/Extensions/URLSession+RetryPolicy.swift 100.00% <ø> (ø)
...s/RetryService/RetryPolicyServiceLoggerTests.swift 100.00% <100.00%> (ø)
...rvice/RetryPolicyServiceRetryWithResultTests.swift 100.00% <100.00%> (ø)
...tTests/URLSession/URLSessionRetryPolicyTests.swift 97.86% <100.00%> (ø)
...asses/RetryPolicyService/IRetryPolicyService.swift 40.00% <0.00%> (ø)
...urces/Typhoon/Classes/Model/RetryPolicyError.swift 80.00% <80.00%> (ø)
...lasses/RetryPolicyService/RetryPolicyService.swift 98.17% <92.59%> (-1.83%) ⬇️
Sources/Typhoon/Classes/Model/RetryAction.swift 0.00% <0.00%> (ø)
...itTests/RetryService/RetryPolicyServiceTests.swift 98.58% <92.50%> (-1.42%) ⬇️

- Introduce `RetryAction` enum to specify post-failure behavior (.retry, .skipDelay, .stop).
- Update `IRetryPolicyService` and `RetryPolicyService` to use `RetryAction` in `onFailure` closures.
- Implement immediate retry logic when `.skipDelay` is returned.
- Maintain backward compatibility for boolean literals via `ExpressibleByBooleanLiteral`.
- Update `URLSession` extensions and unit tests to support the new API.
@ns-vasilev ns-vasilev merged commit b7e6de3 into main May 6, 2026
39 checks passed
@ns-vasilev ns-vasilev deleted the feature/retry branch May 6, 2026 11:19
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