)]}'
{"id":"openstack%2Fpython-novaclient~26678","triplet_id":"openstack%2Fpython-novaclient~master~I9d9bf086fa790b811c520b2fa317f95cb1921805","project":"openstack/python-novaclient","branch":"master","topic":"keep-info-in-sync","hashtags":[],"change_id":"I9d9bf086fa790b811c520b2fa317f95cb1921805","subject":"make sure .get() also updates _info","status":"MERGED","created":"2013-04-10 21:35:13.000000000","updated":"2013-04-11 20:43:51.000000000","submitted":"2013-04-11 20:43:50.000000000","submitter":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"total_comment_count":1,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"f9c83670576779a64ab95106d9e36b3efaa5fcff","_number":26678,"virtual_id_number":26678,"owner":{"_account_id":1395,"name":"Mike Lundy","email":"mike@fluffypenguin.org","username":"novas0x2a"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"all":[{"value":2,"date":"2013-04-11 20:43:50.000000000","_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"_account_id":1395,"name":"Mike Lundy","email":"mike@fluffypenguin.org","username":"novas0x2a"},{"value":0,"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},{"value":0,"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},{"value":0,"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"recommended":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"all":[{"value":0,"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"date":"2013-04-10 22:57:47.000000000","permitted_voting_range":{"min":0,"max":1},"_account_id":1395,"name":"Mike Lundy","email":"mike@fluffypenguin.org","username":"novas0x2a"},{"value":1,"date":"2013-04-10 23:43:56.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},{"value":2,"date":"2013-04-10 22:58:25.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},{"value":2,"date":"2013-04-11 19:36:32.000000000","_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","value":1,"default_value":0,"optional":true},"Workflow":{"approved":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"all":[{"value":0,"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"_account_id":1395,"name":"Mike Lundy","email":"mike@fluffypenguin.org","username":"novas0x2a"},{"value":0,"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},{"value":0,"date":"2013-04-10 22:58:25.000000000","permitted_voting_range":{"min":0,"max":1},"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},{"value":1,"date":"2013-04-11 19:36:32.000000000","_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"value":0,"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"_account_id":1395,"name":"Mike Lundy","email":"mike@fluffypenguin.org","username":"novas0x2a"},{"value":0,"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},{"value":0,"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},{"value":0,"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"}],"values":{" 0":"Default Priority","+1":"Contributor Review Promise","+2":"Core Review Promise"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},{"_account_id":1395,"name":"Mike Lundy","email":"mike@fluffypenguin.org","username":"novas0x2a"},{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2013-04-10 22:58:25.000000000","updated_by":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"reviewer":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"state":"REVIEWER"},{"updated":"2013-04-10 23:43:56.000000000","updated_by":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"reviewer":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"state":"REVIEWER"},{"updated":"2013-04-11 19:36:32.000000000","updated_by":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"reviewer":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"state":"REVIEWER"},{"updated":"2013-04-11 20:43:50.000000000","updated_by":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"reviewer":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"state":"REVIEWER"}],"messages":[{"id":"f7bc914747f3a21ba1ea6b594843f76d8889d8e7","author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"date":"2013-04-10 21:44:08.000000000","message":"Patch Set 1: (1 inline comment)\n\n","accounts_in_message":[],"_revision_number":1},{"id":"709437183d62a542fc5312b6ef06d6e165bfa8e5","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2013-04-10 22:15:38.000000000","message":"Patch Set 1: Doesn\u0027t seem to work\n\nBuild failed.  For information on how to proceed, see https://wiki.openstack.org/wiki/GerritJenkinsGithub#Test_Failures\n\n- http://logs.openstack.org/26678/1/check/gate-python-novaclient-pep8/1407 : SUCCESS\n- http://docs-draft.openstack.org/26678/1/check/gate-python-novaclient-docs/1098/ : SUCCESS\n- http://logs.openstack.org/26678/1/check/gate-python-novaclient-python26/1197 : SUCCESS\n- http://logs.openstack.org/26678/1/check/gate-python-novaclient-python26-rhel6/62 : SUCCESS (non-voting)\n- http://logs.openstack.org/26678/1/check/gate-python-novaclient-python27/1416 : SUCCESS\n- http://logs.openstack.org/26678/1/check/gate-tempest-devstack-vm-full/12266 : FAILURE\n- http://logs.openstack.org/26678/1/check/gate-tempest-devstack-vm-postgres-full/11981 : SUCCESS\n- http://logs.openstack.org/26678/1/check/gate-tempest-devstack-vm-quantum/18082 : SUCCESS\n","accounts_in_message":[],"_revision_number":1},{"id":"c3b142a6a2f6bd3962c227074a72482f134af32a","author":{"_account_id":1395,"name":"Mike Lundy","email":"mike@fluffypenguin.org","username":"novas0x2a"},"date":"2013-04-10 22:45:15.000000000","message":"Patch Set 1:\n\nHaving the _info get out of sync with the actual attributes is kind of a trap for the unwary. Resource.__eq__ (in the cases where the resource doesn\u0027t have an id) delegates to an _info comparison, which means that an object retrieved with list, changed, and then updated with get would compare unequal to an object retrieved with a list() at the same time as the get(), because the attrs are equal but the _info dict is stale. Another example is limits:Limits, which uses self._info[\u0027rate\u0027] instead of self.rate and as such can return two different answers for the same query, depending on how you retrieved it (if you\u0027re not sure how that could happen, see the unit test I added- that test fails without my change, even though it\u0027s a perfectly logical thing to do).\n\nIt also damages discoverability; when I was playing in novaclient, I thought something was broken with my code because I was inspecting _info which was not updating. For consistency\u0027s sake, it\u0027s kind of ugly to have part of the data updated and part of it not- some other solutions to maintain consistency could be 1) remove the _info  attr completely or 2) instead of calling setattr in _add_details, it might be worthwhile to override __getattr__ and __setattr__ to operate on _info instead of __dict__, or even 3) make _info an alias for __dict__. #1 is a pretty big change, though- quite a few places use _info. #2 is kind of annoying, maintaining a shadow __dict__ doesn\u0027t feel necessary. #3 might be okay, it would preserve compatibility with callers while making sure it can\u0027t get out of sync.\n\nI\u0027d be happy to implement this in one of the other different ways if that\u0027s what you\u0027d prefer.","accounts_in_message":[],"_revision_number":1},{"id":"981aa1156970c0bf2f239d1915b2adbc229b432f","author":{"_account_id":1395,"name":"Mike Lundy","email":"mike@fluffypenguin.org","username":"novas0x2a"},"date":"2013-04-10 22:51:01.000000000","message":"Patch Set 1:\n\nrecheck bug 1161529","accounts_in_message":[],"_revision_number":1},{"id":"1c9cb5c685d4c1dcd7be7676263238fd016fc2b7","author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"date":"2013-04-10 22:53:26.000000000","message":"Patch Set 1:\n\nNo, I have no problem with the code modifications; I just want you to put that explanation in the commit message :)  When someone is browsing the tree at 30,000 feet with no internet access, I want it to be clear to them, just from the message, what problem(s) the patch was trying to solve :)","accounts_in_message":[],"_revision_number":1},{"id":"a4c65d4260996c5beeaf3634c09049a02f3a2b27","author":{"_account_id":1395,"name":"Mike Lundy","email":"mike@fluffypenguin.org","username":"novas0x2a"},"date":"2013-04-10 22:56:38.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"90af8c73b7567c55d5ff81d5f9638041e293f977","author":{"_account_id":5494,"name":"Trivial Rebase","email":"trivial-rebase@review.openstack.org","username":"trivial-rebase"},"date":"2013-04-10 22:56:45.000000000","message":"Patch Set 2:\n\nNew patchset patch-id matches previous patchset, but commit message has changed.","accounts_in_message":[],"_revision_number":2},{"id":"16955a8474b93d5ae197f4d073916b12f7f977e5","author":{"_account_id":1395,"name":"Mike Lundy","email":"mike@fluffypenguin.org","username":"novas0x2a"},"date":"2013-04-10 22:57:47.000000000","message":"Patch Set 2:\n\nroger! fixed the commit message.","accounts_in_message":[],"_revision_number":2},{"id":"baddc19bf9bc4bf7eb3134c3e20d2fbfb7d41a32","author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"date":"2013-04-10 22:58:25.000000000","message":"Patch Set 2: Looks good to me (core reviewer)\n\n","accounts_in_message":[],"_revision_number":2},{"id":"0a08ced3500d389906e1d63a5f09964eb968aaa3","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2013-04-10 23:37:24.000000000","message":"Patch Set 2: Works for me\n\nBuild succeeded.\n\n- http://logs.openstack.org/26678/2/check/gate-python-novaclient-pep8/1409 : SUCCESS\n- http://docs-draft.openstack.org/26678/2/check/gate-python-novaclient-docs/1100/ : SUCCESS\n- http://logs.openstack.org/26678/2/check/gate-python-novaclient-python26/1199 : SUCCESS\n- http://logs.openstack.org/26678/2/check/gate-python-novaclient-python26-rhel6/64 : SUCCESS (non-voting)\n- http://logs.openstack.org/26678/2/check/gate-python-novaclient-python27/1418 : SUCCESS\n- http://logs.openstack.org/26678/2/check/gate-tempest-devstack-vm-full/12278 : SUCCESS\n- http://logs.openstack.org/26678/2/check/gate-tempest-devstack-vm-postgres-full/11993 : SUCCESS\n- http://logs.openstack.org/26678/2/check/gate-tempest-devstack-vm-quantum/18095 : SUCCESS\n","accounts_in_message":[],"_revision_number":2},{"id":"0e6dac5f245f312607810a19bc453735e3e27f72","author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"date":"2013-04-10 23:43:56.000000000","message":"Patch Set 2: Looks good to me, but someone else must approve\n\nlgtm","accounts_in_message":[],"_revision_number":2},{"id":"7ec1513cf0390129166bd851177787d231f3df43","author":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"date":"2013-04-11 19:36:32.000000000","message":"Patch Set 2: Looks good to me (core reviewer); Approved\n\n","accounts_in_message":[],"_revision_number":2},{"id":"e2b6cd45645366096ecc825286bd5e6de1090da5","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2013-04-11 19:36:37.000000000","message":"Patch Set 2: No score\n\nStarting gate jobs.\nhttp://status.openstack.org/zuul/","accounts_in_message":[],"_revision_number":2},{"id":"4b94b32010fee9c6269cc54ff368c8d27bd50aa1","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2013-04-11 20:43:50.000000000","message":"Patch Set 2: Verified\n\nBuild succeeded.\n\n- http://docs-draft.openstack.org/26678/2/gate/gate-python-novaclient-docs/1106/doc/build/html/ : SUCCESS\n- http://logs.openstack.org/26678/2/gate/gate-python-novaclient-pep8/1415 : SUCCESS\n- http://logs.openstack.org/26678/2/gate/gate-python-novaclient-python26/1205 : SUCCESS\n- http://logs.openstack.org/26678/2/gate/gate-python-novaclient-python27/1424 : SUCCESS\n- http://logs.openstack.org/26678/2/gate/gate-tempest-devstack-vm-full/12392 : SUCCESS\n- http://logs.openstack.org/26678/2/gate/gate-tempest-devstack-vm-postgres-full/12107 : SUCCESS\n- http://logs.openstack.org/26678/2/gate/gate-tempest-devstack-vm-quantum/18226 : SUCCESS\n- http://logs.openstack.org/26678/2/gate/gate-grenade-devstack-vm/353 : FAILURE (non-voting)\n","accounts_in_message":[],"_revision_number":2},{"id":"7198128d4f99a644fea35b9396b04f9e0fb4a983","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2013-04-11 20:43:51.000000000","message":"Change has been successfully merged into the git repository.","accounts_in_message":[],"_revision_number":2}],"current_revision_number":2,"current_revision":"2a495c03d5cac4470f65c9f4dd513f3facfa6fdb","revisions":{"c329f8017435e2b8f02946e660885ca4aab2bbda":{"kind":"REWORK","_number":1,"created":"2013-04-10 21:35:13.000000000","uploader":{"_account_id":1395,"name":"Mike Lundy","email":"mike@fluffypenguin.org","username":"novas0x2a"},"ref":"refs/changes/78/26678/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-novaclient","ref":"refs/changes/78/26678/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/78/26678/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/78/26678/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/78/26678/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-novaclient refs/changes/78/26678/1"}}},"commit":{"parents":[{"commit":"5f3dbfdfdd9c9f05aea6833f6d7b749ceeac685b","subject":"Merge \"Fix problem with nova --version\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/5f3dbfdfdd9c9f05aea6833f6d7b749ceeac685b"}]}],"author":{"name":"Mike Lundy","email":"mike@fluffypenguin.org","date":"2013-04-10 21:09:21.000000000","tz":-420},"committer":{"name":"Mike Lundy","email":"mike@fluffypenguin.org","date":"2013-04-10 21:16:40.000000000","tz":-420},"subject":"make sure .get() also updates _info","message":"make sure .get() also updates _info\n\nChange-Id: I9d9bf086fa790b811c520b2fa317f95cb1921805\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/c329f8017435e2b8f02946e660885ca4aab2bbda"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/c329f8017435e2b8f02946e660885ca4aab2bbda"}]},"branch":"refs/heads/master"},"2a495c03d5cac4470f65c9f4dd513f3facfa6fdb":{"kind":"NO_CODE_CHANGE","_number":2,"created":"2013-04-10 22:56:38.000000000","uploader":{"_account_id":1395,"name":"Mike Lundy","email":"mike@fluffypenguin.org","username":"novas0x2a"},"ref":"refs/changes/78/26678/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-novaclient","ref":"refs/changes/78/26678/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/78/26678/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/78/26678/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/78/26678/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-novaclient refs/changes/78/26678/2"}}},"commit":{"parents":[{"commit":"5f3dbfdfdd9c9f05aea6833f6d7b749ceeac685b","subject":"Merge \"Fix problem with nova --version\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/5f3dbfdfdd9c9f05aea6833f6d7b749ceeac685b"}]}],"author":{"name":"Mike Lundy","email":"mike@fluffypenguin.org","date":"2013-04-10 21:09:21.000000000","tz":-420},"committer":{"name":"Mike Lundy","email":"mike@fluffypenguin.org","date":"2013-04-10 22:53:54.000000000","tz":-420},"subject":"make sure .get() also updates _info","message":"make sure .get() also updates _info\n\nHaving the _info get out of sync with the actual attributes is kind of a\ntrap for the unwary. _info is used in preference to the attributes in\nmany places, and letting it get out of sync means that the method of\nretrieval (get() vs. list()) influences the result.\n\nChange-Id: I9d9bf086fa790b811c520b2fa317f95cb1921805\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/2a495c03d5cac4470f65c9f4dd513f3facfa6fdb"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/2a495c03d5cac4470f65c9f4dd513f3facfa6fdb"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
