Sentinel icon indicating copy to clipboard operation
Sentinel copied to clipboard

Add global fallback support for AspectJ annotation extension

Open luffy0223 opened this issue 10 months ago • 1 comments

Describe what this PR does / why we need it

Add global fallback support for AspectJ annotation extension

Does this pull request fix one issue?

Fixes https://github.com/alibaba/Sentinel/issues/3110

Describe how you did it

add global fallback interface and let it as the member of @SentinelResource, cache and call the global fallback instance in the aspect when origin method throws Throwable

Describe how to verify it

Use unit test to verify the correctness

Special notes for reviews

NONE

luffy0223 avatar Apr 23 '24 12:04 luffy0223

Codecov Report

Attention: Patch coverage is 66.66667% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 45.96%. Comparing base (cd02b1d) to head (3fb3244). Report is 4 commits behind head on 1.8.

Files Patch % Lines
...l/annotation/aspectj/ResourceMetadataRegistry.java 60.00% 5 Missing and 1 partial :warning:
...a/csp/sentinel/fallback/DefaultGlobalFallback.java 0.00% 2 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##                1.8    #3383      +/-   ##
============================================
+ Coverage     45.89%   45.96%   +0.07%     
- Complexity     2145     2152       +7     
============================================
  Files           431      432       +1     
  Lines         12903    12926      +23     
  Branches       1727     1728       +1     
============================================
+ Hits           5922     5942      +20     
- Misses         6279     6283       +4     
+ Partials        702      701       -1     
Components Coverage Δ
sentinel-adapter 43.22% <ø> (ø)
sentinel-cluster 23.71% <ø> (ø)
sentinel-core 59.62% <0.00%> (-0.01%) :arrow_down:
sentinel-extension 46.60% <72.72%> (+0.41%) :arrow_up:
sentinel-logging 54.54% <ø> (ø)

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

codecov[bot] avatar Apr 24 '24 11:04 codecov[bot]