{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-mysql/issues/779","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-mysql/issues/779/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-mysql/issues/779/comments","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-mysql/issues/779/events","html_url":"https://github.com/puppetlabs/puppetlabs-mysql/pull/779","id":116979123,"number":779,"title":"Fixes edge-case with dropping pre-existing users with grants","user":{"login":"jmcclell","id":1063492,"avatar_url":"https://avatars.githubusercontent.com/u/1063492?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcclell","html_url":"https://github.com/jmcclell","followers_url":"https://api.github.com/users/jmcclell/followers","following_url":"https://api.github.com/users/jmcclell/following{/other_user}","gists_url":"https://api.github.com/users/jmcclell/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcclell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcclell/subscriptions","organizations_url":"https://api.github.com/users/jmcclell/orgs","repos_url":"https://api.github.com/users/jmcclell/repos","events_url":"https://api.github.com/users/jmcclell/events{/privacy}","received_events_url":"https://api.github.com/users/jmcclell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-15T07:36:56Z","updated_at":"2016-01-15T13:05:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-mysql/pulls/779","html_url":"https://github.com/puppetlabs/puppetlabs-mysql/pull/779","diff_url":"https://github.com/puppetlabs/puppetlabs-mysql/pull/779.diff","patch_url":"https://github.com/puppetlabs/puppetlabs-mysql/pull/779.patch"},"body":"If a user exists in the database upon first Puppet run (for example, in the case of loading a database snapshot) and the run sets that user's :ensure attribute to 'absent', the mysql_grant provider will throw an error when the dependency chain causes it to try to destroy the grants associated with that user because the DROP statement from the mysql_user provider already removed the grants. To fix, we must check if the user exists before revoking the grants."},"comment":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-mysql/issues/comments/171954732","html_url":"https://github.com/puppetlabs/puppetlabs-mysql/pull/779#issuecomment-171954732","issue_url":"https://api.github.com/repos/puppetlabs/puppetlabs-mysql/issues/779","id":171954732,"user":{"login":"jonnytpuppet","id":10402750,"avatar_url":"https://avatars.githubusercontent.com/u/10402750?v=3","gravatar_id":"","url":"https://api.github.com/users/jonnytpuppet","html_url":"https://github.com/jonnytpuppet","followers_url":"https://api.github.com/users/jonnytpuppet/followers","following_url":"https://api.github.com/users/jonnytpuppet/following{/other_user}","gists_url":"https://api.github.com/users/jonnytpuppet/gists{/gist_id}","starred_url":"https://api.github.com/users/jonnytpuppet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonnytpuppet/subscriptions","organizations_url":"https://api.github.com/users/jonnytpuppet/orgs","repos_url":"https://api.github.com/users/jonnytpuppet/repos","events_url":"https://api.github.com/users/jonnytpuppet/events{/privacy}","received_events_url":"https://api.github.com/users/jonnytpuppet/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T13:05:17Z","updated_at":"2016-01-15T13:05:17Z","body":"@jmcclell This actually looks good to me, and personally, I'd be happy enough if the current grant destroy tests still pass.\r\n\r\nIt would be appreciated if you could squash your commits though.\r\n\r\nThanks!"}}