jepsen-io / jepsen

A framework for distributed systems verification, with fault injection
6.69k stars 710 forks source link

Add eastwood lein plugin, enable in CI, fix all warnings. #455

Closed stevana closed 4 years ago

stevana commented 4 years ago

This should help catch problems like the one introduced in my previous PR (sorry about that).

There were a few warnings I wasn't sure how to fix, I marked them with XXX in the comments together with the warning they produced. These should be fixed/disabled before merging.

stevana commented 4 years ago

I think the failing test is unrelated to my changes.

aphyr commented 4 years ago

You're right--the failing test is a probabilistic test that depends on thread scheduling. I bet you some threads are getting starved when run on Travis-CI.

aphyr commented 4 years ago

And--no worries about the compilation errors in the last PR. I don't think there are any tests for jepsen.nemesis.combined, because it was a rush job for a client, and it's side-effect heavy. I should write at least some basic ones--you can't be expected to know "Oh yeah, you need to run the etcd test suite to check that this namespace works". ;-)

stevana commented 4 years ago

"Oh yeah, you need to run the etcd test suite to check that this namespace works". ;-)

Btw, how do you test an unpublished snapshot? Do you build a local snapshot and use that, or do you point it to the repo and use git commit hash? The former seems a bit clunky, and when I've looked into the latter I couldn't find a solution that seemed maintained, solid and easy to use?

aphyr commented 4 years ago

Btw, how do you test an unpublished snapshot? Do you build a local snapshot and use that, or do you point it to the repo and use git commit hash? The former seems a bit clunky, and when I've looked into the latter I couldn't find a solution that seemed maintained, solid and easy to use?

Lein checkouts! I keep a checkouts directory in my test dirs--e.g. jepsen.etcd/checkouts, with a symlink to jepsen/jepsen. As long as the project.clj versions align, it should run the code from the checkouts dir, rather than the Maven cache. Might have to run lein install in jepsen/jepsen once, just so lein picks up on the existence of the snapshot version.

aphyr commented 4 years ago

All right, let's merge it! Thanks Stevan! :)

aphyr commented 4 years ago

BTW, there's a big API change happening in Jepsen right now, and I think you're working on some changes to generators, right? Take a look at https://github.com/jepsen-io/jepsen/blob/master/jepsen/src/jepsen/generator/pure.clj for background and migration info. There's a jepsen.generator/stateful+pure wrapper that's providing backwards compatibility for the upcoming migration release, then jepsen.generator will be replaced by jepsen.generator.pure in 0.2.0.

stevana commented 4 years ago

Cool, looking forward to not seeing the interrupted sleep error anymore, :-).

What's the plan with regards to nemesis generators? They are all still currently stateful.

aphyr commented 4 years ago

What's the plan with regards to nemesis generators? They are all still currently stateful.

I've been working on migrating everything forward; only one generator left to go, actually. Should be done real soon now.

stevana commented 4 years ago

OK, I'll wait for your change before looking into reopening the clock nemesis targets PR then.

aphyr commented 4 years ago

They're live now, though... they may not actually work yet. That's what I've got to work on next. :)