{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef/issues/4081","labels_url":"https://api.github.com/repos/chef/chef/issues/4081/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef/issues/4081/comments","events_url":"https://api.github.com/repos/chef/chef/issues/4081/events","html_url":"https://github.com/chef/chef/pull/4081","id":112478500,"number":4081,"title":"RFC-037:  add chef_version and ohai_version metadata","user":{"login":"lamont-granquist","id":454857,"avatar_url":"https://avatars.githubusercontent.com/u/454857?v=3","gravatar_id":"","url":"https://api.github.com/users/lamont-granquist","html_url":"https://github.com/lamont-granquist","followers_url":"https://api.github.com/users/lamont-granquist/followers","following_url":"https://api.github.com/users/lamont-granquist/following{/other_user}","gists_url":"https://api.github.com/users/lamont-granquist/gists{/gist_id}","starred_url":"https://api.github.com/users/lamont-granquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamont-granquist/subscriptions","organizations_url":"https://api.github.com/users/lamont-granquist/orgs","repos_url":"https://api.github.com/users/lamont-granquist/repos","events_url":"https://api.github.com/users/lamont-granquist/events{/privacy}","received_events_url":"https://api.github.com/users/lamont-granquist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-20T23:10:43Z","updated_at":"2015-10-21T19:44:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chef/chef/pulls/4081","html_url":"https://github.com/chef/chef/pull/4081","diff_url":"https://github.com/chef/chef/pull/4081.diff","patch_url":"https://github.com/chef/chef/pull/4081.patch"},"body":"This allows knife to upload cookbooks containing chef_version and ohai_version.  When the chef-client downloads cookbooks with constraints it checks them and throws an exception if the constraints do not match.  The knife command will upload cookbooks which do not match the version constraint (this is deliberate in the case where knife workstation versions differ from chef-client production versions -- injecting the production chef-client version into knife to prevent uploads is out-of-scope).\r\n\r\nAlso out of scope - including these into /universe, teaching berkshelf and the policyfile depsolver to avoid them, injecting production chef-version values into policyfiles, teaching the cookbook_versions endpoint to filter based on chef_version, etc, etc, etc, etc, etc....  This is only step number one.\r\n\r\nThis PR does go slightly beyond the RFC and includes the ability to not only pin via a simple constraint like '~> 12.3' but also to allow multiple pins to handle features that were back-ported:\r\n\r\n```ruby\r\nchef_version \">= 11.20.0\", \"< 12.0\"\r\nchef_version \">= 12.6.0\"\r\n```\r\n\r\nThat will be satisfied by a chef version that is 11.x >= 11.20.0, or 12.x >= 12.6.0, or >= 13. "},"comment":{"url":"https://api.github.com/repos/chef/chef/issues/comments/150004967","html_url":"https://github.com/chef/chef/pull/4081#issuecomment-150004967","issue_url":"https://api.github.com/repos/chef/chef/issues/4081","id":150004967,"user":{"login":"lamont-granquist","id":454857,"avatar_url":"https://avatars.githubusercontent.com/u/454857?v=3","gravatar_id":"","url":"https://api.github.com/users/lamont-granquist","html_url":"https://github.com/lamont-granquist","followers_url":"https://api.github.com/users/lamont-granquist/followers","following_url":"https://api.github.com/users/lamont-granquist/following{/other_user}","gists_url":"https://api.github.com/users/lamont-granquist/gists{/gist_id}","starred_url":"https://api.github.com/users/lamont-granquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamont-granquist/subscriptions","organizations_url":"https://api.github.com/users/lamont-granquist/orgs","repos_url":"https://api.github.com/users/lamont-granquist/repos","events_url":"https://api.github.com/users/lamont-granquist/events{/privacy}","received_events_url":"https://api.github.com/users/lamont-granquist/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T19:44:29Z","updated_at":"2015-10-21T19:44:29Z","body":"@chef/client-core ready for review"}}