{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/28599","labels_url":"https://api.github.com/repos/saltstack/salt/issues/28599/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/28599/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/28599/events","html_url":"https://github.com/saltstack/salt/pull/28599","id":115220609,"number":28599,"title":"Refactor etcd modules","user":{"login":"sjmh","id":12321,"avatar_url":"https://avatars.githubusercontent.com/u/12321?v=3","gravatar_id":"","url":"https://api.github.com/users/sjmh","html_url":"https://github.com/sjmh","followers_url":"https://api.github.com/users/sjmh/followers","following_url":"https://api.github.com/users/sjmh/following{/other_user}","gists_url":"https://api.github.com/users/sjmh/gists{/gist_id}","starred_url":"https://api.github.com/users/sjmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjmh/subscriptions","organizations_url":"https://api.github.com/users/sjmh/orgs","repos_url":"https://api.github.com/users/sjmh/repos","events_url":"https://api.github.com/users/sjmh/events{/privacy}","received_events_url":"https://api.github.com/users/sjmh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Expert%20Change","name":"Expert Change","color":"5319e7"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Pending%20Discussion","name":"Pending Discussion","color":"c7def8"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Platform","name":"Platform","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Release%20Notes","name":"Release Notes","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-11-05T06:52:57Z","updated_at":"2015-11-06T19:10:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/28599","html_url":"https://github.com/saltstack/salt/pull/28599","diff_url":"https://github.com/saltstack/salt/pull/28599.diff","patch_url":"https://github.com/saltstack/salt/pull/28599.patch"},"body":"The etcd modules were using bits and pieces of python-etcd directly and\r\nwere using outdated exceptions to catch errors.  These errors were\r\ncausing issues when trying to use etcd modules for logic.\r\n\r\nA summary of changes\r\n    - Most of the 'work' is now done in etcd_util\r\n    - Removed import of python-etcd from states/etcd_mod and the\r\n      returner\r\n    - Added new tests for etcd_util\r\n    - Put in proper exceptions and catches for python-etcd\r\n    - Added support for ValueError catching.  python-etcd doesn't\r\n      support python 2.6 and raises ValueError when trying to format\r\n      exceptions\r\n    - Added watch function to etcd execution module\r\n    - Added autospec to unit tests so hopefully less brittle\r\n    - Added TTL and directory features to the set function\r\n\r\n*BACKWARDS INCOMPATIBLE CHANGES*\r\n\r\nAll interfaces are still backwards incompatible.  However, the returns\r\nfrom several of the etcd util functions have been changed.  The old\r\nreturns presented issues with certain test cases.  For instance, a\r\nfailed 'get' returned '', but a key with no value will also return ''.\r\n\r\nThe same issues occured with the 'ls', 'tree' and 'set' functions.  Trying to\r\nls a blank directory returned the same result as a failed ls of a\r\nnon-existent key."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/154503946","html_url":"https://github.com/saltstack/salt/pull/28599#issuecomment-154503946","issue_url":"https://api.github.com/repos/saltstack/salt/issues/28599","id":154503946,"user":{"login":"sjmh","id":12321,"avatar_url":"https://avatars.githubusercontent.com/u/12321?v=3","gravatar_id":"","url":"https://api.github.com/users/sjmh","html_url":"https://github.com/sjmh","followers_url":"https://api.github.com/users/sjmh/followers","following_url":"https://api.github.com/users/sjmh/following{/other_user}","gists_url":"https://api.github.com/users/sjmh/gists{/gist_id}","starred_url":"https://api.github.com/users/sjmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjmh/subscriptions","organizations_url":"https://api.github.com/users/sjmh/orgs","repos_url":"https://api.github.com/users/sjmh/repos","events_url":"https://api.github.com/users/sjmh/events{/privacy}","received_events_url":"https://api.github.com/users/sjmh/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T19:10:38Z","updated_at":"2015-11-06T19:10:38Z","body":"Thanks @cachedout - did we went to relog those?  The read function is logging those exceptions before re-raising.  I can add some more situational-specific logging to those.\r\n\r\n"}}