External dependency Jar file broken in 2.3.9 release
See original GitHub issueExpected Behavior
Using the version 2.3.9 external dependencies Jar (chaos-monkey-spring-boot-2.3.9-jar-with-dependencies.jar) to introduce chaos attacks to an existing executable Spring Boot Jar should work as described in the documentation.
Current Behavior
With the 2.3.9 external dependencies Jar there is no evidence that the target Spring Boot application is affected in any way. There is no “ready to do evil!” message in the application logs and the configured attacks do not occur.
Possible Solution
The problem appears to be that the 2.3.9 external dependencies Jar has been built with an incorrect META-INF/spring.factories file. It ought to pull in the class de.codecentric.spring.boot.chaos.monkey.configuration.ChaosMonkeyConfiguration
to the Spring Boot autoconfiguration but instead that crucial configuration class is not actualy mentioned. Instead, the META-INF/spring.factories file references thousands of Spring classes.
Steps to Reproduce
Try following the steps in section 2.2 of the official documentation using chaos-monkey-spring-boot-2.3.9-jar-with-dependencies.jar. The steps will fail with no sign of any CM4SB activity.
Try replacing the META-INF/spring.factories file in the external dependencies Jar with the one contained in the 2.3.2 external dependencies Jar and then repeat the steps: things should now work.
Note: the META-INF/spring-configuration-metadata.json file included in the 2.3.9 external dependencies Jar also seems to be incorrect. While it does not have any bearing on the problem described in this issue it is perhaps further evidence that something odd happened when chaos-monkey-spring-boot-2.3.9-jar-with-dependencies.jar was assembled?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
It is working great with the external dependencies Jar from the 2.3.10 release. Will close the issue now.
Thank you very much @WtfJoke for taking the time to fix this 🙇♂️
I should have been more precise. I also should have mentioned that I have rebuild those chaos monkey jars locally and my whole comment/testing refered to those locally build jars (which arent published). I am aware of that the published jar is broken (thanks to your issue of course 😄)
So what I meant is, that when I locally upgraded the spring boot version of chaos monkey (to either 2.3.10 or 2.4.4) it worked (whereas with 2.3.7, 2.3.9 it didnt work). I think the issue was introduced in Spring Version 5.2.13.RELEASE and fixed in 5.2.14.RELEASE
I hope I didnt confuse you any further by now 😅
I’ll will make an additional test and will soon merge spring boot 2.3.10 and we’ll see if the published snapshot jar will have the correct spring.factories file again.