gofullstack/chef-legacy — pull request #10 by bcobb (2014-06-19 20:35:29+00:00)
Title: Verify cookbook version tarball migration

:fork_and_knife:

The main point of this PR is the task in verify.rake, which is regrettably complicated. The general strategy is simple enough, though: we want to take a subset of all migrated `CookbookVersion` records -- enough so that all records will be processed over the course of a day, but no so much that the migration worker tasks overlap -- and run them through a ringer to make sure we've *actually* migrated all of their data.

This ringer is a no-op if the `CookbookVersion` had its README data, its description, and its dependencies migrated correctly the first time. Otherwise, it sets those attributes to their correct value, overriding whatever's currently there. A variable prefix you'll see in the code to indicate these new values is "suggested." If there's a mismatch between that is "suggested" and what is present in Supermarket, we take the former.

This is blocked by opscode/supermarket#485, which will allow us to migrate a number of cookbooks silently left behind in the original migration due to their relatively exotic archive formats.