{"action":"created","issue":{"url":"https://api.github.com/repos/chef-cookbooks/docker/issues/965","repository_url":"https://api.github.com/repos/chef-cookbooks/docker","labels_url":"https://api.github.com/repos/chef-cookbooks/docker/issues/965/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/docker/issues/965/comments","events_url":"https://api.github.com/repos/chef-cookbooks/docker/issues/965/events","html_url":"https://github.com/chef-cookbooks/docker/issues/965","id":294527672,"number":965,"title":"docker_container is not splitting labels that have ':'(s) in the value.","user":{"login":"david-caldwell","id":3902028,"avatar_url":"https://avatars3.githubusercontent.com/u/3902028?v=4","gravatar_id":"","url":"https://api.github.com/users/david-caldwell","html_url":"https://github.com/david-caldwell","followers_url":"https://api.github.com/users/david-caldwell/followers","following_url":"https://api.github.com/users/david-caldwell/following{/other_user}","gists_url":"https://api.github.com/users/david-caldwell/gists{/gist_id}","starred_url":"https://api.github.com/users/david-caldwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-caldwell/subscriptions","organizations_url":"https://api.github.com/users/david-caldwell/orgs","repos_url":"https://api.github.com/users/david-caldwell/repos","events_url":"https://api.github.com/users/david-caldwell/events{/privacy}","received_events_url":"https://api.github.com/users/david-caldwell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-05T20:15:17Z","updated_at":"2018-02-05T20:20:18Z","closed_at":null,"author_association":"NONE","body":"### Cookbook version\r\n2.17.0\r\n\r\n### Chef-client version\r\n13.6.4\r\n\r\n### Platform Details\r\nUbuntu 16.04.3 x64 running on DigitalOcean Cloud Provider\r\n\r\n### Scenario:\r\nI'm attempting to pass in a `Label` with a value that has colons ` : ` in it. The entire string is split by ` : ` and you end up with the second value of the array as your value. Everything after the second colon is discarded.\r\n\r\n### Steps to Reproduce:\r\nPass in a label like `labels ['HealthCheckArgs:http://{{ host }}:{{ tcp 8080 }}/health_check']`\r\n\r\n### Expected Result:\r\nHealthCheckArgs=http://{{ host }}:{{ tcp 8080 }}/health_check\r\n\r\n### Actual Result:\r\nHealthCheckArgs=http\r\n\r\nChanging line 26 in libraries/helpers_base.rb in the following way resolves the issue.\r\n```\r\n-    h[parts[0]] = parts[1]\r\n+    h[parts[0]] = parts[1..-1].join(':')\r\n```"},"comment":{"url":"https://api.github.com/repos/chef-cookbooks/docker/issues/comments/363209076","html_url":"https://github.com/chef-cookbooks/docker/issues/965#issuecomment-363209076","issue_url":"https://api.github.com/repos/chef-cookbooks/docker/issues/965","id":363209076,"user":{"login":"spuder","id":242382,"avatar_url":"https://avatars3.githubusercontent.com/u/242382?v=4","gravatar_id":"","url":"https://api.github.com/users/spuder","html_url":"https://github.com/spuder","followers_url":"https://api.github.com/users/spuder/followers","following_url":"https://api.github.com/users/spuder/following{/other_user}","gists_url":"https://api.github.com/users/spuder/gists{/gist_id}","starred_url":"https://api.github.com/users/spuder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spuder/subscriptions","organizations_url":"https://api.github.com/users/spuder/orgs","repos_url":"https://api.github.com/users/spuder/repos","events_url":"https://api.github.com/users/spuder/events{/privacy}","received_events_url":"https://api.github.com/users/spuder/received_events","type":"User","site_admin":false},"created_at":"2018-02-05T20:20:18Z","updated_at":"2018-02-05T20:20:18Z","author_association":"NONE","body":"I work with David and can confirm that Labels does not work when a string contains multiple colons`:`\r\n\r\n     'HealthCheckArgs:http://{{ host }}:{{ tcp 8080 }}/health_check'\r\n\r\nbecomes\r\n\r\n    ['HealthCheckArgs', 'http', '//{{ host }}',{{ tcp 8080 }}/health_check'],\r\n\r\nWhich gets truncated to \r\n\r\n      'HealthCheckArgs:'http'\r\n\r\nThe work around is to provide labels as a hash, or fix the `coerce_labels` method. "}}
{"actor":{"display_login":"spuder"}}