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

[Doc] Integrating chaos pipeline #1927

Merged
merged 2 commits into from
Jan 26, 2024
Merged

Conversation

martintmk
Copy link
Contributor

@martintmk martintmk commented Jan 26, 2024

Details on the issue fix or feature implementation

Docs about how to integrate chaos pipeline into resilience ones.

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

@martintmk martintmk added this to the v8.3.0 milestone Jan 26, 2024
src/Snippets/Docs/Chaos.Index.cs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0e134b5) 84.79% compared to head (017fd43) 84.79%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1927   +/-   ##
=======================================
  Coverage   84.79%   84.79%           
=======================================
  Files         312      312           
  Lines        6893     6893           
  Branches     1056     1056           
=======================================
  Hits         5845     5845           
  Misses        839      839           
  Partials      209      209           
Flag Coverage Δ
linux 84.79% <ø> (ø)
macos 84.79% <ø> (ø)
windows 84.79% <ø> (ø)

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.

@@ -200,3 +200,135 @@ services.AddResiliencePipeline("chaos-pipeline", (builder, context) =>

> [!NOTE]
> An alternative method involves using [`Microsoft.Extensions.AsyncState`](https://www.nuget.org/packages/Microsoft.Extensions.AsyncState) for storing information relevant to chaos injection decisions. This can be particularly useful in frameworks like ASP.NET Core. For instance, you could implement a middleware that retrieves user information from `HttpContext`, assesses the user type, and then stores this data in `IAsyncContext<ChaosUser>`. Subsequently, `IChaosManager` can access `IAsyncContext<ChaosUser>` to retrieve this information. This approach eliminates the need to manually insert such data into `ResilienceContext` for each call within the resilience pipeline, thereby streamlining the process.

### Integrating chaos pipelines
Copy link
Contributor

Choose a reason for hiding this comment

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

Due to its length it might make sense to put the patterns section into a dedicated sub-page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll keep this as it is. We can think about this in future PR if the content grows bigger.

@martintmk martintmk merged commit eb63dab into main Jan 26, 2024
17 checks passed
@martintmk martintmk deleted the mtomka/chaos-combining-pipelines branch January 26, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants