)]}'
{"tests/fixtures/config/data-return/git/common-config/playbooks/data-return-inventory.yaml":[{"author":{"_account_id":4162,"name":"Paul Belanger","email":"pabelanger@redhat.com","username":"pabelanger"},"change_message_id":"86a199f79b6b8a32d3500e61a92501d7deebb5a2","unresolved":false,"context_lines":[{"line_number":4,"context_line":"        name: \"pod\""},{"line_number":5,"context_line":"        ansible_connection: kubectl"},{"line_number":6,"context_line":"        ansible_host: project-pod-1"},{"line_number":7,"context_line":"        update_inventory: yes"},{"line_number":8,"context_line":"    - add_host:"},{"line_number":9,"context_line":"        name: \"tmppod\""},{"line_number":10,"context_line":"        ansible_connection: kubectl"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"3f79a3b5_b15380e2","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":29},"updated":"2018-08-21 00:36:51.000000000","message":"I wonder if we should set this to be a fact, to avoid breaking the API on add_host.  If somebody wanted to run this playbook directly in ansible, they\u0027d get a syntax error.","commit_id":"cfebe3c6ce60addc7890b8d1a0e73ea6588cd009"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"231f155eafcaebbf1ea539e9b8668a8ec8458b9c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"        name: \"pod\""},{"line_number":5,"context_line":"        ansible_connection: kubectl"},{"line_number":6,"context_line":"        ansible_host: project-pod-1"},{"line_number":7,"context_line":"        update_inventory: yes"},{"line_number":8,"context_line":"    - add_host:"},{"line_number":9,"context_line":"        name: \"tmppod\""},{"line_number":10,"context_line":"        ansible_connection: kubectl"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"3f79a3b5_e5401209","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":29},"in_reply_to":"3f79a3b5_332f2d40","updated":"2018-09-17 18:04:46.000000000","message":"++ for using zuul_return as this is clearly an api to influence child jobs (and the only api in zuul to influence child jobs is zuul_return)","commit_id":"cfebe3c6ce60addc7890b8d1a0e73ea6588cd009"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"cc87be4a129c73bc2cce238e97023eafb707ad6c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"        name: \"pod\""},{"line_number":5,"context_line":"        ansible_connection: kubectl"},{"line_number":6,"context_line":"        ansible_host: project-pod-1"},{"line_number":7,"context_line":"        update_inventory: yes"},{"line_number":8,"context_line":"    - add_host:"},{"line_number":9,"context_line":"        name: \"tmppod\""},{"line_number":10,"context_line":"        ansible_connection: kubectl"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"3f79a3b5_332f2d40","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":29},"in_reply_to":"3f79a3b5_b15380e2","updated":"2018-08-23 04:42:35.000000000","message":"this is not breaking the API and you won\u0027t get a syntax error. though it\u0027s a behavior change indeed...","commit_id":"cfebe3c6ce60addc7890b8d1a0e73ea6588cd009"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"f6246a10afc2c1accab7b4db1e73e7d995575ec4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"        name: \"pod\""},{"line_number":5,"context_line":"        ansible_connection: kubectl"},{"line_number":6,"context_line":"        ansible_host: project-pod-1"},{"line_number":7,"context_line":"        update_inventory: yes"},{"line_number":8,"context_line":"    - add_host:"},{"line_number":9,"context_line":"        name: \"tmppod\""},{"line_number":10,"context_line":"        ansible_connection: kubectl"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"3f79a3b5_a4bc396c","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":29},"in_reply_to":"3f79a3b5_e5401209","updated":"2018-09-19 05:44:18.000000000","message":"Next PS revert to the initial proposal and only rely on zuul_return to update the inventory.","commit_id":"cfebe3c6ce60addc7890b8d1a0e73ea6588cd009"}],"zuul/ansible/actiongeneral/add_host.py":[{"author":{"_account_id":4162,"name":"Paul Belanger","email":"pabelanger@redhat.com","username":"pabelanger"},"change_message_id":"cc145570ebf250369cdeb99e8975dea00d1fa0d8","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        result[\u0027add_host\u0027] \u003d dict("},{"line_number":114,"context_line":"            host_name\u003dname, groups\u003dnew_groups, host_vars\u003dhost_vars)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        # Begin zuul changes"},{"line_number":117,"context_line":"        inventory \u003d yaml.safe_load(open(inventory_path))"},{"line_number":118,"context_line":"        # Convert values to string"},{"line_number":119,"context_line":"        inventory[\u0027all\u0027][\u0027hosts\u0027][str(new_name)] \u003d dict(map("},{"line_number":120,"context_line":"            lambda x: (str(x[0]), str(x[1])), host_vars.items()))"},{"line_number":121,"context_line":"        with open(inventory_path, \u0027w\u0027) as inventory_yaml:"},{"line_number":122,"context_line":"            inventory_yaml.write(yaml.safe_dump("},{"line_number":123,"context_line":"                inventory, default_flow_style\u003dFalse))"},{"line_number":124,"context_line":"        # End zuul changes"},{"line_number":125,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_e366aec1","line":124,"range":{"start_line":116,"start_character":0,"end_line":124,"end_character":26},"updated":"2018-08-13 15:12:42.000000000","message":"I am not sure how, but I think we want this change to be optional (false by default). Because as it stands now, any time we use add_host, we\u0027ll add the host into the inventory file.  I can see times, between run phases where we don\u0027t actually want to do that.\n\nMaybe we need to toggle a specific zuul fact to enable updating of inventory, as not to break user facing API for add_host.","commit_id":"43aedca2074366b07b24d2acb4a36153eca8aeb4"},{"author":{"_account_id":4162,"name":"Paul Belanger","email":"pabelanger@redhat.com","username":"pabelanger"},"change_message_id":"86a199f79b6b8a32d3500e61a92501d7deebb5a2","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        result[\u0027add_host\u0027] \u003d dict("},{"line_number":116,"context_line":"            host_name\u003dname, groups\u003dnew_groups, host_vars\u003dhost_vars)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # Begin zuul changes"},{"line_number":119,"context_line":"        if update_inventory:"},{"line_number":120,"context_line":"            path \u003d os.path.join("},{"line_number":121,"context_line":"                os.environ[\u0027ZUUL_JOBDIR\u0027], \u0027work\u0027, \u0027results.json\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_715f28e5","line":118,"updated":"2018-08-21 00:36:51.000000000","message":"do we need to vendor the entry add_host logic here? Is it would be possible to use super() then add out zuul specific bits?","commit_id":"cfebe3c6ce60addc7890b8d1a0e73ea6588cd009"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"cc87be4a129c73bc2cce238e97023eafb707ad6c","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        result[\u0027add_host\u0027] \u003d dict("},{"line_number":116,"context_line":"            host_name\u003dname, groups\u003dnew_groups, host_vars\u003dhost_vars)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # Begin zuul changes"},{"line_number":119,"context_line":"        if update_inventory:"},{"line_number":120,"context_line":"            path \u003d os.path.join("},{"line_number":121,"context_line":"                os.environ[\u0027ZUUL_JOBDIR\u0027], \u0027work\u0027, \u0027results.json\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_f3245562","line":118,"in_reply_to":"3f79a3b5_715f28e5","updated":"2018-08-23 04:42:35.000000000","message":"that can be done, not sure if it will cause side effect though.","commit_id":"cfebe3c6ce60addc7890b8d1a0e73ea6588cd009"}],"zuul/executor/server.py":[{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"0d43406a5c312d4ca1ede766480f47fd25da9dca","unresolved":false,"context_lines":[{"line_number":972,"context_line":"                    inventory_update \u003d True"},{"line_number":973,"context_line":"                if inventory_update:"},{"line_number":974,"context_line":"                    with open(self.jobdir.inventory, \u0027w\u0027) as inventory_yaml:"},{"line_number":975,"context_line":"                       inventory_yaml.write(yaml.safe_dump("},{"line_number":976,"context_line":"                            inventory, default_flow_style\u003dFalse))"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":"        self.log.debug("}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_4061eaa8","line":975,"updated":"2018-08-09 04:49:28.000000000","message":"correct the indentation for this line as pep8 failing","commit_id":"5e7931434826cd1290f7553e7883cad3bf893aaa"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"8429471388a1d83a3b57725bf95999bfdc915c39","unresolved":false,"context_lines":[{"line_number":972,"context_line":"                    inventory_update \u003d True"},{"line_number":973,"context_line":"                if inventory_update:"},{"line_number":974,"context_line":"                    with open(self.jobdir.inventory, \u0027w\u0027) as inventory_yaml:"},{"line_number":975,"context_line":"                       inventory_yaml.write(yaml.safe_dump("},{"line_number":976,"context_line":"                            inventory, default_flow_style\u003dFalse))"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":"        self.log.debug("}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_7b77ec03","line":975,"in_reply_to":"3f79a3b5_4061eaa8","updated":"2018-08-09 13:50:08.000000000","message":"Done","commit_id":"5e7931434826cd1290f7553e7883cad3bf893aaa"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"03fc5a9d96cfb5cce7d06d342c11dbea4fe031b5","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"        for name, host in zuul_data.get(\u0027inventory\u0027, {}).items():"},{"line_number":1073,"context_line":"            if host.get(\u0027ansible_connection\u0027) !\u003d \u0027kubectl\u0027:"},{"line_number":1074,"context_line":"                # Only kubectl connection can be injected for now"},{"line_number":1075,"context_line":"                continue"},{"line_number":1076,"context_line":"            if name in inventory[\u0027all\u0027][\u0027hosts\u0027]:"},{"line_number":1077,"context_line":"                continue"},{"line_number":1078,"context_line":"            inventory[\u0027all\u0027][\u0027hosts\u0027][name] \u003d host"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_4d585657","line":1075,"updated":"2018-11-18 19:44:55.000000000","message":"Can we log this case? Could indicate users that are either 1) confused and need help or 2) trying something dangerous.","commit_id":"f69f27fe36449b4f5f0e34ad428bb29d592c922c"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"b1437960c0b3bb755f311407fdaa9a0c1f62bf65","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"        for name, host in zuul_data.get(\u0027inventory\u0027, {}).items():"},{"line_number":1073,"context_line":"            if host.get(\u0027ansible_connection\u0027) !\u003d \u0027kubectl\u0027:"},{"line_number":1074,"context_line":"                # Only kubectl connection can be injected for now"},{"line_number":1075,"context_line":"                continue"},{"line_number":1076,"context_line":"            if name in inventory[\u0027all\u0027][\u0027hosts\u0027]:"},{"line_number":1077,"context_line":"                continue"},{"line_number":1078,"context_line":"            inventory[\u0027all\u0027][\u0027hosts\u0027][name] \u003d host"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_6e99897e","line":1075,"in_reply_to":"3f79a3b5_4d585657","updated":"2018-11-19 03:17:25.000000000","message":"Done","commit_id":"f69f27fe36449b4f5f0e34ad428bb29d592c922c"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"7af9490c5f33644d435025541e0238508044ced6","unresolved":false,"context_lines":[{"line_number":1130,"context_line":"        # Check for inventory injected by zuul_return"},{"line_number":1131,"context_line":"        zuul_data \u003d self.getResultData().get(\u0027zuul\u0027, {})"},{"line_number":1132,"context_line":"        inventory_update \u003d False"},{"line_number":1133,"context_line":"        for name, host in zuul_data.get(\u0027inventory\u0027, {}).items():"},{"line_number":1134,"context_line":"            if host.get(\u0027ansible_connection\u0027) !\u003d \u0027kubectl\u0027:"},{"line_number":1135,"context_line":"                # Only kubectl connection can be injected for now"},{"line_number":1136,"context_line":"                self.log.warning("}],"source_content_type":"text/x-python","patch_set":14,"id":"bfb3d3c7_fff12796","line":1133,"range":{"start_line":1133,"start_character":18,"end_line":1133,"end_character":22},"updated":"2019-05-30 17:58:36.000000000","message":"This actually looks like hostvars so we probably should name it hostvars.","commit_id":"ed4ee57c386a9f3be3b70c5b976cb69786cf70ba"}]}
