)]}'
{"placement/cmd/status.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"790ea8f47e72b7ae251c4c3f8cc18e56819c6a7d","unresolved":true,"context_lines":[{"line_number":33,"context_line":"        self.ctxt \u003d context.RequestContext(config\u003dconfig)"},{"line_number":34,"context_line":"        self._upgrade_checks.append("},{"line_number":35,"context_line":"            (\"Policy File JSON to YAML Migration\","},{"line_number":36,"context_line":"             (common_checks.check_policy_json, {\u0027conf\u0027: config}))"},{"line_number":37,"context_line":"        )"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @db_api.placement_context_manager.reader"}],"source_content_type":"text/x-python","patch_set":1,"id":"87c36743_7da55cdf","line":36,"updated":"2021-04-20 16:47:37.000000000","message":"reviewers: I\u0027m not sure this is the good way to make this work, so I\u0027m open to suggestions.","commit_id":"99d67a34f2c0c8b0692d4ebd85157cb6425c7df2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6a004fc40ea258a77efd62399241f6cb439474f3","unresolved":true,"context_lines":[{"line_number":33,"context_line":"        self.ctxt \u003d context.RequestContext(config\u003dconfig)"},{"line_number":34,"context_line":"        self._upgrade_checks.append("},{"line_number":35,"context_line":"            (\"Policy File JSON to YAML Migration\","},{"line_number":36,"context_line":"             (common_checks.check_policy_json, {\u0027conf\u0027: config}))"},{"line_number":37,"context_line":"        )"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @db_api.placement_context_manager.reader"}],"source_content_type":"text/x-python","patch_set":1,"id":"9981b49f_2a9ce460","line":36,"in_reply_to":"0ebfd01e_29e4109c","updated":"2021-04-21 07:22:55.000000000","message":"_upgrade_checks is class level variable. It is initialized when the class defined. At that time there is no initialized config object, it is later created when main was run and calling Checks.__init__. \n\nSo after a good night sleep I see the following possibilities:\n\na) I keep the _upgrade_checks at class level and manipulate the content of it during the __init__ , like currently proposed\n\nb) I move the _upgrade_checks from class level to be defined in __init__ \n\nc) I create a wrapper method in Checks that does not take a config parameter but calls the check_policy_json with self.config and then add this wrapper function to the _upgrade_checks list.\n\nd) I make the config object global.\n\nConsidering all these options I now in favor of c) it is the most complex but it is showing the config handling difference most expressively and still keeping the upgrade_checks  where they are today and keeping them together in a single place.","commit_id":"99d67a34f2c0c8b0692d4ebd85157cb6425c7df2"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1e7c0a737d30c0f1127cb4b6b7b488ae1d8d9732","unresolved":true,"context_lines":[{"line_number":33,"context_line":"        self.ctxt \u003d context.RequestContext(config\u003dconfig)"},{"line_number":34,"context_line":"        self._upgrade_checks.append("},{"line_number":35,"context_line":"            (\"Policy File JSON to YAML Migration\","},{"line_number":36,"context_line":"             (common_checks.check_policy_json, {\u0027conf\u0027: config}))"},{"line_number":37,"context_line":"        )"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @db_api.placement_context_manager.reader"}],"source_content_type":"text/x-python","patch_set":1,"id":"0ebfd01e_29e4109c","line":36,"in_reply_to":"2e45beb0_8b294a32","updated":"2021-04-20 21:25:23.000000000","message":"yeah, as melwitt suggested. \u0027config\u0027 object is initialized at L128 if we can pass that initialized conf object at original L110 then it will work fine.","commit_id":"99d67a34f2c0c8b0692d4ebd85157cb6425c7df2"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"09945d447b58746f3ca5c3beb5d842b5e18c997e","unresolved":true,"context_lines":[{"line_number":33,"context_line":"        self.ctxt \u003d context.RequestContext(config\u003dconfig)"},{"line_number":34,"context_line":"        self._upgrade_checks.append("},{"line_number":35,"context_line":"            (\"Policy File JSON to YAML Migration\","},{"line_number":36,"context_line":"             (common_checks.check_policy_json, {\u0027conf\u0027: config}))"},{"line_number":37,"context_line":"        )"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @db_api.placement_context_manager.reader"}],"source_content_type":"text/x-python","patch_set":1,"id":"2e45beb0_8b294a32","line":36,"in_reply_to":"87c36743_7da55cdf","updated":"2021-04-20 17:12:24.000000000","message":"It might be nicer IMHO to just save the config here:\n\n self.config \u003d config\n\nand then leave the upgrade check in the original place L110 and pass self.config instead of cfg.CONF.","commit_id":"99d67a34f2c0c8b0692d4ebd85157cb6425c7df2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"14473095d4e612f51250dd9c1528d856e5887e20","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        self.ctxt \u003d context.RequestContext(config\u003dconfig)"},{"line_number":34,"context_line":"        self._upgrade_checks.append("},{"line_number":35,"context_line":"            (\"Policy File JSON to YAML Migration\","},{"line_number":36,"context_line":"             (common_checks.check_policy_json, {\u0027conf\u0027: config}))"},{"line_number":37,"context_line":"        )"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    @db_api.placement_context_manager.reader"}],"source_content_type":"text/x-python","patch_set":1,"id":"63d7e7b0_ac10297d","line":36,"in_reply_to":"9981b49f_2a9ce460","updated":"2021-04-21 09:17:27.000000000","message":"Done","commit_id":"99d67a34f2c0c8b0692d4ebd85157cb6425c7df2"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8be8f006cce44e5053f2850ea02797c3b29dc070","unresolved":true,"context_lines":[{"line_number":107,"context_line":"        (\u0027Missing Root Provider IDs\u0027, _check_root_provider_ids),"},{"line_number":108,"context_line":"        (\u0027Incomplete Consumers\u0027, _check_incomplete_consumers),"},{"line_number":109,"context_line":"        (\"Policy File JSON to YAML Migration\","},{"line_number":110,"context_line":"         (common_checks.check_policy_json, {\u0027conf\u0027: cfg.CONF})),"},{"line_number":111,"context_line":"    )"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"082c4f80_0420195e","side":"PARENT","line":110,"range":{"start_line":110,"start_character":52,"end_line":110,"end_character":60},"updated":"2021-04-22 11:36:20.000000000","message":"ah yes it is using the global one","commit_id":"9ea3d9b2158e4049e24b80a4a596acb15721634a"}]}
