goldbergyoni / node-chaos-monkey

Extremly naughty chaos monkey for Node.js
MIT License
228 stars 10 forks source link

What happens when 500 prank ends? #32

Open christian-posta opened 5 years ago

christian-posta commented 5 years ago

Looks like the route is removed and replaced for a 500 prank. When the prank ends, what is supposed to happen to the original route? It gets removed: https://github.com/i0natan/node-chaos-monkey/blob/master/pranks/500-error-on-route.js#L12

In my tests, when the prank is complete, I get 404 for that route

goldbergyoni commented 5 years ago

Yes, seems like a bug. I'm on it unless you're willing to contribute the fix :)

p.s. side question - how did you find the experience of working with the monkey? did you work through the UI?

christian-posta commented 5 years ago

So I used the REST API from both master and 0.7.1. I'm trying to get basic fault injection working (throw 500s, delay responses etc) to work. After some hacks in remove-express-route I am able to get chaos-monkey to work with 500s but only the timed schedules (one-time schedule doesn't actually do one time). I didn't get the UI up. Wonder if the pranks would be better implemented as middleware instead of replacing the route? unless you can layer the route in ahead of the real route without removing it?