Skip to content

Grpc cb utility update #70

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 4 commits into from
Closed

Grpc cb utility update #70

wants to merge 4 commits into from

Conversation

Gg-harness
Copy link
Contributor

Description

Added config key support to define nested (channel level) configurations.

For Ex :
Circuit Breaker Key - TenantId (defined by key function)
Config Key : S3 (notification channel)
Even though circuit breaker objects can be different for different tenants, we can define the CB configuration at channel level

Testing

Tested changes on sandbox environment using this utility. Unit Tests added and validated.
Scenarios :

  1. Thresholds defined for circuit breaker key => should pick thresholds against circuit breaker key
  2. Thresholds not defined for circuit breaker key
    i. Config Key Set, Thresholds defined for config key => should pick thresholds against config key
    ii. Config Key Set, Thresholds not defined for config key => should pick default thresholds
    iii. Config key not set => should pick default thresholds

Jira : https://harness.atlassian.net/browse/ENGTAI-60244

@Gg-harness Gg-harness requested a review from a team as a code owner April 8, 2025 12:50
Copy link

github-actions bot commented Apr 8, 2025

Test Results

100 tests  +10   100 ✅ +10   26s ⏱️ +2s
 18 suites + 2     0 💤 ± 0 
 18 files   + 2     0 ❌ ± 0 

Results for commit 21756b5. ± Comparison against base commit db91474.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Apr 8, 2025

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Project coverage is 69.74%. Comparing base (db91474) to head (21756b5).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ls/resilience/ResilienceCircuitBreakerFactory.java 0.00% 2 Missing ⚠️
...breaker/grpcutils/CircuitBreakerConfiguration.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #70      +/-   ##
============================================
+ Coverage     60.93%   69.74%   +8.81%     
- Complexity      193      225      +32     
============================================
  Files            35       35              
  Lines           750      757       +7     
  Branches         45       48       +3     
============================================
+ Hits            457      528      +71     
+ Misses          263      190      -73     
- Partials         30       39       +9     
Flag Coverage Δ
unit 69.74% <72.72%> (+8.81%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@aaron-steinfeld aaron-steinfeld left a comment

Choose a reason for hiding this comment

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

Discussing offline - use multiple circuit breakers rather than adding extra levels of scoping inside the config.

@Gg-harness Gg-harness closed this Apr 10, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants