{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/r10k/issues/203","labels_url":"https://api.github.com/repos/puppetlabs/r10k/issues/203/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/r10k/issues/203/comments","events_url":"https://api.github.com/repos/puppetlabs/r10k/issues/203/events","html_url":"https://github.com/puppetlabs/r10k/issues/203","id":46325451,"number":203,"title":"r10k deploy does not validate the structure of r10k.yaml","user":{"login":"adrienthebo","id":172194,"avatar_url":"https://avatars.githubusercontent.com/u/172194?v=3","gravatar_id":"","url":"https://api.github.com/users/adrienthebo","html_url":"https://github.com/adrienthebo","followers_url":"https://api.github.com/users/adrienthebo/followers","following_url":"https://api.github.com/users/adrienthebo/following{/other_user}","gists_url":"https://api.github.com/users/adrienthebo/gists{/gist_id}","starred_url":"https://api.github.com/users/adrienthebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrienthebo/subscriptions","organizations_url":"https://api.github.com/users/adrienthebo/orgs","repos_url":"https://api.github.com/users/adrienthebo/repos","events_url":"https://api.github.com/users/adrienthebo/events{/privacy}","received_events_url":"https://api.github.com/users/adrienthebo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/puppetlabs/r10k/labels/[subsystem]%20deployment","name":"[subsystem] deployment","color":"207de5"},{"url":"https://api.github.com/repos/puppetlabs/r10k/labels/[type]%20bug","name":"[type] bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-10-20T21:04:48Z","updated_at":"2015-03-16T19:20:29Z","closed_at":"2015-03-16T19:20:29Z","body":"If r10k.yaml has the following typo:\r\n\r\n```yaml\r\n---\r\nsource:\r\n  control:\r\n    # ...\r\n```\r\n\r\nr10k will try to iterate over the nonexistent element `sources` instead of source and raise an error:\r\n\r\n```\r\n bexec r10k deploy environment -v --trace\r\n[R10K::Util::Attempt - ERROR] undefined method `map' for nil:NilClass\r\n/home/adrien/development/r10k/lib/r10k/deployment.rb:105:in `load_sources'\r\n/home/adrien/development/r10k/lib/r10k/deployment.rb:48:in `sources'\r\n/home/adrien/development/r10k/lib/r10k/deployment.rb:33:in `preload!'\r\n/home/adrien/development/r10k/lib/r10k/action/deploy/environment.rb:34:in `block in call'\r\n[...]\r\n```\r\n\r\nThe contents of r10k.yaml should be checked to ensure only valid keys are defined and that all required keys are available."},"comment":{"url":"https://api.github.com/repos/puppetlabs/r10k/issues/comments/81882640","html_url":"https://github.com/puppetlabs/r10k/issues/203#issuecomment-81882640","issue_url":"https://api.github.com/repos/puppetlabs/r10k/issues/203","id":81882640,"user":{"login":"adrienthebo","id":172194,"avatar_url":"https://avatars.githubusercontent.com/u/172194?v=3","gravatar_id":"","url":"https://api.github.com/users/adrienthebo","html_url":"https://github.com/adrienthebo","followers_url":"https://api.github.com/users/adrienthebo/followers","following_url":"https://api.github.com/users/adrienthebo/following{/other_user}","gists_url":"https://api.github.com/users/adrienthebo/gists{/gist_id}","starred_url":"https://api.github.com/users/adrienthebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrienthebo/subscriptions","organizations_url":"https://api.github.com/users/adrienthebo/orgs","repos_url":"https://api.github.com/users/adrienthebo/repos","events_url":"https://api.github.com/users/adrienthebo/events{/privacy}","received_events_url":"https://api.github.com/users/adrienthebo/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T19:20:29Z","updated_at":"2015-03-16T19:20:29Z","body":"Partially resolved in https://tickets.puppetlabs.com/browse/RK-4; https://tickets.puppetlabs.com/browse/RK-51 tracks the larger strict validation issue. Closing this issue in favor of RK-51."}}