Skip to content

Issues-554 fix - Added jdk.proxy4 matching criteria implementation provided in ChaosMonkeyBaseClassFilter.java #562

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

Closed

Conversation

pratik-chauhan
Copy link

What: Provided fix for Issue - 554

Why: Not able to inject fault for Spring Data JPA repository method via REST API assault-watcher calls

How: Added jdk.proxy4 matching criteria implementation provided in ChaosMonkeyBaseClassFilter.java

Checklist:

  • Documentation added
  • Changelog updated
  • Tests added
  • Ready to be merged

Demo App postman response
image

@pratik-chauhan
Copy link
Author

@WtfJoke - I have applied spotless fix. would you run job again ?

Copy link

codecov bot commented Apr 18, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.53%. Comparing base (5433f0c) to head (3af3c9c).
Report is 62 commits behind head on main.

Files with missing lines Patch % Lines
...cher/advice/filter/ChaosMonkeyBaseClassFilter.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #562      +/-   ##
============================================
+ Coverage     82.31%   82.53%   +0.22%     
  Complexity      388      388              
============================================
  Files            84       84              
  Lines           950      922      -28     
  Branches         68       61       -7     
============================================
- Hits            782      761      -21     
+ Misses          142      138       -4     
+ Partials         26       23       -3     

☔ 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.

@WtfJoke
Copy link
Contributor

WtfJoke commented Apr 18, 2025

Thanks for the PR (and the analysis). Are you able to test the fix with a test?
Also can you please add your PR to the changelog?

@pratik-chauhan
Copy link
Author

@WtfJoke - I have updated changelog. Feel free to review and update changelog as per guideline.

I have tested changes through demo app but not sure how to add integration test.

@pratik-chauhan
Copy link
Author

@WtfJoke - Set jdk proxy match condition to startswith - 'jdk.proxy'. Request to review this change. If it looks fine, please run job to merge the changes.

@pratik-chauhan
Copy link
Author

@WtfJoke - would you please review changes and if looks fine, proceed for the merge?

Appreciate your efforts !!

@pratik-chauhan
Copy link
Author

@WtfJoke - I have made Set jdk proxy match condition to startswith - 'jdk.proxy' changes considering understanding
of method name meaning - nonFinalOrJdkProxiedClass -- check for nonFinal and JDKProxied Classes only.

image

Please share your thoughts on it.

Appreciate your inputs !!!

@pratik-chauhan
Copy link
Author

pratik-chauhan commented Apr 23, 2025

Hello Folks,
Appreciate your efforts if you can run the job to merge the changes if it looks fine.
I would like to request to do needful.
Thank you !!!

@WtfJoke
Copy link
Contributor

WtfJoke commented Apr 25, 2025

Hey @pratik-chauhan

We were able to have a look at it today.
We confirmed, that your pull-request solves the issue (startsWith("jdk.proxy")).
We also identified in our analysis (thanks for your analysis and proposed fix, that helped a lot!) that the NUMBER in jdk.proxyNUMBER differs based of the jdk version (see #564).

However we decided to not rely on guess-working of internal jdk proxy class names and instead rely on Proxy.isProxyClass(clazz). Performance wise this could be a slightly worser decision but its the more sustainable/stable solution and makes it less likely that we reintroduce the issue. That's why we created and merged #564, we kept you in the changelog, I hope thats fine for you :)

We will release soon a new version, which includes the fix.

@WtfJoke WtfJoke closed this Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants