)]}'
{"zun/compute/manager.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"f6cf0fb5a3123a9006324de4e5404fe32210a818","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        try:"},{"line_number":147,"context_line":"            limits \u003d limits"},{"line_number":148,"context_line":"            rt \u003d self._get_resource_tracker()"},{"line_number":149,"context_line":"            if (image[\u0027driver\u0027] \u003d\u003d \u0027glance\u0027):"},{"line_number":150,"context_line":"                (image[\u0027repo\u0027], image[\u0027tag\u0027]) \u003d self.driver.read_tar_image("},{"line_number":151,"context_line":"                    image)"},{"line_number":152,"context_line":"            with rt.container_claim(context, container, container.host,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf3e73b7_46a8521e","line":149,"range":{"start_line":149,"start_character":15,"end_line":149,"end_character":16},"updated":"2017-08-07 16:08:55.000000000","message":"nit: the pair of bracket looks unnecessary.","commit_id":"295841c0c2aab7a81a94303c2ccb57f40283f961"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"f6cf0fb5a3123a9006324de4e5404fe32210a818","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            limits \u003d limits"},{"line_number":148,"context_line":"            rt \u003d self._get_resource_tracker()"},{"line_number":149,"context_line":"            if (image[\u0027driver\u0027] \u003d\u003d \u0027glance\u0027):"},{"line_number":150,"context_line":"                (image[\u0027repo\u0027], image[\u0027tag\u0027]) \u003d self.driver.read_tar_image("},{"line_number":151,"context_line":"                    image)"},{"line_number":152,"context_line":"            with rt.container_claim(context, container, container.host,"},{"line_number":153,"context_line":"                                    limits):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf3e73b7_26630e1d","line":150,"range":{"start_line":150,"start_character":16,"end_line":150,"end_character":17},"updated":"2017-08-07 16:08:55.000000000","message":"nit: the pair of bracket looks unnecessary.","commit_id":"295841c0c2aab7a81a94303c2ccb57f40283f961"}],"zun/container/docker/driver.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"f6cf0fb5a3123a9006324de4e5404fe32210a818","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                host_config[\u0027restart_policy\u0027] \u003d {\u0027Name\u0027: name,"},{"line_number":162,"context_line":"                                                 \u0027MaximumRetryCount\u0027: count}"},{"line_number":163,"context_line":"            kwargs[\u0027host_config\u0027] \u003d docker.create_host_config(**host_config)"},{"line_number":164,"context_line":"            image_repo \u003d image[\u0027repo\u0027]+\":\"+image[\u0027tag\u0027]"},{"line_number":165,"context_line":"            response \u003d docker.create_container(image_repo, **kwargs)"},{"line_number":166,"context_line":"            container.container_id \u003d response[\u0027Id\u0027]"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"bf3e73b7_264c2e9d","line":164,"range":{"start_line":164,"start_character":38,"end_line":164,"end_character":44},"updated":"2017-08-07 16:08:55.000000000","message":"nit: space before and after \u0027+\u0027","commit_id":"295841c0c2aab7a81a94303c2ccb57f40283f961"},{"author":{"_account_id":22406,"name":"Kien Nguyen","email":"kiennt2609@gmail.com","username":"kiennt"},"change_message_id":"90436bf2d28fde2c4445feb1b6115c64d422ec47","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        with docker_utils.docker_client() as docker:"},{"line_number":107,"context_line":"            return docker.images(repo, quiet)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def read_tar_image(self, image\u003dNone):"},{"line_number":110,"context_line":"        with docker_utils.docker_client() as docker:"},{"line_number":111,"context_line":"            if image:"},{"line_number":112,"context_line":"                LOG.debug(\u0027Reading local tar image %s \u0027, image[\u0027path\u0027])"},{"line_number":113,"context_line":"                (tar_repo, tar_tag) \u003d docker.read_tar_image(image)"},{"line_number":114,"context_line":"                return (tar_repo, tar_tag)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f436f4f_2e130210","line":111,"range":{"start_line":109,"start_character":4,"end_line":111,"end_character":21},"updated":"2017-08-08 09:37:04.000000000","message":"I think we don\u0027t need the default value and the check here:\n\ndef read_tar_image(self, image):\n    with docker_utils.docker_client() as docker:\n        return...","commit_id":"7cd93d78bcb260b5003304edfda11c9607e8c626"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"4ef585ab189a4df32a67689514058a40c0f93ad2","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        with docker_utils.docker_client() as docker:"},{"line_number":107,"context_line":"            return docker.images(repo, quiet)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def read_tar_image(self, image\u003dNone):"},{"line_number":110,"context_line":"        with docker_utils.docker_client() as docker:"},{"line_number":111,"context_line":"            if image:"},{"line_number":112,"context_line":"                LOG.debug(\u0027Reading local tar image %s \u0027, image[\u0027path\u0027])"},{"line_number":113,"context_line":"                (tar_repo, tar_tag) \u003d docker.read_tar_image(image)"},{"line_number":114,"context_line":"                return (tar_repo, tar_tag)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f436f4f_64392640","line":111,"range":{"start_line":109,"start_character":4,"end_line":111,"end_character":21},"in_reply_to":"9f436f4f_2e130210","updated":"2017-08-08 13:53:27.000000000","message":"+1","commit_id":"7cd93d78bcb260b5003304edfda11c9607e8c626"}],"zun/container/docker/utils.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"0ebb94a6ad0751b2846db5095253f212445e9383","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _load_image(self, image\u003dNone):"},{"line_number":88,"context_line":"        # Upload image to docker local repo (/opt/stack/data/zun/images)"},{"line_number":89,"context_line":"        # if image driver \u003d\u003d glance;modify image_tar/manifest.json"},{"line_number":90,"context_line":"        # \"Repotags:[glance_image_name:latest] then upload tar file to"},{"line_number":91,"context_line":"        # docker image repository -- docker load \u003c id.tar"},{"line_number":92,"context_line":"        if image[\u0027driver\u0027] \u003d\u003d \u0027glance\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_f55ebee4","line":89,"range":{"start_line":89,"start_character":36,"end_line":89,"end_character":42},"updated":"2017-07-31 19:29:19.000000000","message":"Modifying the image tarball looks unsafe to me. I worry if this will cause some unexpected consequences. For example, if docker decides to hash the content of the tarball in the future, modifying its content might incur failure on image loading.\n\nI wonder if we could read the repo and tag from the tarball instead (without modifying it). The retrieved repo and tag will return to the compute manager, and compute manager will pass them as parameters on creating the container. The container will be created from the retrieved repo and tag from the tarball, instead of the glance image name. Thoughts on this?","commit_id":"d43bafded7ff875b7c9ac00ddfbab152892ac022"},{"author":{"_account_id":22406,"name":"Kien Nguyen","email":"kiennt2609@gmail.com","username":"kiennt"},"change_message_id":"90436bf2d28fde2c4445feb1b6115c64d422ec47","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            find_repotag \u003d re.search(\u0027\\\"RepoTags\\\":\\[\\\"(.+?)\\\"\\]\u0027, data)"},{"line_number":91,"context_line":"            if find_repotag:"},{"line_number":92,"context_line":"                (repo, tag) \u003d (find_repotag.group(1)).split(\":\")"},{"line_number":93,"context_line":"        fil.close()"},{"line_number":94,"context_line":"        return (repo, tag)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f436f4f_2ebae2dd","line":93,"range":{"start_line":93,"start_character":8,"end_line":93,"end_character":19},"updated":"2017-08-08 09:37:04.000000000","message":"This line is unnecessary, use `with` statement, fil already closed [1]\n\nhttps://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files","commit_id":"7cd93d78bcb260b5003304edfda11c9607e8c626"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"4ef585ab189a4df32a67689514058a40c0f93ad2","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            find_repotag \u003d re.search(\u0027\\\"RepoTags\\\":\\[\\\"(.+?)\\\"\\]\u0027, data)"},{"line_number":91,"context_line":"            if find_repotag:"},{"line_number":92,"context_line":"                (repo, tag) \u003d (find_repotag.group(1)).split(\":\")"},{"line_number":93,"context_line":"        fil.close()"},{"line_number":94,"context_line":"        return (repo, tag)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f436f4f_243b1e39","line":93,"range":{"start_line":93,"start_character":8,"end_line":93,"end_character":19},"in_reply_to":"9f436f4f_2ebae2dd","updated":"2017-08-08 13:53:27.000000000","message":"+1","commit_id":"7cd93d78bcb260b5003304edfda11c9607e8c626"},{"author":{"_account_id":22406,"name":"Kien Nguyen","email":"kiennt2609@gmail.com","username":"kiennt"},"change_message_id":"5667cf138d04ef271cf32da83df39dd39d060994","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            fest \u003d fil.extractfile(\u0027manifest.json\u0027)"},{"line_number":89,"context_line":"            data \u003d fest.read()"},{"line_number":90,"context_line":"            find_repotag \u003d re.search(\u0027\\\"RepoTags\\\":\\[\\\"(.+?)\\\"\\]\u0027, data)"},{"line_number":91,"context_line":"            if find_repotag:"},{"line_number":92,"context_line":"                (repo, tag) \u003d (find_repotag.group(1)).split(\":\")"},{"line_number":93,"context_line":"        return (repo, tag)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f436f4f_6a7d561b","line":91,"range":{"start_line":91,"start_character":12,"end_line":91,"end_character":28},"updated":"2017-08-09 07:59:28.000000000","message":"If we can\u0027t get find_repotag, (repo, tag) isn\u0027t defined.Sorry because don\u0027t recognize it in your previous patch.","commit_id":"da0483d808e79a43324221d8fb7899990f091d1b"},{"author":{"_account_id":16190,"name":"dharmalingam","email":"cooldharma06@gmail.com","username":"cooldharma06"},"change_message_id":"ba597373853620eede90c845be5d45a1c1153f4f","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            fest \u003d fil.extractfile(\u0027manifest.json\u0027)"},{"line_number":89,"context_line":"            data \u003d fest.read()"},{"line_number":90,"context_line":"            find_repotag \u003d re.search(\u0027\\\"RepoTags\\\":\\[\\\"(.+?)\\\"\\]\u0027, data)"},{"line_number":91,"context_line":"            if find_repotag:"},{"line_number":92,"context_line":"                (repo, tag) \u003d (find_repotag.group(1)).split(\":\")"},{"line_number":93,"context_line":"        return (repo, tag)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f436f4f_3cfadd74","line":91,"range":{"start_line":91,"start_character":12,"end_line":91,"end_character":28},"in_reply_to":"9f436f4f_6a7d561b","updated":"2017-08-10 04:17:49.000000000","message":"Kien thanks for comments. image[\u0027path\u0027] will have downloaded (image)tar file. manifest.json describes filesystem layers and name of json file that has the Container properties. RepoTags have corresponding image repo-name and tag-name. Without Repotags, if we load the  image docker will load with empty string(\u003cnone\u003e). So i think always docker image have corresponding repo and tags by default.","commit_id":"da0483d808e79a43324221d8fb7899990f091d1b"},{"author":{"_account_id":22406,"name":"Kien Nguyen","email":"kiennt2609@gmail.com","username":"kiennt"},"change_message_id":"5667cf138d04ef271cf32da83df39dd39d060994","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            data \u003d fest.read()"},{"line_number":90,"context_line":"            find_repotag \u003d re.search(\u0027\\\"RepoTags\\\":\\[\\\"(.+?)\\\"\\]\u0027, data)"},{"line_number":91,"context_line":"            if find_repotag:"},{"line_number":92,"context_line":"                (repo, tag) \u003d (find_repotag.group(1)).split(\":\")"},{"line_number":93,"context_line":"        return (repo, tag)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f436f4f_4a9f3250","line":92,"range":{"start_line":92,"start_character":30,"end_line":92,"end_character":31},"updated":"2017-08-09 07:59:28.000000000","message":"This bracket is redundant.","commit_id":"da0483d808e79a43324221d8fb7899990f091d1b"}]}
