)]}'
{"tests/unit/test_model.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"c716dce32a6585a863af6826aeef2c8b8dc3f134","unresolved":false,"context_lines":[{"line_number":314,"context_line":"            self.layout.addJob(base2)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    @mock.patch(\"zuul.model.zkobject.ZKObject._save\")"},{"line_number":317,"context_line":"    def test_job_pipeline_allow_untrusted_secrets(self, save_mock):"},{"line_number":318,"context_line":"        self.pipeline.post_review \u003d False"},{"line_number":319,"context_line":"        job \u003d self.pcontext.job_parser.fromYaml({"},{"line_number":320,"context_line":"            \u0027_source_context\u0027: self.context,"}],"source_content_type":"text/x-python","patch_set":20,"id":"11266ea5_897da502","line":317,"updated":"2021-10-25 18:01:55.000000000","message":"We can propbably drop this mock in favor of the local zk context later.","commit_id":"95cf1f97ed55f5835175dc1ec13f60d28f4a36c5"}],"zuul/manager/__init__.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"c99869c85a2e8c21bc349a9c5b4f1e652bb20b66","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                                      enqueue_time\u003denqueue_time)"},{"line_number":448,"context_line":"            item.updateAttributes(self.current_context, live\u003dlive)"},{"line_number":449,"context_line":"            self.reportStats(item, added\u003dTrue)"},{"line_number":450,"context_line":"            item.updateAttributes(self.current_context, quiet\u003dquiet)"},{"line_number":451,"context_line":"            if item.live and not item.reported_enqueue:"},{"line_number":452,"context_line":"                self.reportEnqueue(item)"},{"line_number":453,"context_line":"                item.updateAttributes(self.current_context,"}],"source_content_type":"text/x-python","patch_set":3,"id":"d37982ad_9953124c","line":450,"updated":"2021-09-17 00:08:57.000000000","message":"Looking at reportStats, I don\u0027t think quiet is important, so we should be able to combine live and quiet into one update.\n\nWe could probably also combine it with enqueue_time if we used a dictionary.  Not sure it\u0027s worth it.","commit_id":"290b414f3c64d03fb2b111070c35a409e8f26d5d"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"c99869c85a2e8c21bc349a9c5b4f1e652bb20b66","unresolved":false,"context_lines":[{"line_number":451,"context_line":"            if item.live and not item.reported_enqueue:"},{"line_number":452,"context_line":"                self.reportEnqueue(item)"},{"line_number":453,"context_line":"                item.updateAttributes(self.current_context,"},{"line_number":454,"context_line":"                                      reported_enqueue\u003dTrue)"},{"line_number":455,"context_line":""},{"line_number":456,"context_line":"            # Items in a dependency cycle are expected to be enqueued after"},{"line_number":457,"context_line":"            # each other. To prevent non-cycle items from being enqueued"}],"source_content_type":"text/x-python","patch_set":3,"id":"22e64c82_768dd5cb","line":454,"updated":"2021-09-17 00:08:57.000000000","message":"This line is fine; I\u0027m just leaving this note to share my thoughts:\n\nWhatever we do above, I don\u0027t think we should combine this update with it.  The reportEnqueue call could fail, and regardless of whether it does, we want to have set enqueue_time, etc).","commit_id":"290b414f3c64d03fb2b111070c35a409e8f26d5d"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"c716dce32a6585a863af6826aeef2c8b8dc3f134","unresolved":false,"context_lines":[{"line_number":519,"context_line":"                if enqueue_time:"},{"line_number":520,"context_line":"                    item.enqueue_time \u003d enqueue_time"},{"line_number":521,"context_line":"                item.live \u003d live"},{"line_number":522,"context_line":"                self.reportStats(item, added\u003dTrue)"},{"line_number":523,"context_line":"                item.quiet \u003d quiet"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"            if item.live and not item.reported_enqueue:"}],"source_content_type":"text/x-python","patch_set":20,"id":"25c4cd39_41ac16d3","line":522,"updated":"2021-10-25 18:01:55.000000000","message":"[note] reportStats has an internal exception handler, so it won\u0027t raise an exception here, which is good.","commit_id":"95cf1f97ed55f5835175dc1ec13f60d28f4a36c5"}],"zuul/model.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"097e9dd06efa7e0caa762df78e02d74944cafab3","unresolved":false,"context_lines":[{"line_number":2721,"context_line":"        )"},{"line_number":2722,"context_line":"        data.update({"},{"line_number":2723,"context_line":"            \"event\": event,"},{"line_number":2724,"context_line":"            \"change\": project.source.getChange(event),"},{"line_number":2725,"context_line":"            \"log\": get_annotated_logger(self.log, event),"},{"line_number":2726,"context_line":"            \"dynamic_state\": defaultdict(dict, data[\"dynamic_state\"])"},{"line_number":2727,"context_line":"        })"}],"source_content_type":"text/x-python","patch_set":5,"id":"cc8b37dc_6dad6bdb","line":2724,"updated":"2021-09-21 22:19:16.000000000","message":"This approach of getting the change from the event won\u0027t work, because this might be a dependent change, or a cycle change, so not directly tied to the event.  (In other words, an approval event for change A causes change B to be enqueued, and this is the item for change B, but the triggering event is the one for change A).\n\nI think we need to go ahead and rely on the change cache as noted above in order to continue.","commit_id":"4bf8f101560dacc801b98fa2175b5377ba9a8a2e"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"49aa4290026eccfa9b5b8fce0cb6d1acb8043282","unresolved":false,"context_lines":[{"line_number":2721,"context_line":"        )"},{"line_number":2722,"context_line":"        data.update({"},{"line_number":2723,"context_line":"            \"event\": event,"},{"line_number":2724,"context_line":"            \"change\": project.source.getChange(event),"},{"line_number":2725,"context_line":"            \"log\": get_annotated_logger(self.log, event),"},{"line_number":2726,"context_line":"            \"dynamic_state\": defaultdict(dict, data[\"dynamic_state\"])"},{"line_number":2727,"context_line":"        })"}],"source_content_type":"text/x-python","patch_set":5,"id":"55c1f6a3_40226188","line":2724,"in_reply_to":"cc8b37dc_6dad6bdb","updated":"2021-09-22 07:21:55.000000000","message":"Done","commit_id":"4bf8f101560dacc801b98fa2175b5377ba9a8a2e"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"f954f93376fb21f8ab02a2d3e622d97a85787316","unresolved":true,"context_lines":[{"line_number":2715,"context_line":"        else:"},{"line_number":2716,"context_line":"            event_type \u003d self.event.__class__.__name__"},{"line_number":2717,"context_line":""},{"line_number":2718,"context_line":"        data \u003d {"},{"line_number":2719,"context_line":"            # TODO: we need to also store some info about the change in"},{"line_number":2720,"context_line":"            # Zookeeper in order to show the change info on the status page."},{"line_number":2721,"context_line":"            # This needs change cache and the API to resolve change by key."}],"source_content_type":"text/x-python","patch_set":16,"id":"8f0d4a83_adb3f9fc","line":2718,"updated":"2021-10-20 12:11:18.000000000","message":"Need to also add the UUID","commit_id":"aacd58a312b94d7adbdff075aef96960889374a1"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"d0908420739ed5601b0cf38bb742e559e9fbc8e5","unresolved":false,"context_lines":[{"line_number":2715,"context_line":"        else:"},{"line_number":2716,"context_line":"            event_type \u003d self.event.__class__.__name__"},{"line_number":2717,"context_line":""},{"line_number":2718,"context_line":"        data \u003d {"},{"line_number":2719,"context_line":"            # TODO: we need to also store some info about the change in"},{"line_number":2720,"context_line":"            # Zookeeper in order to show the change info on the status page."},{"line_number":2721,"context_line":"            # This needs change cache and the API to resolve change by key."}],"source_content_type":"text/x-python","patch_set":16,"id":"a93c972b_ff26f23e","line":2718,"in_reply_to":"8f0d4a83_adb3f9fc","updated":"2021-10-20 12:48:38.000000000","message":"Done","commit_id":"aacd58a312b94d7adbdff075aef96960889374a1"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"efa18fa97e1dc53dbe30b23a17b94177ad2862f5","unresolved":true,"context_lines":[{"line_number":2798,"context_line":"            self.uuid, self.change, pipeline)"},{"line_number":2799,"context_line":""},{"line_number":2800,"context_line":"    def resetAllBuilds(self):"},{"line_number":2801,"context_line":"        self.updateAttributes("},{"line_number":2802,"context_line":"            self.pipeline.manager.current_context,"},{"line_number":2803,"context_line":"            current_build_set\u003dBuildSet(self),"},{"line_number":2804,"context_line":"            layout_uuid\u003dNone,"}],"source_content_type":"text/x-python","patch_set":19,"id":"aca0bc56_4157239e","line":2801,"updated":"2021-10-24 10:00:11.000000000","message":"As an idea for future optimization. Some callers (e.g. the pipeline manager) sets some attributes manually (some via updateAttributes, some via the context manager) and later calls methods like this. I think we could save zookeeper round trips if we check for an active context here and just set the attributes in this case. This way we broaden the context managers use in the calling method and batch more zk round trips.","commit_id":"e89cff28ef07ef69afb5ddfb07139a8962f0dfef"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"85f6b27dfabf584044ee000380864d6766fdfea7","unresolved":false,"context_lines":[{"line_number":2798,"context_line":"            self.uuid, self.change, pipeline)"},{"line_number":2799,"context_line":""},{"line_number":2800,"context_line":"    def resetAllBuilds(self):"},{"line_number":2801,"context_line":"        self.updateAttributes("},{"line_number":2802,"context_line":"            self.pipeline.manager.current_context,"},{"line_number":2803,"context_line":"            current_build_set\u003dBuildSet(self),"},{"line_number":2804,"context_line":"            layout_uuid\u003dNone,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9fb905ef_6a039a86","line":2801,"updated":"2021-10-25 15:57:09.000000000","message":"That sounds like a good idea.","commit_id":"e89cff28ef07ef69afb5ddfb07139a8962f0dfef"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"51cc977a8f03e11d51fb070a1b0cff5d7df67c7d","unresolved":false,"context_lines":[{"line_number":2722,"context_line":"            # This needs change cache and the API to resolve change by key."},{"line_number":2723,"context_line":"            \"change\": self.change.cache_key,"},{"line_number":2724,"context_line":"            \"dequeued_needing_change\": self.dequeued_needing_change,"},{"line_number":2725,"context_line":"            # \"current_build_set\": self.current_build_set.uuid,"},{"line_number":2726,"context_line":"            \"enqueue_time\": self.enqueue_time,"},{"line_number":2727,"context_line":"            \"report_time\": self.report_time,"},{"line_number":2728,"context_line":"            \"dequeue_time\": self.dequeue_time,"}],"source_content_type":"text/x-python","patch_set":22,"id":"d497b515_3448a74c","line":2725,"updated":"2021-10-25 21:43:33.000000000","message":"Exactly; the buildsets aren\u0027t in ZK yet, so serializing this isn\u0027t useful at this point.  It\u0027s added in https://review.opendev.org/812452","commit_id":"3706d676e3884899a0b69e55af1bd32ff8eda3b2"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"4fb44d03c84663cb635ad42d7cc7b44f138629be","unresolved":true,"context_lines":[{"line_number":2722,"context_line":"            # This needs change cache and the API to resolve change by key."},{"line_number":2723,"context_line":"            \"change\": self.change.cache_key,"},{"line_number":2724,"context_line":"            \"dequeued_needing_change\": self.dequeued_needing_change,"},{"line_number":2725,"context_line":"            # \"current_build_set\": self.current_build_set.uuid,"},{"line_number":2726,"context_line":"            \"enqueue_time\": self.enqueue_time,"},{"line_number":2727,"context_line":"            \"report_time\": self.report_time,"},{"line_number":2728,"context_line":"            \"dequeue_time\": self.dequeue_time,"}],"source_content_type":"text/x-python","patch_set":22,"id":"7dddab9f_957ba3d2","line":2725,"updated":"2021-10-25 21:22:13.000000000","message":"Why not write this uuid?\n\nI guess later changes will serialize more info when we switch to having more state in zk?","commit_id":"3706d676e3884899a0b69e55af1bd32ff8eda3b2"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"51cc977a8f03e11d51fb070a1b0cff5d7df67c7d","unresolved":false,"context_lines":[{"line_number":2781,"context_line":"            \"event\": event,"},{"line_number":2782,"context_line":"            \"change\": change,"},{"line_number":2783,"context_line":"            \"log\": get_annotated_logger(self.log, event),"},{"line_number":2784,"context_line":"            \"dynamic_state\": defaultdict(dict, data[\"dynamic_state\"])"},{"line_number":2785,"context_line":"        })"},{"line_number":2786,"context_line":"        return data"},{"line_number":2787,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"a6d58515_9de3b2b5","line":2784,"updated":"2021-10-25 21:43:33.000000000","message":"We\u0027re promoting the dynamic_state object from a plain dict to a defaultdict.\n\nThis is part of a pattern that happens in a lot of these deserialize methods.  Remember that the parent deserialize is just going to turn a json-bytestring into a dict of scalars.  But these objects have some attributes which are more complex.  So we need to turn some of those scalars into real objects.  \"change\" becomes an actual Change object, and dynamic_state becomes a defaultdict object.","commit_id":"3706d676e3884899a0b69e55af1bd32ff8eda3b2"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"4fb44d03c84663cb635ad42d7cc7b44f138629be","unresolved":true,"context_lines":[{"line_number":2781,"context_line":"            \"event\": event,"},{"line_number":2782,"context_line":"            \"change\": change,"},{"line_number":2783,"context_line":"            \"log\": get_annotated_logger(self.log, event),"},{"line_number":2784,"context_line":"            \"dynamic_state\": defaultdict(dict, data[\"dynamic_state\"])"},{"line_number":2785,"context_line":"        })"},{"line_number":2786,"context_line":"        return data"},{"line_number":2787,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5cb69dfc_ae3cdcaf","line":2784,"updated":"2021-10-25 21:22:13.000000000","message":"dynamic_state is serialized above which means the super().deserialize call on line 2750 will populate this attribute. Are we not able to properly serialize and deserialize this yet?","commit_id":"3706d676e3884899a0b69e55af1bd32ff8eda3b2"}],"zuul/scheduler.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"4fb44d03c84663cb635ad42d7cc7b44f138629be","unresolved":true,"context_lines":[{"line_number":1177,"context_line":"                                 \"when reconfiguring\" % name)"},{"line_number":1178,"context_line":"                continue"},{"line_number":1179,"context_line":""},{"line_number":1180,"context_line":"            with new_pipeline.manager.currentContext(context):"},{"line_number":1181,"context_line":"                self._reenqueuePipeline("},{"line_number":1182,"context_line":"                    tenant, new_pipeline, old_pipeline, context)"},{"line_number":1183,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"f01547ee_30635972","line":1180,"updated":"2021-10-25 21:22:13.000000000","message":"It isn\u0027t clear to me why we need to set the context on the pipeline manager while we do this? We pass contenxt to reenqueuePipeline() and refer to it directly there.","commit_id":"3706d676e3884899a0b69e55af1bd32ff8eda3b2"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"51cc977a8f03e11d51fb070a1b0cff5d7df67c7d","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"                                 \"when reconfiguring\" % name)"},{"line_number":1178,"context_line":"                continue"},{"line_number":1179,"context_line":""},{"line_number":1180,"context_line":"            with new_pipeline.manager.currentContext(context):"},{"line_number":1181,"context_line":"                self._reenqueuePipeline("},{"line_number":1182,"context_line":"                    tenant, new_pipeline, old_pipeline, context)"},{"line_number":1183,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"01eb44c7_2f5be26f","line":1180,"updated":"2021-10-25 21:43:33.000000000","message":"Setting currentContext allows any of the model objects to use their internal references up the chain to the pipeline to set attributes.  For example, reEnqueueItem calls ChangeQueue.enqueueItem which calls item.updateAttributes using the pipeline context.","commit_id":"3706d676e3884899a0b69e55af1bd32ff8eda3b2"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"4fb44d03c84663cb635ad42d7cc7b44f138629be","unresolved":true,"context_lines":[{"line_number":1359,"context_line":"            builds_to_cancel \u003d []"},{"line_number":1360,"context_line":"            requests_to_cancel \u003d []"},{"line_number":1361,"context_line":"            for item in shared_queue.queue:"},{"line_number":1362,"context_line":"                with item.activeContext(pipeline.manager.current_context):"},{"line_number":1363,"context_line":"                    item.item_ahead \u003d None"},{"line_number":1364,"context_line":"                    item.items_behind \u003d []"},{"line_number":1365,"context_line":"                self.log.info("}],"source_content_type":"text/x-python","patch_set":22,"id":"163d1290_76c281fa","line":1362,"updated":"2021-10-25 21:22:13.000000000","message":"This seems to be the one place where the pipeline manager context attribute it used via the early questioned context manager. Seems a bit heavyweight to do both the pass in of the context and the attribute in different places?","commit_id":"3706d676e3884899a0b69e55af1bd32ff8eda3b2"}]}
