)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"ecb4cb545719c1354ed4b150bf6442ed048fc289","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Implement adopt-stack"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Create a stack using already existing resources"},{"line_number":10,"context_line":"(resources that were abandoned with abandon-stack operation)"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Blueprint adopt-stack"},{"line_number":13,"context_line":"Change-Id: I1cb3fd55de378b9d500cc6b690a41369a2fd76ae"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"AAAATn%2F9tqA%3D","line":10,"updated":"2013-12-06 20:35:55.000000000","message":"The term resources is a bit circular in this context and might confuse someone digging for answers who has not read the blueprint (we cannot assume that the blueprint is accessible in git commit messages, we need to give a decent clue as to what this is intended to do to anyone digging through git for answers).\n\nPerhaps \"Create a stack using user-specified, already existing external resources.\"\n\nAlso the parens are unnecessary, and could be a useful paragraph all by itself:\n\n\"The user specifies what resources to adopt using the same serialization format as the one produced by abandon-stack.\"","commit_id":"58e1cef5c3c1a1e6bbb327077c1f3176877d9626"}],"heat/engine/parser.py":[{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"09f65db1eaa116bf2dcc76934e55a9c5c4414646","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            self.outputs \u003d {}"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    @property"},{"line_number":114,"context_line":"    def adopt_stack(self):"},{"line_number":115,"context_line":"        if self.adopt_stack_data:"},{"line_number":116,"context_line":"            return True"},{"line_number":117,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BC5E%3D","line":114,"updated":"2013-12-03 04:40:28.000000000","message":"This seems a bit superfluous both here and its use in resource. Seems we can just check:\n\n  if self.adopt_stack_data:\n    (...)","commit_id":"58e1cef5c3c1a1e6bbb327077c1f3176877d9626"}],"heat/engine/resource.py":[{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"09f65db1eaa116bf2dcc76934e55a9c5c4414646","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            raise ValueError(_(\u0027Resource name may not contain \"/\"\u0027))"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        self.stack \u003d stack"},{"line_number":144,"context_line":"        self.adopt_stack \u003d stack.adopt_stack"},{"line_number":145,"context_line":"        self.context \u003d stack.context"},{"line_number":146,"context_line":"        self.name \u003d name"},{"line_number":147,"context_line":"        self.json_snippet \u003d json_snippet"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BC40%3D","line":144,"updated":"2013-12-03 04:40:28.000000000","message":"Agree with Thomas here in that I think that the resource should be passed its adopt data from parser.py rather than reach back into the stack to get it.","commit_id":"58e1cef5c3c1a1e6bbb327077c1f3176877d9626"},{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"09f65db1eaa116bf2dcc76934e55a9c5c4414646","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        self.metadata \u003d metadata"},{"line_number":443,"context_line":"        self.state_set(action, status)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    def _get_resource_info(self, stack_data):"},{"line_number":446,"context_line":"        if (not stack_data or not stack_data.get(\u0027resources\u0027) or"},{"line_number":447,"context_line":"                not stack_data[\u0027resources\u0027].get(self.name)):"},{"line_number":448,"context_line":"            return None, None, None, None, None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BC4g%3D","line":445,"updated":"2013-12-03 04:40:28.000000000","message":"I think the note back up at 144 would simplify this a bit as well.","commit_id":"58e1cef5c3c1a1e6bbb327077c1f3176877d9626"}],"heat/engine/resources/stack.py":[{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"09f65db1eaa116bf2dcc76934e55a9c5c4414646","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    update_allowed_keys \u003d (\u0027Properties\u0027,)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def handle_adopt(self):"},{"line_number":60,"context_line":"        self.handle_create()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def handle_create(self):"},{"line_number":63,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BC4I%3D","line":60,"updated":"2013-12-03 04:40:28.000000000","message":"Wouldn\u0027t this result in an inconsistent status? These resources would be in CREATE, COMPLETE and not ADOPT, COMPLETE. \n\nAlso, its not clear how this actually works? Shouldn\u0027t this have its own implementation of handle_adopt since the nested stack should be adopted using slightly different logic?","commit_id":"58e1cef5c3c1a1e6bbb327077c1f3176877d9626"}],"heat/engine/stack_resource.py":[{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"09f65db1eaa116bf2dcc76934e55a9c5c4414646","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # Note we disable rollback for nested stacks, since they"},{"line_number":93,"context_line":"        # should be rolled back by the parent stack on failure"},{"line_number":94,"context_line":"        adopt_data \u003d self.stack.adopt_stack_data"},{"line_number":95,"context_line":"        if adopt_data and adopt_data.get(\u0027resources\u0027, None):"},{"line_number":96,"context_line":"            adopt_data \u003d adopt_data[\u0027resources\u0027].get(self.name, None)"},{"line_number":97,"context_line":"        nested \u003d parser.Stack(self.context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BC38%3D","line":94,"updated":"2013-12-03 04:40:28.000000000","message":"Ok, this makes a little more sense; can probably disregard my comment on stack.py; though I think this would also be simpler if resources were passed their own specific adopt data.","commit_id":"58e1cef5c3c1a1e6bbb327077c1f3176877d9626"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"ecb4cb545719c1354ed4b150bf6442ed048fc289","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # Note we disable rollback for nested stacks, since they"},{"line_number":93,"context_line":"        # should be rolled back by the parent stack on failure"},{"line_number":94,"context_line":"        adopt_data \u003d self.stack.adopt_stack_data"},{"line_number":95,"context_line":"        if adopt_data and adopt_data.get(\u0027resources\u0027, None):"},{"line_number":96,"context_line":"            adopt_data \u003d adopt_data[\u0027resources\u0027].get(self.name, None)"},{"line_number":97,"context_line":"        nested \u003d parser.Stack(self.context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9tnw%3D","line":94,"in_reply_to":"AAAATn%2F%2BC38%3D","updated":"2013-12-06 20:35:55.000000000","message":"I had the same reaction and it took flipping back and forth between the code a few times to understand this.\n\nEffectively stack is being used almost like a global variable, which always makes program flow less clear. As we move toward breaking up each action into a distributable task, use of the stack is going to make that more difficult too.\n\nI think that throughout the implementation handle_adopt would be more clear, and more isolated if it was passed in the relevant portion of adopt data, rather than relying on the owning stack. See how handle_update expects a json_snippet for an example of how much more clear this makes things.","commit_id":"58e1cef5c3c1a1e6bbb327077c1f3176877d9626"}],"heat/tests/test_stack_resource.py":[{"author":{"_account_id":7256,"name":"Randall Burt","email":"randall.burt@rackspace.com","username":"randall-burt"},"change_message_id":"09f65db1eaa116bf2dcc76934e55a9c5c4414646","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        self.m.StubOutWithMock(parser, \u0027Stack\u0027)"},{"line_number":301,"context_line":"        parser.Stack(ctx, phy_id, templ, env, timeout_mins\u003dNone,"},{"line_number":302,"context_line":"                     adopt_stack_data\u003dNone, disable_rollback\u003dTrue,"},{"line_number":303,"context_line":"                     parent_resource\u003dself.parent_resource,"},{"line_number":304,"context_line":"                     owner_id\u003dself.parent_stack.id)\\"},{"line_number":305,"context_line":"            .AndReturn(self.stack)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2BC3g%3D","line":302,"updated":"2013-12-03 04:40:28.000000000","message":"Seems we\u0027d want separate adopt tests for resources based on nested stack since the logic should be a bit different.","commit_id":"58e1cef5c3c1a1e6bbb327077c1f3176877d9626"}]}
