{"pull_request":{"merged_at":null,"title":"(#10837 ) Retry inventory ActiveRecord transaction failure","created_at":"2011-12-29T18:06:57Z","user":{"login":"ccaum","id":467617,"url":"https://api.github.com/users/ccaum","avatar_url":"https://secure.gravatar.com/avatar/4f03ab526e480b96947d4d47a7867414?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4f03ab526e480b96947d4d47a7867414"},"updated_at":"2011-12-30T18:37:35Z","review_comments":0,"state":"closed","id":638002,"patch_url":"https://github.com/puppetlabs/puppet/pull/294.patch","closed_at":"2011-12-30T18:37:35Z","deletions":8,"html_url":"https://github.com/puppetlabs/puppet/pull/294","mergeable":true,"issue_url":"https://github.com/puppetlabs/puppet/issues/294","base":{"ref":"master","user":{"login":"puppetlabs","id":234268,"url":"https://api.github.com/users/puppetlabs","avatar_url":"https://secure.gravatar.com/avatar/eb454c2139c156db7c8266a875519a1f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"eb454c2139c156db7c8266a875519a1f"},"sha":"26093a8f8de214a2db982e1c70a987eb67496652","repo":{"git_url":"git://github.com/puppetlabs/puppet.git","watchers":525,"created_at":"2010-09-14T19:26:44Z","open_issues":56,"fork":false,"updated_at":"2011-12-30T12:21:14Z","id":910744,"language":"Ruby","html_url":"https://github.com/puppetlabs/puppet","name":"puppet","master_branch":null,"description":"Server automation framework and application","url":"https://api.github.com/repos/puppetlabs/puppet","ssh_url":"git@github.com:puppetlabs/puppet.git","forks":236,"pushed_at":"2011-12-29T23:31:38Z","clone_url":"https://github.com/puppetlabs/puppet.git","owner":{"login":"puppetlabs","id":234268,"url":"https://api.github.com/users/puppetlabs","avatar_url":"https://secure.gravatar.com/avatar/eb454c2139c156db7c8266a875519a1f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"eb454c2139c156db7c8266a875519a1f"},"homepage":"http://www.puppetlabs.com/puppet/introduction/","size":3280,"private":false,"svn_url":"https://github.com/puppetlabs/puppet"},"label":"puppetlabs:master"},"body":"Previous to this commit, if the ActiveRecord transaction for saving\r\nfacts failed do to MySQL deadlock, for example, the transaction would\r\nfail printing a message to the user.  This primarily occurred during a\r\nPE agent installation if multiple agent's were being creating\r\nsimultaneously.\r\n\r\nThis commit adds the ability to retry if a ActiveRecord::StatementInvalid\r\nexception is thrown.  To accomplish this, this commit ports Cloud\r\nProvisioner's Puppet::CloudPack::Utils#retry_action method to Puppet\r\ncore under Puppet::Util::RetryAction#retry_action.\r\n\r\nCurrently spec tests exist for the retry_action method, however properly\r\ntesting ActiveRecord inventory indirector is proving difficult since the\r\nproper way to test it is to throw an expected failure once, then succeed\r\non a subsequent run.","number":294,"additions":94,"commits":1,"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/294","_links":{"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/294/comments"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/294"},"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/294"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/294/comments"}},"merged_by":null,"diff_url":"https://github.com/puppetlabs/puppet/pull/294.diff","comments":6,"head":{"ref":"bug/master/10837_retry_inventory_save_on_failure","user":{"login":"ccaum","id":467617,"url":"https://api.github.com/users/ccaum","avatar_url":"https://secure.gravatar.com/avatar/4f03ab526e480b96947d4d47a7867414?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4f03ab526e480b96947d4d47a7867414"},"sha":"0ec11238666fdfb2aed67ffb5e47649df5ff97a6","repo":{"git_url":"git://github.com/ccaum/puppet.git","watchers":1,"created_at":"2011-10-10T17:06:27Z","open_issues":0,"fork":true,"updated_at":"2011-12-27T19:58:31Z","id":2549536,"language":"Ruby","html_url":"https://github.com/ccaum/puppet","name":"puppet","master_branch":null,"description":"Server automation framework and application","url":"https://api.github.com/repos/ccaum/puppet","ssh_url":"git@github.com:ccaum/puppet.git","forks":0,"pushed_at":"2011-12-27T19:58:30Z","clone_url":"https://github.com/ccaum/puppet.git","owner":{"login":"ccaum","id":467617,"url":"https://api.github.com/users/ccaum","avatar_url":"https://secure.gravatar.com/avatar/4f03ab526e480b96947d4d47a7867414?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"4f03ab526e480b96947d4d47a7867414"},"homepage":"http://www.puppetlabs.com/puppet/introduction/","size":164,"private":false,"svn_url":"https://github.com/ccaum/puppet"},"label":"ccaum:bug/master/10837_retry_inventory_save_on_failure"},"changed_files":3,"merged":false},"number":294,"action":"closed"}