)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"0bef1cdffe41e05aa218730c4fbf94999ca57a9d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"c889f074_47ba9aa0","updated":"2025-06-17 14:21:33.000000000","message":"A few questions regarding the implementation.","commit_id":"7f4a7c5bf2b224a8dc27cb4168e669257554f28d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d4816cc4901fb628b7674fb2f75e45f713efcb8f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a930421c_0752e7a9","updated":"2025-05-20 15:24:02.000000000","message":"I think we need additional tests to verify fallback behavior","commit_id":"7f4a7c5bf2b224a8dc27cb4168e669257554f28d"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6d2c8ef4645249209e86818f1e2b363cd0d39604","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"1a79ee24_11e024e8","updated":"2025-06-26 20:02:50.000000000","message":"Thanks Abhishek and Cyril for the review.","commit_id":"7f4a7c5bf2b224a8dc27cb4168e669257554f28d"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6d2c8ef4645249209e86818f1e2b363cd0d39604","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"148f9d23_487bd7e9","in_reply_to":"a930421c_0752e7a9","updated":"2025-06-26 20:02:50.000000000","message":"Done","commit_id":"7f4a7c5bf2b224a8dc27cb4168e669257554f28d"}],"glance_store/driver.py":[{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"0bef1cdffe41e05aa218730c4fbf94999ca57a9d","unresolved":true,"context_lines":[{"line_number":354,"context_line":"    def get(self, key, default\u003dNone):"},{"line_number":355,"context_line":"        return getattr(self, key, default)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def safe_get(self, value):"},{"line_number":358,"context_line":"        try:"},{"line_number":359,"context_line":"            return self.__getattr__(value)"},{"line_number":360,"context_line":"        except cfg.NoSuchOptError:"}],"source_content_type":"text/x-python","patch_set":1,"id":"4fcc46c1_820dba63","line":357,"range":{"start_line":357,"start_character":8,"end_line":357,"end_character":16},"updated":"2025-06-17 14:21:33.000000000","message":"This method is not used anywhere in this patch. Do we want to keep it?\n\nAlso, returning \"None\" instead of raising NoSuchOptError would be a behavior change, would it not?","commit_id":"7f4a7c5bf2b224a8dc27cb4168e669257554f28d"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6d2c8ef4645249209e86818f1e2b363cd0d39604","unresolved":false,"context_lines":[{"line_number":354,"context_line":"    def get(self, key, default\u003dNone):"},{"line_number":355,"context_line":"        return getattr(self, key, default)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def safe_get(self, value):"},{"line_number":358,"context_line":"        try:"},{"line_number":359,"context_line":"            return self.__getattr__(value)"},{"line_number":360,"context_line":"        except cfg.NoSuchOptError:"}],"source_content_type":"text/x-python","patch_set":1,"id":"c95e2c92_8537d8cf","line":357,"range":{"start_line":357,"start_character":8,"end_line":357,"end_character":16},"in_reply_to":"4fcc46c1_820dba63","updated":"2025-06-26 20:02:50.000000000","message":"Done","commit_id":"7f4a7c5bf2b224a8dc27cb4168e669257554f28d"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"0bef1cdffe41e05aa218730c4fbf94999ca57a9d","unresolved":true,"context_lines":[{"line_number":363,"context_line":"    def __getattr__(self, opt_name):"},{"line_number":364,"context_line":"        # Don\u0027t use self.X to avoid reentrant call to __getattr__()"},{"line_number":365,"context_line":"        backend_conf \u003d object.__getattribute__(self, \u0027backend_conf\u0027)"},{"line_number":366,"context_line":"        opt_value \u003d getattr(backend_conf, opt_name)"},{"line_number":367,"context_line":"        if opt_value is None:"},{"line_number":368,"context_line":"            shared_conf \u003d object.__getattribute__(self, \u0027shared_backend_conf\u0027)"},{"line_number":369,"context_line":"            opt_value \u003d getattr(shared_conf, opt_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"eff6fbc8_e8920db6","line":366,"range":{"start_line":366,"start_character":42,"end_line":366,"end_character":50},"updated":"2025-06-17 14:21:33.000000000","message":"What if getattr() raises an AttributeError here?","commit_id":"7f4a7c5bf2b224a8dc27cb4168e669257554f28d"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6d2c8ef4645249209e86818f1e2b363cd0d39604","unresolved":true,"context_lines":[{"line_number":363,"context_line":"    def __getattr__(self, opt_name):"},{"line_number":364,"context_line":"        # Don\u0027t use self.X to avoid reentrant call to __getattr__()"},{"line_number":365,"context_line":"        backend_conf \u003d object.__getattribute__(self, \u0027backend_conf\u0027)"},{"line_number":366,"context_line":"        opt_value \u003d getattr(backend_conf, opt_name)"},{"line_number":367,"context_line":"        if opt_value is None:"},{"line_number":368,"context_line":"            shared_conf \u003d object.__getattribute__(self, \u0027shared_backend_conf\u0027)"},{"line_number":369,"context_line":"            opt_value \u003d getattr(shared_conf, opt_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"72bf934f_c0234e00","line":366,"range":{"start_line":366,"start_character":42,"end_line":366,"end_character":50},"in_reply_to":"eff6fbc8_e8920db6","updated":"2025-06-26 20:02:50.000000000","message":"It shouldn\u0027t as long as it\u0027s a registered conf option which we take care of at L#85","commit_id":"7f4a7c5bf2b224a8dc27cb4168e669257554f28d"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"0bef1cdffe41e05aa218730c4fbf94999ca57a9d","unresolved":true,"context_lines":[{"line_number":366,"context_line":"        opt_value \u003d getattr(backend_conf, opt_name)"},{"line_number":367,"context_line":"        if opt_value is None:"},{"line_number":368,"context_line":"            shared_conf \u003d object.__getattribute__(self, \u0027shared_backend_conf\u0027)"},{"line_number":369,"context_line":"            opt_value \u003d getattr(shared_conf, opt_name)"},{"line_number":370,"context_line":"        return opt_value"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a11a4d4_9caffad4","line":369,"range":{"start_line":369,"start_character":31,"end_line":369,"end_character":32},"updated":"2025-06-17 14:21:33.000000000","message":"Here we probably want to raise the exception, because the caller asked for an option that exists neither in the specific config, nor in the shared config.","commit_id":"7f4a7c5bf2b224a8dc27cb4168e669257554f28d"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6d2c8ef4645249209e86818f1e2b363cd0d39604","unresolved":true,"context_lines":[{"line_number":366,"context_line":"        opt_value \u003d getattr(backend_conf, opt_name)"},{"line_number":367,"context_line":"        if opt_value is None:"},{"line_number":368,"context_line":"            shared_conf \u003d object.__getattribute__(self, \u0027shared_backend_conf\u0027)"},{"line_number":369,"context_line":"            opt_value \u003d getattr(shared_conf, opt_name)"},{"line_number":370,"context_line":"        return opt_value"}],"source_content_type":"text/x-python","patch_set":1,"id":"7e8d8076_e3aaaa42","line":369,"range":{"start_line":369,"start_character":31,"end_line":369,"end_character":32},"in_reply_to":"1a11a4d4_9caffad4","updated":"2025-06-26 20:02:50.000000000","message":"I feel this part is being misinterpreted. It means that we are asking for a config option that is \"registered\" but there doesn\u0027t exist a value for it in either the main or the backend_defaults section.\nIn this case, we will fallback to the default value of the config option.\nWhat happens if we raise here?\nThere are certain config options that work as conditionals, for example, in the cinder store, we check value for certain config options exist and if not, we go with the \"else\" route\n\nhttps://opendev.org/openstack/glance_store/src/branch/master/glance_store/_drivers/cinder/store.py#L607-L610\n\nUPDATE:\nThis is what happens if we raise (otherwise the service starts up normally)\n\n    Jun 26 10:15:04 devstack-glance-cinder devstack@g-api.service[565964]: CRITICAL glance [-] Unhandled error: Exception: Config value not found\n    ...\n    Jun 26 10:15:04 devstack-glance-cinder devstack@g-api.service[565964]: ERROR glance   File \"/opt/stack/data/venv/lib/python3.10/site-packages/glance_store/driver.py\", line 366, in __getattr__\n    Jun 26 10:15:04 devstack-glance-cinder devstack@g-api.service[565964]: ERROR glance     raise Exception(\"Config value not found\")\n    Jun 26 10:15:04 devstack-glance-cinder devstack@g-api.service[565964]: ERROR glance Exception: Config value not found","commit_id":"7f4a7c5bf2b224a8dc27cb4168e669257554f28d"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"a03b5a4f915b3d4df4e622fb93f00dd41fdafcf4","unresolved":true,"context_lines":[{"line_number":366,"context_line":"        opt_value \u003d getattr(backend_conf, opt_name)"},{"line_number":367,"context_line":"        if opt_value is None:"},{"line_number":368,"context_line":"            shared_conf \u003d object.__getattribute__(self, \u0027shared_backend_conf\u0027)"},{"line_number":369,"context_line":"            opt_value \u003d getattr(shared_conf, opt_name)"},{"line_number":370,"context_line":"        return opt_value"}],"source_content_type":"text/x-python","patch_set":1,"id":"123c8f8e_ee05c9c0","line":369,"range":{"start_line":369,"start_character":31,"end_line":369,"end_character":32},"in_reply_to":"7e8d8076_e3aaaa42","updated":"2025-06-30 16:21:09.000000000","message":"Oh ok, I forgot about the option having a default value :)","commit_id":"7f4a7c5bf2b224a8dc27cb4168e669257554f28d"}]}
