Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Add safe execution section to the migration guide #1638

Merged

Conversation

peter-csala
Copy link
Contributor

The issue or feature being addressed

Details on the issue fix or feature implementation

  • Added a new section about safe execution to the migration guide

Confirm the following

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

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (b0ffc12) 84.63% compared to head (d25b6c6) 84.63%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1638   +/-   ##
=======================================
  Coverage   84.63%   84.63%           
=======================================
  Files         306      306           
  Lines        6819     6819           
  Branches     1045     1045           
=======================================
  Hits         5771     5771           
  Misses        839      839           
  Partials      209      209           
Flag Coverage Δ
linux ?
macos 84.63% <ø> (ø)
windows 84.63% <ø> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


// Asynchronous execution
var context = ResilienceContextPool.Shared.Get();
Outcome<int> pipelineResult = await pipeline.ExecuteOutcomeAsync(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martincostello , @peter-csala

Wondering whether it makes sense to add more ExecuteOutcome convenience overloads so we do not force passing ResilienceContext and state?

Or maybe wait for feedback until someone really needs these?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be easy enough for people to just use a discard if they don't need them?

Copy link
Contributor Author

@peter-csala peter-csala Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO it would definitely ease the usage of the ExecuteOutcomeAsync method.

I think using context and state can be considered as more advance usage. For basic scenarios they are just there without utilizing them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One reason why there is only a single method is that I considered this advanced API that won't be used that much. But maybe I am wrong and it will be commonly used.

In that case having some convenience overloads makes sense (don't force people to use ResilienceContextPool.Shared.Get()).

But maybe let's just have "wait and see" approach? Adding new APIs won't be a breaking change anyway.

docs/migration-v8.md Outdated Show resolved Hide resolved
docs/migration-v8.md Outdated Show resolved Hide resolved
docs/migration-v8.md Outdated Show resolved Hide resolved
docs/migration-v8.md Outdated Show resolved Hide resolved
src/Snippets/Docs/Migration.Execute.cs Show resolved Hide resolved
src/Snippets/Docs/Migration.Execute.cs Show resolved Hide resolved

// Asynchronous execution
var context = ResilienceContextPool.Shared.Get();
Outcome<int> pipelineResult = await pipeline.ExecuteOutcomeAsync(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be easy enough for people to just use a discard if they don't need them?

src/Snippets/Docs/Migration.Execute.cs Show resolved Hide resolved
src/Snippets/Docs/Migration.Execute.cs Show resolved Hide resolved
src/Snippets/Docs/Migration.Execute.cs Outdated Show resolved Hide resolved
@martincostello martincostello added documentation v8 Issues related to the new version 8 of the Polly library. labels Sep 27, 2023
@martincostello martincostello added this to the v8.0.0 milestone Sep 27, 2023
@martincostello
Copy link
Member

Looks like this has picked up some merge conflicts.

@martincostello martincostello enabled auto-merge (squash) September 27, 2023 11:45
@martincostello martincostello merged commit ba054e2 into App-vNext:main Sep 27, 2023
14 checks passed
@peter-csala peter-csala deleted the add-execute-outcome-to-migration-doc branch October 31, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation v8 Issues related to the new version 8 of the Polly library.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants