Polly icon indicating copy to clipboard operation
Polly copied to clipboard

Add Outcome to the BreakDurationGeneratorArguments

Open peter-csala opened this issue 1 year ago • 4 comments

Pull Request

The issue or feature being addressed

  • Currently the Circuit Breaker could not take advantage of the RetryAfter header to dynamically set its break duration

Details on the issue fix or feature implementation

  • Extended the BreakDurationGeneratorArguments with Outcome

Confirm the following

  • [x] I started this PR by branching from the head of the default branch
  • [x] I have targeted the PR to merge into the default branch
  • [x] I have included unit tests for the issue/feature
  • [x] I have successfully run a local build

peter-csala avatar Jul 16 '24 08:07 peter-csala

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.87%. Comparing base (1eb48d7) to head (3bdcafb). Report is 170 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2200      +/-   ##
==========================================
- Coverage   83.88%   83.87%   -0.01%     
==========================================
  Files         313      313              
  Lines        7172     7171       -1     
  Branches     1060     1060              
==========================================
- Hits         6016     6015       -1     
  Misses        785      785              
  Partials      371      371              
Flag Coverage Δ
linux 83.87% <100.00%> (-0.01%) :arrow_down:
macos 83.87% <100.00%> (-0.01%) :arrow_down:
windows 83.87% <100.00%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jul 16 '24 08:07 codecov[bot]

I am thinking, how about we add a Outcome<object> Outcome field to existing BreakDurationGeneratorArguments?

martintmk avatar Jul 16 '24 13:07 martintmk

I am thinking, how about we add a Outcome<object> Outcome field to existing BreakDurationGeneratorArguments?

That could solve the breaking change problem.

But the usage of the Outcome would be inconsistent with the rest of the argument structures/classes.

peter-csala avatar Jul 16 '24 13:07 peter-csala

This pull request is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further changes are made.

github-actions[bot] avatar Sep 15 '24 02:09 github-actions[bot]

This pull request is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further changes are made.

github-actions[bot] avatar Nov 15 '24 02:11 github-actions[bot]

It can't be implemented in a nice way without introducing a breaking change.

peter-csala avatar Jan 06 '25 07:01 peter-csala