saltstack/salt — pull request #12135 by jacksontj (2014-04-18 22:21:46+00:00)
Title: Master_job_caches

This is a fairly large overhaul of how the master stores minion returns-- so lets make sure that the tests pass first :)

The biggest problem (IMO) with how we handle minion return data is that it is very VERY inconsistent. Most runner/clients/libs/etc. end up copy/pasting a lot of code out of master.py and client/__init__.py. We already have an interface (returners) for writing job data somewhere, and there was already some code in here for an "master_ext_job_cache", so I figured we could do much better.

Basically this changes master_ext_job_cache to master_job_caches-- which is a list of returners the master should use to store/retrieve data. With this i've created a "local_cache" returner, which pulls all the job_cache code into one place. I then went around the code base trying to find people calling the cache directly-- and migrated them to this. Its possible that i've missed some things (there are a LOT of places that look at the cache directly), but i think i have most of them at least. This change is backwards compatible (unless you were using "master_ext_job_cache" which is an undocumented feature-- and as best i can tell no one uses-- mostly because it didn't quite work ;) ).