{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-puppet_agent/issues/106","repository_url":"https://api.github.com/repos/puppetlabs/puppetlabs-puppet_agent","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-puppet_agent/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-puppet_agent/issues/106/comments","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-puppet_agent/issues/106/events","html_url":"https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/106","id":148196736,"number":106,"title":"(PE-11531) Don't remove packages if package_version undef","user":{"login":"highb","id":759848,"avatar_url":"https://avatars.githubusercontent.com/u/759848?v=3","gravatar_id":"","url":"https://api.github.com/users/highb","html_url":"https://github.com/highb","followers_url":"https://api.github.com/users/highb/followers","following_url":"https://api.github.com/users/highb/following{/other_user}","gists_url":"https://api.github.com/users/highb/gists{/gist_id}","starred_url":"https://api.github.com/users/highb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highb/subscriptions","organizations_url":"https://api.github.com/users/highb/orgs","repos_url":"https://api.github.com/users/highb/repos","events_url":"https://api.github.com/users/highb/events{/privacy}","received_events_url":"https://api.github.com/users/highb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-13T22:06:28Z","updated_at":"2016-04-13T22:08:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-puppet_agent/pulls/106","html_url":"https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/106","diff_url":"https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/106.diff","patch_url":"https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/106.patch"},"body":"Prior to this commit we were removing the puppet-agent package\r\nif the `package_version` happened to be unset, due to the\r\nbehavior of `versioncmp`. This is obviously not what we want to\r\nhave happen.\r\nThis commit updates all of the calls that compare `package_version`\r\nwith `aio_agent_version` with `versioncmp` to be gated on\r\n`package_version` not being undef, thus preventing the packages\r\nfrom being removed on every run."},"comment":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-puppet_agent/issues/comments/209668852","html_url":"https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/106#issuecomment-209668852","issue_url":"https://api.github.com/repos/puppetlabs/puppetlabs-puppet_agent/issues/106","id":209668852,"user":{"login":"highb","id":759848,"avatar_url":"https://avatars.githubusercontent.com/u/759848?v=3","gravatar_id":"","url":"https://api.github.com/users/highb","html_url":"https://github.com/highb","followers_url":"https://api.github.com/users/highb/followers","following_url":"https://api.github.com/users/highb/following{/other_user}","gists_url":"https://api.github.com/users/highb/gists{/gist_id}","starred_url":"https://api.github.com/users/highb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highb/subscriptions","organizations_url":"https://api.github.com/users/highb/orgs","repos_url":"https://api.github.com/users/highb/repos","events_url":"https://api.github.com/users/highb/events{/privacy}","received_events_url":"https://api.github.com/users/highb/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T22:08:51Z","updated_at":"2016-04-13T22:08:51Z","body":"As discussed in channel, `versioncmp` returns -1 if the second argument is nil:\r\n```\r\n[root@azvyfad4cb0gnv2 ~]# puppet apply -e 'warning(versioncmp(\"1.0.1\", nil))'\r\nWarning: Scope(Class[main]): -1\r\nNotice: Compiled catalog for azvyfad4cb0gnv2.delivery.puppetlabs.net in environment production in 0.03 seconds\r\n```"}}