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

Simmy API review Part 2 - Prefer Chaos over Monkey #1913

Merged

Conversation

peter-csala
Copy link
Contributor

@peter-csala peter-csala commented Jan 22, 2024

Pull Request

The issue or feature being addressed

Details on the issue fix or feature implementation

  • Renamed the base classes
    • MonkeyStrategy >> ChaosStrategy
    • MonkeyStrategyOptions >> ChaosStrategyOptions
  • Renamed Behavior classes
    • BehaviorChaosStrategy to ChaosBehaviorStrategy
    • BehaviorStrategyOptions >> ChaosBehaviorStrategyOptions
    • BehaviorConstants >> ChaosBehaviorConstants
    • BehaviorPipelineBuilderExtensions >> ChaosBehaviorPipelineBuilderExtensions
  • Renamed Fault classes
    • FaultChaosStrategy to ChaosFaultStrategy
    • FaultStrategyOptions >> ChaosFaultStrategyOptions
    • FaultConstants >> ChaosFaultConstants
    • FaultPipelineBuilderExtensions >> ChaosFaultPipelineBuilderExtensions
  • Renamed Latency classes
    • LatencyChaosStrategy to ChaosLatencyStrategy
    • LatencyStrategyOptions >> ChaosLatencyStrategyOptions
    • LatencyConstants >> ChaosLatencyConstants
    • LatencyPipelineBuilderExtensions >> ChaosLatencyPipelineBuilderExtensions
    • Renamed Outcome classes
    • OutcomeChaosStrategy to ChaosOutcomeStrategy
    • OutcomeStrategyOptions >> ChaosOutcomeStrategyOptions
    • OutcomeConstants >> ChaosOutcomeConstants
    • OutcomePipelineBuilderExtensions >> ChaosOutcomePipelineBuilderExtensions
  • Renamed AddChaosResult to AddChaosOutcome
  • Updated related docs as well

Extra

  • Replaced behaviour spelling to behavior in ChaosBehaviorStrategyTests
  • Moved userDelegateExecuted and onXYZInjectedExecuted method variables to class level in several test classes

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

Copy link

codecov bot commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (24a86c8) 84.80% compared to head (03edbf1) 84.80%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1913   +/-   ##
=======================================
  Coverage   84.80%   84.80%           
=======================================
  Files         312      312           
  Lines        6897     6897           
  Branches     1056     1056           
=======================================
  Hits         5849     5849           
  Misses        839      839           
  Partials      209      209           
Flag Coverage Δ
linux 84.80% <100.00%> (ø)
macos ?
windows 84.80% <100.00%> (ø)

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.

@peter-csala
Copy link
Contributor Author

After applying the renaming suggestions by @martintmk we have some inconsistency:

  • BehaviorChaosStrategy : ChaosStrategy
  • ChaosBehaviorStrategyOptions : ChaosStrategyOptions

Option A: Rename BehaviorChaosStrategy to ChaosBehaviorStrategy
Option B: Rename ChaosBehaviorStrategyOptions to BehaviorChaosStrategyOptions

Which one do we prefer? @martincostello, @martintmk

I would vote to Option A because that would align better with the AddChaosBehavior.

@martincostello
Copy link
Member

I also prefer option A.

@peter-csala peter-csala marked this pull request as ready for review January 22, 2024 14:12
@martintmk martintmk added this to the v8.3.0 milestone Jan 22, 2024
Copy link
Contributor

@martintmk martintmk left a comment

Choose a reason for hiding this comment

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

Looks fine, great job!

@martintmk
Copy link
Contributor

@martincostello Is this ok to merge?

@martintmk martintmk merged commit 54becab into App-vNext:main Jan 22, 2024
17 checks passed
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.

3 participants