)]}'
{"tests/base.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"b9cd5b153173c7ae2759fb85320d72046b20db2b","unresolved":false,"context_lines":[{"line_number":3523,"context_line":""},{"line_number":3524,"context_line":"    def execute(self, function: Callable[[Any], None], matcher\u003dNone) -\u003e None:"},{"line_number":3525,"context_line":"        for instance in self.filter(matcher):"},{"line_number":3526,"context_line":"            function(instance)"},{"line_number":3527,"context_line":""},{"line_number":3528,"context_line":""},{"line_number":3529,"context_line":"class ZuulTestCase(BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1fa4df85_601074a9","line":3526,"updated":"2020-03-04 17:21:50.000000000","message":"I explored this idea in https://review.opendev.org/711289 take a look and let me know what you think.\n\nWhen writing that, I noticed self.scheds is slightly misleading (it\u0027s not a bunch of schedulers, it a bunch of schedulerapps, each of which has a scheduler).  Should we change it to something like \"self.apps\"?  Or should we just get used to it?","commit_id":"4aa1f37be7ae8d5ac9a4e7c73d5b02d8f259d306"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"0fee85368e65421fcd543a6b1dc88365197194fd","unresolved":false,"context_lines":[{"line_number":3523,"context_line":""},{"line_number":3524,"context_line":"    def execute(self, function: Callable[[Any], None], matcher\u003dNone) -\u003e None:"},{"line_number":3525,"context_line":"        for instance in self.filter(matcher):"},{"line_number":3526,"context_line":"            function(instance)"},{"line_number":3527,"context_line":""},{"line_number":3528,"context_line":""},{"line_number":3529,"context_line":"class ZuulTestCase(BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1fa4df85_c0e1289d","line":3526,"updated":"2020-03-04 17:24:22.000000000","message":"We could also just write a reconfigure convenience method.","commit_id":"4aa1f37be7ae8d5ac9a4e7c73d5b02d8f259d306"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"8cdffc2aee2569cfe33e648bc7e6778ec4a27922","unresolved":false,"context_lines":[{"line_number":3523,"context_line":""},{"line_number":3524,"context_line":"    def execute(self, function: Callable[[Any], None], matcher\u003dNone) -\u003e None:"},{"line_number":3525,"context_line":"        for instance in self.filter(matcher):"},{"line_number":3526,"context_line":"            function(instance)"},{"line_number":3527,"context_line":""},{"line_number":3528,"context_line":""},{"line_number":3529,"context_line":"class ZuulTestCase(BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1fa4df85_00de606c","line":3526,"updated":"2020-03-04 16:55:32.000000000","message":"What about implementing this with a catch-all getter with a __call__ method?  Then we could write:\n\n  self.scheds.reconfigure(self.config)\n\nI\u0027m guessing that\u0027s because of the filter, but I don\u0027t see that used yet.  Even if it is important, we can always keep this method for that case.","commit_id":"4aa1f37be7ae8d5ac9a4e7c73d5b02d8f259d306"},{"author":{"_account_id":30637,"name":"Jan Kubovy","email":"jan.kubovy@bmw.de","username":"kubovy"},"change_message_id":"77a056120f6287462df655d4fd3b13d2675960fb","unresolved":false,"context_lines":[{"line_number":3523,"context_line":""},{"line_number":3524,"context_line":"    def execute(self, function: Callable[[Any], None], matcher\u003dNone) -\u003e None:"},{"line_number":3525,"context_line":"        for instance in self.filter(matcher):"},{"line_number":3526,"context_line":"            function(instance)"},{"line_number":3527,"context_line":""},{"line_number":3528,"context_line":""},{"line_number":3529,"context_line":"class ZuulTestCase(BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1fa4df85_4cd9bc1f","line":3526,"in_reply_to":"1fa4df85_00de606c","updated":"2020-03-09 06:27:50.000000000","message":"Also sometimes we need to access the SchedulerTestApp: `test_scheduler.py:8268` or a property of a scheduler: `tests/base.py:4392`","commit_id":"4aa1f37be7ae8d5ac9a4e7c73d5b02d8f259d306"},{"author":{"_account_id":30637,"name":"Jan Kubovy","email":"jan.kubovy@bmw.de","username":"kubovy"},"change_message_id":"6ce75b917b1bff93d035529b27478647d609b67f","unresolved":false,"context_lines":[{"line_number":3523,"context_line":""},{"line_number":3524,"context_line":"    def execute(self, function: Callable[[Any], None], matcher\u003dNone) -\u003e None:"},{"line_number":3525,"context_line":"        for instance in self.filter(matcher):"},{"line_number":3526,"context_line":"            function(instance)"},{"line_number":3527,"context_line":""},{"line_number":3528,"context_line":""},{"line_number":3529,"context_line":"class ZuulTestCase(BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1fa4df85_1c76973f","line":3526,"in_reply_to":"1fa4df85_601074a9","updated":"2020-03-07 15:08:57.000000000","message":"I have no preference. `apps` may be too generic imho and `sched_apps` too long. That was the reasoning for using `scheds`.","commit_id":"4aa1f37be7ae8d5ac9a4e7c73d5b02d8f259d306"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"ac44c046862ff04f73139ec50bf71a2a1ce00137","unresolved":false,"context_lines":[{"line_number":3523,"context_line":""},{"line_number":3524,"context_line":"    def execute(self, function: Callable[[Any], None], matcher\u003dNone) -\u003e None:"},{"line_number":3525,"context_line":"        for instance in self.filter(matcher):"},{"line_number":3526,"context_line":"            function(instance)"},{"line_number":3527,"context_line":""},{"line_number":3528,"context_line":""},{"line_number":3529,"context_line":"class ZuulTestCase(BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1fa4df85_4c59ef8b","line":3526,"in_reply_to":"1fa4df85_c0e1289d","updated":"2020-03-04 20:55:20.000000000","message":"I like your exploration, so ++ for that plus keep this method if needed.","commit_id":"4aa1f37be7ae8d5ac9a4e7c73d5b02d8f259d306"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"8609870b826b21000121d644b7b74dfbb4dd5367","unresolved":false,"context_lines":[{"line_number":30,"context_line":"import random"},{"line_number":31,"context_line":"import re"},{"line_number":32,"context_line":"from logging import Logger"},{"line_number":33,"context_line":"from typing import Callable, Optional, Any, Iterable"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"import requests"},{"line_number":36,"context_line":"import select"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_9e7a31b7","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":52},"updated":"2020-04-01 11:56:42.000000000","message":"Since mypy is not running on tests, aren\u0027t these annotations going to be outdated? Or are they somehow already useful to some IDE?","commit_id":"b68668a76aadff2acd803a6855b50abb5b86f429"},{"author":{"_account_id":30637,"name":"Jan Kubovy","email":"jan.kubovy@bmw.de","username":"kubovy"},"change_message_id":"fa21e97ffcdee04681aa071ad58864edec7b6663","unresolved":false,"context_lines":[{"line_number":30,"context_line":"import random"},{"line_number":31,"context_line":"import re"},{"line_number":32,"context_line":"from logging import Logger"},{"line_number":33,"context_line":"from typing import Callable, Optional, Any, Iterable"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"import requests"},{"line_number":36,"context_line":"import select"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_e1572725","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":52},"in_reply_to":"df33271e_9e7a31b7","updated":"2020-04-03 12:26:12.000000000","message":"They are supported by IDEs. And very helpful IMHO to navigate the code :) Also some common bugs, e.g. NPE, or inheritance problems may be detected using this.","commit_id":"b68668a76aadff2acd803a6855b50abb5b86f429"},{"author":{"_account_id":16068,"name":"Tobias Henkel","email":"tobias.henkel@bmw.de","username":"tobias.henkel"},"change_message_id":"49dcf2ba7402124c4282ed824ae22bbe9a950fa6","unresolved":false,"context_lines":[{"line_number":30,"context_line":"import random"},{"line_number":31,"context_line":"import re"},{"line_number":32,"context_line":"from logging import Logger"},{"line_number":33,"context_line":"from typing import Callable, Optional, Any, Iterable"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"import requests"},{"line_number":36,"context_line":"import select"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_618157c3","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":52},"in_reply_to":"df33271e_9e7a31b7","updated":"2020-04-03 12:13:43.000000000","message":"mypy is running already as part of the pep8 check. The annotations are indeed helpful for most recent IDEs.","commit_id":"b68668a76aadff2acd803a6855b50abb5b86f429"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"416344a4684a5a632ec69469fa747cb24026a8ab","unresolved":false,"context_lines":[{"line_number":30,"context_line":"import random"},{"line_number":31,"context_line":"import re"},{"line_number":32,"context_line":"from logging import Logger"},{"line_number":33,"context_line":"from typing import Callable, Optional, Any, Iterable"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"import requests"},{"line_number":36,"context_line":"import select"}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_64f684fc","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":52},"in_reply_to":"df33271e_e1572725","updated":"2020-04-03 13:26:23.000000000","message":"I agree annotations are great, my only concerns is that they are not tested (zuul ci only validate the zuul/ directory, not the tests/)","commit_id":"b68668a76aadff2acd803a6855b50abb5b86f429"},{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"8609870b826b21000121d644b7b74dfbb4dd5367","unresolved":false,"context_lines":[{"line_number":3507,"context_line":"        return [e[1] for e in enumerate(self.instances)"},{"line_number":3508,"context_line":"                if fcn is None or fcn(e[0], e[1])]"},{"line_number":3509,"context_line":""},{"line_number":3510,"context_line":"    def execute(self, function: Callable[[Any], None], matcher\u003dNone) -\u003e None:"},{"line_number":3511,"context_line":"        for instance in self.filter(matcher):"},{"line_number":3512,"context_line":"            function(instance)"},{"line_number":3513,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"df33271e_5eaf0929","line":3510,"range":{"start_line":3510,"start_character":42,"end_line":3510,"end_character":45},"updated":"2020-04-01 11:56:42.000000000","message":"nit: shouldn\u0027t this be `SchedulerTestManager` ?","commit_id":"b68668a76aadff2acd803a6855b50abb5b86f429"}],"tests/unit/test_connection.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"b9cd5b153173c7ae2759fb85320d72046b20db2b","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        \"Test the SQL reporter fails gracefully when unable to connect\""},{"line_number":309,"context_line":"        self.config.set(\u0027zuul\u0027, \u0027layout_config\u0027,"},{"line_number":310,"context_line":"                        \u0027tests/fixtures/layout-sql-reporter.yaml\u0027)"},{"line_number":311,"context_line":"        self.scheds.execute(lambda app: app.sched.reconfigure(self.config))"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        # Trigger a reporter. If no errors are raised, the reporter has been"},{"line_number":314,"context_line":"        # disabled correctly"}],"source_content_type":"text/x-python","patch_set":11,"id":"1fa4df85_002980e4","line":311,"updated":"2020-03-04 17:21:50.000000000","message":"I notice that we\u0027re using self.config here, but actually, each of the schedulerapps have a config too.  So should this really be:\n\n  self.scheds.execute(lambda app: app.sched.reconfigure(app.config))\n\nThat would make the lambda more worthwhile and probably means my callable proxy idea is too limited to use.","commit_id":"4aa1f37be7ae8d5ac9a4e7c73d5b02d8f259d306"},{"author":{"_account_id":30637,"name":"Jan Kubovy","email":"jan.kubovy@bmw.de","username":"kubovy"},"change_message_id":"6ce75b917b1bff93d035529b27478647d609b67f","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        \"Test the SQL reporter fails gracefully when unable to connect\""},{"line_number":309,"context_line":"        self.config.set(\u0027zuul\u0027, \u0027layout_config\u0027,"},{"line_number":310,"context_line":"                        \u0027tests/fixtures/layout-sql-reporter.yaml\u0027)"},{"line_number":311,"context_line":"        self.scheds.execute(lambda app: app.sched.reconfigure(self.config))"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        # Trigger a reporter. If no errors are raised, the reporter has been"},{"line_number":314,"context_line":"        # disabled correctly"}],"source_content_type":"text/x-python","patch_set":11,"id":"1fa4df85_3c711345","line":311,"in_reply_to":"1fa4df85_002980e4","updated":"2020-03-07 15:08:57.000000000","message":"Good point","commit_id":"4aa1f37be7ae8d5ac9a4e7c73d5b02d8f259d306"}],"tests/unit/test_cross_crd.py":[{"author":{"_account_id":30637,"name":"Jan Kubovy","email":"jan.kubovy@bmw.de","username":"kubovy"},"change_message_id":"4b403b45fa6b19da756f7f76345ffe02e8860af6","unresolved":false,"context_lines":[{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        # Make sure the items still share a change queue, and the"},{"line_number":353,"context_line":"        # first one is not live."},{"line_number":354,"context_line":"        tenant \u003d self.sched.abide.tenants.get(\u0027tenant-one\u0027)"},{"line_number":355,"context_line":"        self.assertEqual(len(tenant.layout.pipelines[\u0027check\u0027].queues), 1)"},{"line_number":356,"context_line":"        queue \u003d tenant.layout.pipelines[\u0027check\u0027].queues[0]"},{"line_number":357,"context_line":"        first_item \u003d queue.queue[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_4647f5a5","line":354,"updated":"2020-02-20 08:51:56.000000000","message":"There would be also an option to get rid of the `self.sched` completely and use here `self.sched_factory[0].sched` instead.\n\nIs this worth it? Now it may be confusing since the default scheduler can be accessed using both `self.sched` and `self.sched_factory[0].sched`.","commit_id":"75afed756c7dde64919f3fe3ff62e1a2d2f80554"}]}
