)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7761,"name":"Jun Jie Nan","email":"nanjunjie@gmail.com","username":"nanjj"},"change_message_id":"9160092c4c0dba7245b50cad9d5bc206c425414c","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"No tests right now, just spiking."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Blueprint: check-stack"},{"line_number":20,"context_line":"Change-Id: I4e39bfe6a3dca04305563844d5922da7e0bb67b3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAATn%2F%2BWgY%3D","line":19,"updated":"2013-11-27 02:01:52.000000000","message":"seemly it should be `stack-check\u0027","commit_id":"bc703e9e0add958a58432b32f46b00ae77fe7e3a"}],"heat/api/openstack/v1/__init__.py":[{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"3d84cfdcc0a440c6e713479f3ea09243ae583682","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            stack_mapper.connect(\"stack_check\","},{"line_number":103,"context_line":"                                 \"/stacks/{stack_name}/{stack_id}/check\","},{"line_number":104,"context_line":"                                 action\u003d\"check\","},{"line_number":105,"context_line":"                                 conditions\u003d{\u0027method\u0027: \u0027GET\u0027})"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"            # Stack update/delete"},{"line_number":108,"context_line":"            stack_mapper.connect(\"stack_update\","}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BUvI%3D","line":105,"updated":"2013-11-27 11:47:12.000000000","message":"I\u0027m wondering if we need a new method, or if stack_update combined with stack_show is sufficient.\n\nCurrently, we only support one update use-case, update the stack definition, but there seem to be several types of update which we could support through the same API call (via a couple of flags):\n\n1. Update the stack definition from a modified template (what we do now)\n\n2. Update the stack *state* by querying the services for state of the underlying resources, if they are not in the expected state, mark the resources UPDATE_FAILED (with a reason why), and make the stack as a whole UPDATE_FAILED.\n\n3. Update the stack to align resources with the expected state, by querying the underlying service and taking action if the state is not as expected (e.g replace or rebuild the resource)\n\nThese could be used in combination depending on what the user wants:\n\n- Do (2) \"heat stack-update --check astack\" to sync the stack/resource states in the DB with the state of the world\n\n- Do (3) \"heat stack-update --converge astack\" to align the resource states with the required states for UPDATE_COMPLETE\n\n- Do (1) \"heat stack-update -f newtemplate astack\" to update the stack definition\n\nWe could even have a heat stack-update --force or something which combines the three into the sledgehammer \"make it so\" update.","commit_id":"bc703e9e0add958a58432b32f46b00ae77fe7e3a"}],"heat/api/openstack/v1/stacks.py":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"d664d88728c7ac101124fe02e11e110863b231b6","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            if data_type \u003d\u003d \u0027Environment\u0027:"},{"line_number":78,"context_line":"                return environment_format.parse(data)"},{"line_number":79,"context_line":"            else:"},{"line_number":80,"context_line":"                return template_format.parse(data)"},{"line_number":81,"context_line":"        except ValueError as parse_ex:"},{"line_number":82,"context_line":"            mdict \u003d {\u0027type\u0027: data_type, \u0027error\u0027: parse_ex}"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAU3%2F%2FpGo%3D","line":79,"updated":"2014-02-25 14:19:31.000000000","message":"this fails when rebased on current master, as template_format.parse now does not allow templates without version specified. you need to make this method here aware of self.template_optional","commit_id":"447458e4f8adfaffddeb81f5af3e9a71abe9828f"}],"heat/engine/resource.py":[{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"3ea0b7a6be4054af792345d583f7f677f922c128","unresolved":false,"context_lines":[{"line_number":594,"context_line":"            self.state_set(action, self.IN_PROGRESS)"},{"line_number":595,"context_line":"            self.handle_check()"},{"line_number":596,"context_line":"        except exception.NotSupported as ex:"},{"line_number":597,"context_line":"            self.state_set(previous_action, previous_status, str(ex))"},{"line_number":598,"context_line":"            raise"},{"line_number":599,"context_line":"        except Exception as ex:"},{"line_number":600,"context_line":"            failure \u003d exception.ResourceFailure(ex, self, action)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUH%2F9p7I%3D","line":597,"updated":"2014-02-05 10:14:26.000000000","message":"So here, we\u0027re setting to the previous state/status but modifying the reason to the not supported string, which will look confusing in the resource detail output.\n\nInstead, I think we should move to UPDATE_FAILED, with the not supported string saying why, as this is really just a known failure path, so setting everything back to the previous state after a transition to UPDATE_IN_PROGRESS doesn\u0027t make much sense, IMO.","commit_id":"0e8a64edc1b8a154bf8845d76d8e95189027c1e2"},{"author":{"_account_id":9062,"name":"Richard Lee","email":"rblee88@gmail.com","username":"arbylee"},"change_message_id":"3b5e48854689a513e4063c9df2110012a833c34c","unresolved":false,"context_lines":[{"line_number":594,"context_line":"            self.state_set(action, self.IN_PROGRESS)"},{"line_number":595,"context_line":"            self.handle_check()"},{"line_number":596,"context_line":"        except exception.NotSupported as ex:"},{"line_number":597,"context_line":"            self.state_set(previous_action, previous_status, str(ex))"},{"line_number":598,"context_line":"            raise"},{"line_number":599,"context_line":"        except Exception as ex:"},{"line_number":600,"context_line":"            failure \u003d exception.ResourceFailure(ex, self, action)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUH%2F9kkI%3D","line":597,"in_reply_to":"AAAAUH%2F9p7I%3D","updated":"2014-02-05 23:32:43.000000000","message":"We went with reverting in this case because it felt odd to present UPDATE_FAILED for something that was basically a no-op.  As a user running stack list after \u0027check\u0027ing my stacks, I wouldn\u0027t know whether UPDATE_FAILED means there\u0027s a problem with my stacks or I just have some resources that don\u0027t support check yet.  What do you think?","commit_id":"0e8a64edc1b8a154bf8845d76d8e95189027c1e2"},{"author":{"_account_id":2834,"name":"Steven Dake","email":"steven.dake@gmail.com","username":"sdake"},"change_message_id":"fad95fe09ee88e30f2911b34dbfe5cb919be6296","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        This will fail by default to allow graceful degradation of resources"},{"line_number":933,"context_line":"        without a check implementation."},{"line_number":934,"context_line":"        \u0027\u0027\u0027"},{"line_number":935,"context_line":"        feature \u003d \u0027Check for \"%s\"\u0027 % self.type()"},{"line_number":936,"context_line":"        raise exception.NotSupported(feature\u003dfeature)"},{"line_number":937,"context_line":""},{"line_number":938,"context_line":"    def handle_update(self, json_snippet\u003dNone, tmpl_diff\u003dNone, prop_diff\u003dNone):"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAVn%2F%2Fw6M%3D","line":935,"updated":"2014-03-04 08:20:36.000000000","message":"I\u0027m not going to hold up the review for it but it might make sense to present the resource type (eg OS::Nova::Server) of the object rather then the internal type of the object which doesn\u0027t map directly to anything the user knows.","commit_id":"ae3bfbaa66f259c5ff675690668cb46516d20e94"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"88b5065d794671013d511a762f15f6b24619ff06","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        This will fail by default to allow graceful degradation of resources"},{"line_number":933,"context_line":"        without a check implementation."},{"line_number":934,"context_line":"        \u0027\u0027\u0027"},{"line_number":935,"context_line":"        feature \u003d \u0027Check for \"%s\"\u0027 % self.type()"},{"line_number":936,"context_line":"        raise exception.NotSupported(feature\u003dfeature)"},{"line_number":937,"context_line":""},{"line_number":938,"context_line":"    def handle_update(self, json_snippet\u003dNone, tmpl_diff\u003dNone, prop_diff\u003dNone):"}],"source_content_type":"text/x-python","patch_set":28,"id":"AAAAVn%2F%2FtRM%3D","line":935,"in_reply_to":"AAAAVn%2F%2Fw6M%3D","updated":"2014-03-04 15:15:32.000000000","message":"If you look at the definition of self.type() (line 215), that\u0027s what it actually returns. \u003d)","commit_id":"ae3bfbaa66f259c5ff675690668cb46516d20e94"}],"heat/engine/resources/instance.py":[{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"3d84cfdcc0a440c6e713479f3ea09243ae583682","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            status \u003d self.nova().servers.get(self.resource_id).status"},{"line_number":349,"context_line":"        except clients.novaclient.exceptions.NotFound:"},{"line_number":350,"context_line":"            status \u003d \u0027DELETED\u0027"},{"line_number":351,"context_line":"        return {\u0027status\u0027: status}"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def _attach_volumes_task(self):"},{"line_number":354,"context_line":"        attach_tasks \u003d (volume.VolumeAttachTask(self.stack,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BUyw%3D","line":351,"updated":"2013-11-27 11:47:12.000000000","message":"Seems like we can/should reuse _check_active here, what happens if the Instance is active, but one of the volumes has been detatched or deleted out of band?\n\nGetting the current status seems like basically the same thing that we do after handle_create, so it seems like we should try to use common status-check code if possible.\n\nAlso, as Angus has observed, this is exposing service-specific status, is that really what we want?  Or do we just care that the resource is not in the expected state (ie not CREATE, COMPLETE), so we can report the resource FAILED (with data describing why the failure from the exception.Error raised in _check_active?)","commit_id":"bc703e9e0add958a58432b32f46b00ae77fe7e3a"},{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"30ac66c5e9b2f38315afc9c1a93f9ddf749b4b07","unresolved":false,"context_lines":[{"line_number":402,"context_line":"        # does some volume attach logic."},{"line_number":403,"context_line":"        # Since right now we really want to just update our status, it"},{"line_number":404,"context_line":"        # doesnt make sense to try and attach the volume if not present"},{"line_number":405,"context_line":"        # right?"},{"line_number":406,"context_line":"        server \u003d self.nova().servers.get(self.resource_id)"},{"line_number":407,"context_line":"        cookie \u003d (server, scheduler.TaskRunner(lambda: None))"},{"line_number":408,"context_line":"        if not self._check_active(cookie):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F9lco%3D","line":405,"updated":"2013-12-09 23:08:16.000000000","message":"You may have to refactor _check_active in that case.","commit_id":"34f76bc7b8972150f761860594416754b402333a"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"bc0ee71f8511aa169a985b8e54d97a22187d3817","unresolved":false,"context_lines":[{"line_number":394,"context_line":"        return ((vol[\u0027VolumeId\u0027], vol[\u0027Device\u0027]) for vol in volumes)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def handle_check(self):"},{"line_number":397,"context_line":"        logger.error(\u0027handle_check instance\u0027)"},{"line_number":398,"context_line":"        server \u003d self.nova().servers.get(self.resource_id)"},{"line_number":399,"context_line":"        if not self._check_active(server):"},{"line_number":400,"context_line":"            raise exception.Error(_(\"Instance is not ACTIVE (was: %s)\") %"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9AMc%3D","line":397,"updated":"2013-12-17 20:12:53.000000000","message":"Thanks, done!","commit_id":"ceaa97590d2d15ef3035ea6fd02e5218f835ee48"},{"author":{"_account_id":7225,"name":"Serg Melikyan","email":"smelikyan@mirantis.com","username":"smelikyan"},"change_message_id":"f788f34dfd6da47acbfa9cf3b9bd68406d2fd6c2","unresolved":false,"context_lines":[{"line_number":394,"context_line":"        return ((vol[\u0027VolumeId\u0027], vol[\u0027Device\u0027]) for vol in volumes)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def handle_check(self):"},{"line_number":397,"context_line":"        logger.error(\u0027handle_check instance\u0027)"},{"line_number":398,"context_line":"        server \u003d self.nova().servers.get(self.resource_id)"},{"line_number":399,"context_line":"        if not self._check_active(server):"},{"line_number":400,"context_line":"            raise exception.Error(_(\"Instance is not ACTIVE (was: %s)\") %"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9DHs%3D","line":397,"updated":"2013-12-17 10:02:45.000000000","message":"This logging message seems like left-over after debugging session, and should not be here.","commit_id":"ceaa97590d2d15ef3035ea6fd02e5218f835ee48"}],"heat/engine/service.py":[{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"3d84cfdcc0a440c6e713479f3ea09243ae583682","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                # This would allow for resources to degrade gracefully"},{"line_number":216,"context_line":"                # during implementation"},{"line_number":217,"context_line":"                logger.warning(\"Check not implemented for %s\" % res.type())"},{"line_number":218,"context_line":"                real_status \u003d \u0027NotImplemented\u0027"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"            # Check the stored state against the ideal state"},{"line_number":221,"context_line":"            # Check the actual state against the ideal state"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BU1g%3D","line":218,"updated":"2013-11-27 11:47:12.000000000","message":"The way to degrade gracefully is to put a common default implementation into the resource.Resource base-class, which would be cleaner than this.","commit_id":"bc703e9e0add958a58432b32f46b00ae77fe7e3a"},{"author":{"_account_id":4715,"name":"Angus Salkeld","email":"asalkeld@redhat.com","username":"asalkeld"},"change_message_id":"88fc8d6a6fed0fdcb50769dc87fbdb35b7a15db5","unresolved":false,"context_lines":[{"line_number":220,"context_line":"            # Check the stored state against the ideal state"},{"line_number":221,"context_line":"            # Check the actual state against the ideal state"},{"line_number":222,"context_line":"            # If either are not in ideal state, then there\u0027s a problem"},{"line_number":223,"context_line":"            if not res.status \u003d\u003d \u0027COMPLETE\u0027 or real_status !\u003d \u0027COMPLETE\u0027:"},{"line_number":224,"context_line":"                diff[name] \u003d {\u0027expected\u0027: \u0027UP/COMPLETE (?)\u0027,"},{"line_number":225,"context_line":"                              \u0027stored\u0027: real_status,"},{"line_number":226,"context_line":"                              \u0027resource\u0027: real_status}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BU3M%3D","line":223,"updated":"2013-11-27 11:19:32.000000000","message":"the nova status will be ACTIVE and you are comparing to COMPLETE \n we will need to return a generic status\n even better:\n the resource returns:\n expected: ACTIVE \n actual: something_else\n that way the resource can not worry about converting","commit_id":"bc703e9e0add958a58432b32f46b00ae77fe7e3a"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"3d84cfdcc0a440c6e713479f3ea09243ae583682","unresolved":false,"context_lines":[{"line_number":220,"context_line":"            # Check the stored state against the ideal state"},{"line_number":221,"context_line":"            # Check the actual state against the ideal state"},{"line_number":222,"context_line":"            # If either are not in ideal state, then there\u0027s a problem"},{"line_number":223,"context_line":"            if not res.status \u003d\u003d \u0027COMPLETE\u0027 or real_status !\u003d \u0027COMPLETE\u0027:"},{"line_number":224,"context_line":"                diff[name] \u003d {\u0027expected\u0027: \u0027UP/COMPLETE (?)\u0027,"},{"line_number":225,"context_line":"                              \u0027stored\u0027: real_status,"},{"line_number":226,"context_line":"                              \u0027resource\u0027: real_status}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2BU08%3D","line":223,"in_reply_to":"AAAATn%2F%2BU3M%3D","updated":"2013-11-27 11:47:12.000000000","message":"Do we want to expose the resource status from the underlying service, or just show that the resource is not in the expected state?  \n\nIf the nova status !\u003d ACTIVE, we could just convert that to FAILED (inside the Instance/Server resource), when we expect COMPLETE, then the users get a uniform view of resource status over the whole stack?","commit_id":"bc703e9e0add958a58432b32f46b00ae77fe7e3a"},{"author":{"_account_id":4328,"name":"Steven Hardy","email":"steven.hardy@suse.com","username":"shardy"},"change_message_id":"1fa8038a1147df37ca021fc80b7461c20bba063e","unresolved":false,"context_lines":[{"line_number":558,"context_line":""},{"line_number":559,"context_line":"        common_params \u003d api.extract_args(args)"},{"line_number":560,"context_line":"        update_type \u003d args.get(\u0027update_type\u0027)"},{"line_number":561,"context_line":"        if update_type:"},{"line_number":562,"context_line":"            # when checking, default to current template"},{"line_number":563,"context_line":"            template \u003d current_stack.t.t"},{"line_number":564,"context_line":"            common_params[\u0027disable_rollback\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAW3%2F%2FzTo%3D","line":561,"updated":"2014-04-10 10:39:06.000000000","message":"Here, and elsewhere, you\u0027re lacking an explicit test for update_type \u003d\u003d \u0027check\u0027 - I know that will work now, but it will break as soon as we add some other update_type, so I\u0027d rather we had an explicit test of the value, and a check that it\u0027s in a list of allowed values.\n\nProbably we want a tuple of allowed update modes in parser.Stack and check it here, or have it in rpc.api and check it in engine.api.\n\n  if update_type not in in parser.Stack.UPDATE_MODES:\n      raise...\n\n  if update_type \u003d\u003d parser.Stack.UPDATE_CHECK:\n      ...\n\nThis will then make it easier to select the right template when we want to do one of the following:\n- converge the current stack\n- converge and update (force update) to a new stack template definition in one operation\netc","commit_id":"1852e9653b082e2c91f9318b44e7ecc8f75990fc"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"71ae43fd8327f40f3594dae9d8d3c4e6baa24d69","unresolved":false,"context_lines":[{"line_number":558,"context_line":""},{"line_number":559,"context_line":"        common_params \u003d api.extract_args(args)"},{"line_number":560,"context_line":"        update_type \u003d args.get(\u0027update_type\u0027)"},{"line_number":561,"context_line":"        if update_type:"},{"line_number":562,"context_line":"            # when checking, default to current template"},{"line_number":563,"context_line":"            template \u003d current_stack.t.t"},{"line_number":564,"context_line":"            common_params[\u0027disable_rollback\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAW3%2F%2FZCg%3D","line":561,"in_reply_to":"AAAAW3%2F%2FzTo%3D","updated":"2014-04-14 22:36:19.000000000","message":"Done","commit_id":"1852e9653b082e2c91f9318b44e7ecc8f75990fc"}],"heat/engine/update.py":[{"author":{"_account_id":4715,"name":"Angus Salkeld","email":"asalkeld@redhat.com","username":"asalkeld"},"change_message_id":"2e0f7c513a5c80cb4379a2156e84988f6730c4ba","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    \"\"\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def __init__(self, existing_stack, new_stack, previous_stack,"},{"line_number":35,"context_line":"                 rollback\u003dFalse, update_type\u003dNone):"},{"line_number":36,"context_line":"        \"\"\"Initialise with the existing stack and the new stack.\"\"\""},{"line_number":37,"context_line":"        self.existing_stack \u003d existing_stack"},{"line_number":38,"context_line":"        self.new_stack \u003d new_stack"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUH%2F%2BGg4%3D","line":35,"updated":"2014-01-30 04:36:16.000000000","message":"is this the right name \"update_type\"? you use it as if it is called \"update_is_a_check_only\". if it was populated with either \u0027check\u0027 or \u0027modify\u0027 then type would make sense.","commit_id":"0e8a64edc1b8a154bf8845d76d8e95189027c1e2"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"d7f26f2b90a9fa6d7cc445b5454aab881fe6fa11","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    \"\"\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def __init__(self, existing_stack, new_stack, previous_stack,"},{"line_number":35,"context_line":"                 rollback\u003dFalse, update_type\u003dNone):"},{"line_number":36,"context_line":"        \"\"\"Initialise with the existing stack and the new stack.\"\"\""},{"line_number":37,"context_line":"        self.existing_stack \u003d existing_stack"},{"line_number":38,"context_line":"        self.new_stack \u003d new_stack"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUH%2F%2BGas%3D","line":35,"in_reply_to":"AAAAUH%2F%2BGg4%3D","updated":"2014-01-30 05:35:16.000000000","message":"The idea is to use the same param as a next step to implement the \"converge\" part of this blueprint, which would make the real resources match the expected status if the template was successful. \n\nSo update_type will become either \u0027check\u0027 or \u0027converge\u0027.","commit_id":"0e8a64edc1b8a154bf8845d76d8e95189027c1e2"},{"author":{"_account_id":4715,"name":"Angus Salkeld","email":"asalkeld@redhat.com","username":"asalkeld"},"change_message_id":"2e0f7c513a5c80cb4379a2156e84988f6730c4ba","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                              \"%(stack_name)s checked successfully\") % {"},{"line_number":147,"context_line":"                            \u0027resource_name\u0027: resource_name,"},{"line_number":148,"context_line":"                            \u0027stack_name\u0027: self.existing_stack.name})"},{"line_number":149,"context_line":"            except:"},{"line_number":150,"context_line":"                logger.warning(_(\"Resource %(resource_name)s for stack \""},{"line_number":151,"context_line":"                                 \"%(stack_name)s had a problem\") % {"},{"line_number":152,"context_line":"                               \u0027resource_name\u0027: resource_name,"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUH%2F%2BGhw%3D","line":149,"updated":"2014-01-30 04:36:16.000000000","message":"is it worth differentiating between  software error and the resource is not in the right state? Like UpdateReplace exception have a UpdateWrongState and then we can\nat least know the difference.","commit_id":"0e8a64edc1b8a154bf8845d76d8e95189027c1e2"},{"author":{"_account_id":9189,"name":"Anderson Mesquita","email":"andersonvom@gmail.com","username":"andersonvom"},"change_message_id":"d7f26f2b90a9fa6d7cc445b5454aab881fe6fa11","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                              \"%(stack_name)s checked successfully\") % {"},{"line_number":147,"context_line":"                            \u0027resource_name\u0027: resource_name,"},{"line_number":148,"context_line":"                            \u0027stack_name\u0027: self.existing_stack.name})"},{"line_number":149,"context_line":"            except:"},{"line_number":150,"context_line":"                logger.warning(_(\"Resource %(resource_name)s for stack \""},{"line_number":151,"context_line":"                                 \"%(stack_name)s had a problem\") % {"},{"line_number":152,"context_line":"                               \u0027resource_name\u0027: resource_name,"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAUH%2F%2BGYI%3D","line":149,"in_reply_to":"AAAAUH%2F%2BGhw%3D","updated":"2014-01-30 05:35:16.000000000","message":"Not sure if this is what you meant, but that difference is already captured in the resource itself: if there\u0027s an exception (either because the resource was in an unexpected state or because there was a software error, the reason will be logged in it.","commit_id":"0e8a64edc1b8a154bf8845d76d8e95189027c1e2"},{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"1269516fd37887af5808a79a5943d28eacfcedf8","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                              \"%(stack_name)s checked successfully\") % {"},{"line_number":147,"context_line":"                            \u0027resource_name\u0027: resource_name,"},{"line_number":148,"context_line":"                            \u0027stack_name\u0027: self.existing_stack.name})"},{"line_number":149,"context_line":"            except:"},{"line_number":150,"context_line":"                logger.warning(_(\"Resource %(resource_name)s for stack \""},{"line_number":151,"context_line":"                                 \"%(stack_name)s had a problem\") % {"},{"line_number":152,"context_line":"                               \u0027resource_name\u0027: resource_name,"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAAUH%2F9dnc%3D","line":149,"updated":"2014-02-06 21:37:20.000000000","message":"Catch *something* here. res.check() raises NotSupported and ResourceFailure. Not fussed on weather or not you differentiate, but the expectation should be explicit.","commit_id":"8a77d767a6346cf94e9e5d4323db8833087a4d57"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"df02f11bfe5385fd0f2deac1b01f687e7c5972ed","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            self.previous_stack.reset_dependencies()"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _resource_update(self, res):"},{"line_number":82,"context_line":"        if self.update_type:"},{"line_number":83,"context_line":"            return self._check_resource(res)"},{"line_number":84,"context_line":"        elif res.name in self.new_stack and self.new_stack[res.name] is res:"},{"line_number":85,"context_line":"            return self._process_new_resource_update(res)"}],"source_content_type":"text/x-python","patch_set":32,"id":"AAAAW3%2F%2FUYk%3D","line":82,"updated":"2014-04-15 11:59:53.000000000","message":"you should explicitly check for update_type \u003d\u003d \u0027CHECK\u0027 here too.","commit_id":"31a7467676ee6aacba3a321f92bb849f8727a487"}],"heat/tests/test_api_openstack_v1.py":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"fab8a7d05dc9c019ac57f9519ab4ec3200249b2e","unresolved":false,"context_lines":[{"line_number":226,"context_line":"    def test_update_type_returns_none_if_not_present(self):"},{"line_number":227,"context_line":"        body \u003d {}"},{"line_number":228,"context_line":"        data \u003d stacks.InstantiationData(body)"},{"line_number":229,"context_line":"        self.assertEqual(None, data.update_type())"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def test_update_type_returns_none_if_anything_else_is_passed(self):"},{"line_number":232,"context_line":"        body \u003d {\u0027update_type\u0027: \u0027foo\u0027}"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F82fk%3D","line":229,"updated":"2013-12-19 15:40:59.000000000","message":"please use assertIsNone here","commit_id":"321eb138f74bf042d4a1a86294be9af3402d67b4"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"fab8a7d05dc9c019ac57f9519ab4ec3200249b2e","unresolved":false,"context_lines":[{"line_number":231,"context_line":"    def test_update_type_returns_none_if_anything_else_is_passed(self):"},{"line_number":232,"context_line":"        body \u003d {\u0027update_type\u0027: \u0027foo\u0027}"},{"line_number":233,"context_line":"        data \u003d stacks.InstantiationData(body)"},{"line_number":234,"context_line":"        self.assertEqual(None, data.update_type())"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def test_presence_of_update_type_makes_template_optional(self):"},{"line_number":237,"context_line":"        body \u003d {\u0027update_type\u0027: \u0027check\u0027}"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F82fc%3D","line":234,"updated":"2013-12-19 15:40:59.000000000","message":"same as above","commit_id":"321eb138f74bf042d4a1a86294be9af3402d67b4"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"fab8a7d05dc9c019ac57f9519ab4ec3200249b2e","unresolved":false,"context_lines":[{"line_number":236,"context_line":"    def test_presence_of_update_type_makes_template_optional(self):"},{"line_number":237,"context_line":"        body \u003d {\u0027update_type\u0027: \u0027check\u0027}"},{"line_number":238,"context_line":"        data \u003d stacks.InstantiationData(body)"},{"line_number":239,"context_line":"        self.assertEqual(True, data.template_optional)"},{"line_number":240,"context_line":"        self.assertEqual({}, data.template())"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F82fM%3D","line":239,"updated":"2013-12-19 15:40:59.000000000","message":"please use assertIs(True, ..) here if you really want the True value, otherwise use assertTrue(..)","commit_id":"321eb138f74bf042d4a1a86294be9af3402d67b4"}],"heat/tests/test_engine_service.py":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"fab8a7d05dc9c019ac57f9519ab4ec3200249b2e","unresolved":false,"context_lines":[{"line_number":611,"context_line":"        self.man.update_stack(self.ctx, stack_id, tmpl, params, files, args)"},{"line_number":612,"context_line":""},{"line_number":613,"context_line":"        _, kwargs \u003d mock_stack.call_args"},{"line_number":614,"context_line":"        self.assertEqual(True, kwargs[\u0027disable_rollback\u0027])"},{"line_number":615,"context_line":""},{"line_number":616,"context_line":"    @mock.patch.object(parser, \u0027Template\u0027)"},{"line_number":617,"context_line":"    @mock.patch.object(parser, \u0027Stack\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F82eI%3D","line":614,"updated":"2013-12-19 15:40:59.000000000","message":"either use assertTrue() or assertIs(True, ..) depending on what is your target","commit_id":"321eb138f74bf042d4a1a86294be9af3402d67b4"},{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"4d933f422ba87a687ac982fb26479e5e90cecb8c","unresolved":false,"context_lines":[{"line_number":858,"context_line":"        self.man.thread_group_mgr.start_with_lock \u003d mock.Mock()"},{"line_number":859,"context_line":"        self.man.update_stack(self.ctx, stack_id, tmpl, params, files, args)"},{"line_number":860,"context_line":""},{"line_number":861,"context_line":"        _, kwargs \u003d mock_stack.call_args"},{"line_number":862,"context_line":"        self.assertTrue(kwargs[\u0027disable_rollback\u0027])"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"    @mock.patch.object(parser, \u0027Template\u0027)"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAVn%2F%2FqPA%3D","line":861,"updated":"2014-03-04 20:12:58.000000000","message":"Has this been discussed to death in that _ potentially clashes with gettext? Can you just use:\n\n  kwargs \u003d mock_stack.call_args[1]\n\nI only bring it up because I\u0027ve been dinged so many times for the same thing ;)","commit_id":"ca7eef4c8c8ed70d9a74559e49ab7946553f4d1d"},{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"4d933f422ba87a687ac982fb26479e5e90cecb8c","unresolved":false,"context_lines":[{"line_number":889,"context_line":"        self.man.thread_group_mgr.start_with_lock \u003d mock.Mock()"},{"line_number":890,"context_line":"        self.man.update_stack(self.ctx, stack_id, tmpl, params, files, args)"},{"line_number":891,"context_line":""},{"line_number":892,"context_line":"        _, kwargs \u003d self.man.thread_group_mgr.start_with_lock.call_args"},{"line_number":893,"context_line":"        self.assertEqual(\u0027check\u0027, kwargs[\u0027update_type\u0027])"},{"line_number":894,"context_line":""},{"line_number":895,"context_line":"    def test_stack_update_equals(self):"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAAVn%2F%2FqNo%3D","line":892,"updated":"2014-03-04 20:12:58.000000000","message":"same.","commit_id":"ca7eef4c8c8ed70d9a74559e49ab7946553f4d1d"}],"heat/tests/test_engine_update.py":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"fab8a7d05dc9c019ac57f9519ab4ec3200249b2e","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        scheduler.TaskRunner(self.stack_update)()"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        _, kwargs \u003d mock_dependency.call_args"},{"line_number":61,"context_line":"        self.assertEqual(True, kwargs[\u0027aggregate_exceptions\u0027])"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def test_check_resource_doesnt_check_if_not_same_resource(self):"},{"line_number":64,"context_line":"        self.r1.handle_check \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F82d4%3D","line":61,"updated":"2013-12-19 15:40:59.000000000","message":"change to assertIs(True, ..) or assertTrue","commit_id":"321eb138f74bf042d4a1a86294be9af3402d67b4"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"fab8a7d05dc9c019ac57f9519ab4ec3200249b2e","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self.r1.handle_check \u003d mock.Mock()"},{"line_number":65,"context_line":"        self.existing_stack._resources \u003d {\u0027r1\u0027: \u0027some\u0027}"},{"line_number":66,"context_line":"        scheduler.TaskRunner(self.stack_update._check_resource, self.r1)()"},{"line_number":67,"context_line":"        assert not self.r1.handle_check.called"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def test_check_resource_only_checks_if_same_resource(self):"},{"line_number":70,"context_line":"        def generator():"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F82dc%3D","line":67,"updated":"2013-12-19 15:40:59.000000000","message":"I think test-specific self.assertFalse() would be better than general assert here","commit_id":"321eb138f74bf042d4a1a86294be9af3402d67b4"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"fab8a7d05dc9c019ac57f9519ab4ec3200249b2e","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        self.r1.check \u003d mock.Mock(return_value\u003dgenerator())"},{"line_number":73,"context_line":"        self.existing_stack._resources \u003d {\u0027r1\u0027: self.r1}"},{"line_number":74,"context_line":"        scheduler.TaskRunner(self.stack_update._check_resource, self.r1)()"},{"line_number":75,"context_line":"        assert self.r1.check.called"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F82dY%3D","line":75,"updated":"2013-12-19 15:40:59.000000000","message":"better to use self.assertTrue()","commit_id":"321eb138f74bf042d4a1a86294be9af3402d67b4"}],"heat/tests/test_parser.py":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"f6105f41c40af76f7c6c8de5de6f37e88a6e18ab","unresolved":false,"context_lines":[{"line_number":2455,"context_line":"        updated_stack \u003d parser.Stack(self.ctx, \u0027updated_stack\u0027, tmpl, env)"},{"line_number":2456,"context_line":""},{"line_number":2457,"context_line":"        self.stack.update(updated_stack, update_type\u003d\u0027check\u0027)"},{"line_number":2458,"context_line":"        _, kwargs \u003d mock_StackUpdate.call_args"},{"line_number":2459,"context_line":"        self.assertEqual(\u0027check\u0027, kwargs[\u0027update_type\u0027])"},{"line_number":2460,"context_line":""},{"line_number":2461,"context_line":"    def test_stack_create_timeout(self):"}],"source_content_type":"text/x-python","patch_set":34,"id":"9ad9bd40_fa42d70e","line":2458,"updated":"2014-05-05 09:47:33.000000000","message":"please do not use _ here not to possibly shadow the gettext translation function? just use kwargs \u003d call_args[1]","commit_id":"6d716aab0a80905c04aa4d756a91376f08ee4a89"}],"heat/tests/test_resource.py":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"fab8a7d05dc9c019ac57f9519ab4ec3200249b2e","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        res.handle_check \u003d mock.Mock(return_value\u003dTrue)"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        scheduler.TaskRunner(res.check)()"},{"line_number":621,"context_line":"        self.assertEqual((\u0027UPDATE\u0027, \u0027COMPLETE\u0027), res.state)"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    def test_check_reverts_to_original_state_if_not_supported(self):"},{"line_number":624,"context_line":"        tmpl \u003d {\u0027Type\u0027: \u0027foo\u0027}"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAATn%2F82cI%3D","line":621,"updated":"2013-12-19 15:40:59.000000000","message":"I think it is better to use less literal res.UPDATE, res.COMPLETE etc here and in following lines","commit_id":"321eb138f74bf042d4a1a86294be9af3402d67b4"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"7a408d8abb5f9b62dd0dbd291d6565a08329b2a4","unresolved":false,"context_lines":[{"line_number":623,"context_line":"    def test_check_reverts_to_original_state_if_not_supported(self):"},{"line_number":624,"context_line":"        tmpl \u003d {\u0027Type\u0027: \u0027foo\u0027}"},{"line_number":625,"context_line":"        res \u003d generic_rsrc.ResourceWithProps(\u0027test_resource\u0027, tmpl, self.stack)"},{"line_number":626,"context_line":"        self.assertEqual((\u0027INIT\u0027, \u0027COMPLETE\u0027), res.state)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        not_supported \u003d exception.NotSupported(feature\u003d\"foo\")"},{"line_number":629,"context_line":"        res.handle_check \u003d mock.Mock(side_effect\u003dnot_supported)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATn%2F81NU%3D","line":626,"updated":"2013-12-19 20:00:49.000000000","message":"change to res.INIT, res.COMPLETE","commit_id":"3b0a7f93ecbaa92cd594eb2c7b79ec16acfd9b34"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"7a408d8abb5f9b62dd0dbd291d6565a08329b2a4","unresolved":false,"context_lines":[{"line_number":630,"context_line":""},{"line_number":631,"context_line":"        self.assertRaises(exception.NotSupported,"},{"line_number":632,"context_line":"                          scheduler.TaskRunner(res.check))"},{"line_number":633,"context_line":"        self.assertEqual((\u0027INIT\u0027, \u0027COMPLETE\u0027), res.state)"},{"line_number":634,"context_line":""},{"line_number":635,"context_line":"    def test_check_marks_the_resource_as_failed_when_exception_is_raised(self):"},{"line_number":636,"context_line":"        tmpl \u003d {\u0027Type\u0027: \u0027foo\u0027}"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATn%2F81NQ%3D","line":633,"updated":"2013-12-19 20:00:49.000000000","message":"change to res.INIT, res.COMPLETE","commit_id":"3b0a7f93ecbaa92cd594eb2c7b79ec16acfd9b34"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"7a408d8abb5f9b62dd0dbd291d6565a08329b2a4","unresolved":false,"context_lines":[{"line_number":641,"context_line":""},{"line_number":642,"context_line":"        self.assertRaises(exception.ResourceFailure,"},{"line_number":643,"context_line":"                          scheduler.TaskRunner(res.check))"},{"line_number":644,"context_line":"        self.assertEqual((\u0027UPDATE\u0027, \u0027FAILED\u0027), res.state)"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"    def test_marks_the_resource_as_in_progress_while_updating(self):"},{"line_number":647,"context_line":"        tmpl \u003d {\u0027Type\u0027: \u0027foo\u0027}"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATn%2F81NI%3D","line":644,"updated":"2013-12-19 20:00:49.000000000","message":"change to res.UPDATE, res.FAILED","commit_id":"3b0a7f93ecbaa92cd594eb2c7b79ec16acfd9b34"}]}
