)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"a4fdbea885ed1ba1093dcfbb55c90bdd274385bb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2b4d2c4a_2557f4ef","updated":"2025-02-19 00:55:06.000000000","message":"recheck\n\nmake sure that is not a concurrency issue when creating resource in gnocchi","commit_id":"36d394838fa040b252e9524e22ecf9ab13069ef2"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"2e00ac01766026af4b1478bfc27282d03d9977dc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3e7137a7_54cd5b8d","updated":"2025-02-19 13:17:12.000000000","message":"check rdo experimental","commit_id":"73c253e147b7937e30c4747400b0127f63b92a29"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"90e5bfaf73314dcb6bf1d804a6d6a92907441944","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"efc92b18_d062f548","updated":"2025-02-24 07:43:13.000000000","message":"Overall it looks, Nice work Doug!","commit_id":"ee622e27a4b7d7cffd5fb03ee7a13c083eb039b2"}],"watcher_tempest_plugin/infra_optim_clients.py":[{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"1178a811d049299ee40f29da9643ba772b660ef1","unresolved":true,"context_lines":[{"line_number":42,"context_line":"            self.auth_provider, \u0027placement\u0027, CONF.identity.region)"},{"line_number":43,"context_line":"        # TODO(dviroel): add support for https"},{"line_number":44,"context_line":"        self.prometheus_client \u003d pc.PromtoolClient("},{"line_number":45,"context_line":"            \"http://{}:{}\".format(CONF.optimize.prometheus_host,"},{"line_number":46,"context_line":"                                  CONF.optimize.prometheus_port),"},{"line_number":47,"context_line":"            promtool_path\u003dCONF.optimize.prometheus_promtool)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baae3c65_292280f5","line":45,"range":{"start_line":45,"start_character":13,"end_line":45,"end_character":17},"updated":"2025-02-20 14:35:34.000000000","message":"I think we need to support https too","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e402e1ed3a7df95495592de5ff88f289c6b5ac59","unresolved":true,"context_lines":[{"line_number":42,"context_line":"            self.auth_provider, \u0027placement\u0027, CONF.identity.region)"},{"line_number":43,"context_line":"        # TODO(dviroel): add support for https"},{"line_number":44,"context_line":"        self.prometheus_client \u003d pc.PromtoolClient("},{"line_number":45,"context_line":"            \"http://{}:{}\".format(CONF.optimize.prometheus_host,"},{"line_number":46,"context_line":"                                  CONF.optimize.prometheus_port),"},{"line_number":47,"context_line":"            promtool_path\u003dCONF.optimize.prometheus_promtool)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a194f32_1b2287bd","line":45,"range":{"start_line":45,"start_character":13,"end_line":45,"end_character":17},"in_reply_to":"0e915c34_6722f12e","updated":"2025-02-27 12:17:35.000000000","message":"lets adress this in a followup","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"b788b23b51131f28dcb67f2c5502b486e1ec3739","unresolved":true,"context_lines":[{"line_number":42,"context_line":"            self.auth_provider, \u0027placement\u0027, CONF.identity.region)"},{"line_number":43,"context_line":"        # TODO(dviroel): add support for https"},{"line_number":44,"context_line":"        self.prometheus_client \u003d pc.PromtoolClient("},{"line_number":45,"context_line":"            \"http://{}:{}\".format(CONF.optimize.prometheus_host,"},{"line_number":46,"context_line":"                                  CONF.optimize.prometheus_port),"},{"line_number":47,"context_line":"            promtool_path\u003dCONF.optimize.prometheus_promtool)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"0e915c34_6722f12e","line":45,"range":{"start_line":45,"start_character":13,"end_line":45,"end_character":17},"in_reply_to":"25ee70b9_2cc5c207","updated":"2025-02-20 15:20:22.000000000","message":"+1","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"db5c8ceca17012e2030a0251fc22adb2f0dd25e6","unresolved":true,"context_lines":[{"line_number":42,"context_line":"            self.auth_provider, \u0027placement\u0027, CONF.identity.region)"},{"line_number":43,"context_line":"        # TODO(dviroel): add support for https"},{"line_number":44,"context_line":"        self.prometheus_client \u003d pc.PromtoolClient("},{"line_number":45,"context_line":"            \"http://{}:{}\".format(CONF.optimize.prometheus_host,"},{"line_number":46,"context_line":"                                  CONF.optimize.prometheus_port),"},{"line_number":47,"context_line":"            promtool_path\u003dCONF.optimize.prometheus_promtool)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"848cfa66_a915ff2b","line":45,"range":{"start_line":45,"start_character":13,"end_line":45,"end_character":17},"in_reply_to":"3a194f32_1b2287bd","updated":"2025-02-27 13:02:16.000000000","message":"it is being addressed in the podified deployment change:\nhttps://review.opendev.org/c/openstack/watcher-tempest-plugin/+/942481/5/watcher_tempest_plugin/infra_optim_clients.py#45","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"1ddb4feaa2a59edba95de0501e88f6663d9d7e4d","unresolved":true,"context_lines":[{"line_number":42,"context_line":"            self.auth_provider, \u0027placement\u0027, CONF.identity.region)"},{"line_number":43,"context_line":"        # TODO(dviroel): add support for https"},{"line_number":44,"context_line":"        self.prometheus_client \u003d pc.PromtoolClient("},{"line_number":45,"context_line":"            \"http://{}:{}\".format(CONF.optimize.prometheus_host,"},{"line_number":46,"context_line":"                                  CONF.optimize.prometheus_port),"},{"line_number":47,"context_line":"            promtool_path\u003dCONF.optimize.prometheus_promtool)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"25ee70b9_2cc5c207","line":45,"range":{"start_line":45,"start_character":13,"end_line":45,"end_character":17},"in_reply_to":"baae3c65_292280f5","updated":"2025-02-20 15:11:50.000000000","message":"we will need yes, for other deployments !\u003d devstack, I can add a simple config option for that now, or in the follow up.","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"}],"watcher_tempest_plugin/tests/scenario/base.py":[{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"111f0193468a45004c94d6b06baa342f8e0fa181","unresolved":true,"context_lines":[{"line_number":279,"context_line":"            if instance.get(\u0027OS-EXT-SRV-ATTR:hypervisor_hostname\u0027) !\u003d node:"},{"line_number":280,"context_line":"                self._live_migrate(instance[\u0027id\u0027], node, \u0027ACTIVE\u0027)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def make_instance_statistic(self, instance, metrics\u003ddict()):"},{"line_number":283,"context_line":"        \"\"\"Add instance resources and its measures to the datasource"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        :param instance: Instance response body"}],"source_content_type":"text/x-python","patch_set":4,"id":"583b126c_640a2445","line":282,"range":{"start_line":282,"start_character":0,"end_line":282,"end_character":64},"updated":"2025-02-19 14:01:41.000000000","message":"comments from review call: best to not move around, makes hard to follow changes with git blame.","commit_id":"73c253e147b7937e30c4747400b0127f63b92a29"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"7aa557f019eca5f60c68b6316955673d87819d7a","unresolved":false,"context_lines":[{"line_number":279,"context_line":"            if instance.get(\u0027OS-EXT-SRV-ATTR:hypervisor_hostname\u0027) !\u003d node:"},{"line_number":280,"context_line":"                self._live_migrate(instance[\u0027id\u0027], node, \u0027ACTIVE\u0027)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def make_instance_statistic(self, instance, metrics\u003ddict()):"},{"line_number":283,"context_line":"        \"\"\"Add instance resources and its measures to the datasource"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        :param instance: Instance response body"}],"source_content_type":"text/x-python","patch_set":4,"id":"64368db2_394db49f","line":282,"range":{"start_line":282,"start_character":0,"end_line":282,"end_character":64},"in_reply_to":"583b126c_640a2445","updated":"2025-02-19 17:10:22.000000000","message":"Done","commit_id":"73c253e147b7937e30c4747400b0127f63b92a29"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"111f0193468a45004c94d6b06baa342f8e0fa181","unresolved":true,"context_lines":[{"line_number":429,"context_line":"            sleep_for\u003d2"},{"line_number":430,"context_line":"        ))"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    # ### PROMETHEUS ### #"},{"line_number":433,"context_line":"    def _generate_prometheus_metrics(self,"},{"line_number":434,"context_line":"                                     metric_name,"},{"line_number":435,"context_line":"                                     metric_type\u003d\"gauge\","},{"line_number":436,"context_line":"                                     labels\u003d{},"},{"line_number":437,"context_line":"                                     count\u003d10,"},{"line_number":438,"context_line":"                                     interval_secs\u003d30,"},{"line_number":439,"context_line":"                                     add_unique_label\u003dTrue,"},{"line_number":440,"context_line":"                                     inc_factor\u003d0.8,"},{"line_number":441,"context_line":"                                     start_value\u003d1.0):"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        # timestamp needs to be in microseconds"},{"line_number":444,"context_line":"        ts_now_ms \u003d int(datetime.now().timestamp())*1000"}],"source_content_type":"text/x-python","patch_set":4,"id":"3bed3d15_8e220a71","line":441,"range":{"start_line":432,"start_character":0,"end_line":441,"end_character":54},"updated":"2025-02-19 14:01:41.000000000","message":"TODO: Add docstring","commit_id":"73c253e147b7937e30c4747400b0127f63b92a29"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"7aa557f019eca5f60c68b6316955673d87819d7a","unresolved":false,"context_lines":[{"line_number":429,"context_line":"            sleep_for\u003d2"},{"line_number":430,"context_line":"        ))"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    # ### PROMETHEUS ### #"},{"line_number":433,"context_line":"    def _generate_prometheus_metrics(self,"},{"line_number":434,"context_line":"                                     metric_name,"},{"line_number":435,"context_line":"                                     metric_type\u003d\"gauge\","},{"line_number":436,"context_line":"                                     labels\u003d{},"},{"line_number":437,"context_line":"                                     count\u003d10,"},{"line_number":438,"context_line":"                                     interval_secs\u003d30,"},{"line_number":439,"context_line":"                                     add_unique_label\u003dTrue,"},{"line_number":440,"context_line":"                                     inc_factor\u003d0.8,"},{"line_number":441,"context_line":"                                     start_value\u003d1.0):"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        # timestamp needs to be in microseconds"},{"line_number":444,"context_line":"        ts_now_ms \u003d int(datetime.now().timestamp())*1000"}],"source_content_type":"text/x-python","patch_set":4,"id":"060b338d_24dd8fd7","line":441,"range":{"start_line":432,"start_character":0,"end_line":441,"end_character":54},"in_reply_to":"3bed3d15_8e220a71","updated":"2025-02-19 17:10:22.000000000","message":"Done","commit_id":"73c253e147b7937e30c4747400b0127f63b92a29"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"1178a811d049299ee40f29da9643ba772b660ef1","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        instance_cpu_usage\u003d\u0027ceilometer_cpu\u0027,"},{"line_number":58,"context_line":"        instance_ram_usage\u003d\u0027ceilometer_memory_usage\u0027,"},{"line_number":59,"context_line":"        instance_ram_allocated\u003d\u0027instance.memory\u0027,"},{"line_number":60,"context_line":"        instance_root_disk_size\u003d\u0027instance.disk\u0027,)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    GNOCCHI_METRIC_MAP \u003d dict("},{"line_number":63,"context_line":"        host_cpu_usage\u003d\u0027compute.node.cpu.percent\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"2022e559_249772cd","line":60,"updated":"2025-02-20 14:35:34.000000000","message":"For instance_ram_allocated and instance_root_disk_size, the prometheus datasource does not relies on metrics from the prometheus store but from the information about disk and memory provided by nova directly.","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"de4a126aab449ad17134b8bb01eacfbd9080e056","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        instance_cpu_usage\u003d\u0027ceilometer_cpu\u0027,"},{"line_number":58,"context_line":"        instance_ram_usage\u003d\u0027ceilometer_memory_usage\u0027,"},{"line_number":59,"context_line":"        instance_ram_allocated\u003d\u0027instance.memory\u0027,"},{"line_number":60,"context_line":"        instance_root_disk_size\u003d\u0027instance.disk\u0027,)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    GNOCCHI_METRIC_MAP \u003d dict("},{"line_number":63,"context_line":"        host_cpu_usage\u003d\u0027compute.node.cpu.percent\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"da76ea6d_1f58e99f","line":60,"in_reply_to":"07284143_8c561443","updated":"2025-02-22 16:46:53.000000000","message":"I updated to include only the metrics that the database have. Tks Alfredo","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"185a95b223b033232fa81a806307225e912d4814","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        instance_cpu_usage\u003d\u0027ceilometer_cpu\u0027,"},{"line_number":58,"context_line":"        instance_ram_usage\u003d\u0027ceilometer_memory_usage\u0027,"},{"line_number":59,"context_line":"        instance_ram_allocated\u003d\u0027instance.memory\u0027,"},{"line_number":60,"context_line":"        instance_root_disk_size\u003d\u0027instance.disk\u0027,)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    GNOCCHI_METRIC_MAP \u003d dict("},{"line_number":63,"context_line":"        host_cpu_usage\u003d\u0027compute.node.cpu.percent\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"07284143_8c561443","line":60,"in_reply_to":"19d2094c_4bdbe8f3","updated":"2025-02-20 17:07:35.000000000","message":"the idea was not to build a push metric dict, but a dict of metrics that the datasource supports. This can be used to compare with metrics required by a strategy, and skip tests if there is no datasource for it.\nBut I can change that to be a push metric dict, and remove the unused entries.","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"1ddb4feaa2a59edba95de0501e88f6663d9d7e4d","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        instance_cpu_usage\u003d\u0027ceilometer_cpu\u0027,"},{"line_number":58,"context_line":"        instance_ram_usage\u003d\u0027ceilometer_memory_usage\u0027,"},{"line_number":59,"context_line":"        instance_ram_allocated\u003d\u0027instance.memory\u0027,"},{"line_number":60,"context_line":"        instance_root_disk_size\u003d\u0027instance.disk\u0027,)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    GNOCCHI_METRIC_MAP \u003d dict("},{"line_number":63,"context_line":"        host_cpu_usage\u003d\u0027compute.node.cpu.percent\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"e13573c8_8ba4ebfc","line":60,"in_reply_to":"2022e559_249772cd","updated":"2025-02-20 15:11:50.000000000","message":"ack, the idea of copying the metric map here is to list all metrics supported by the datasource, so a PROMETHEUS_METRIC_MAP[\u0027instance_l3_cache_usage\u0027] would be an invalid entry","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"b788b23b51131f28dcb67f2c5502b486e1ec3739","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        instance_cpu_usage\u003d\u0027ceilometer_cpu\u0027,"},{"line_number":58,"context_line":"        instance_ram_usage\u003d\u0027ceilometer_memory_usage\u0027,"},{"line_number":59,"context_line":"        instance_ram_allocated\u003d\u0027instance.memory\u0027,"},{"line_number":60,"context_line":"        instance_root_disk_size\u003d\u0027instance.disk\u0027,)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    GNOCCHI_METRIC_MAP \u003d dict("},{"line_number":63,"context_line":"        host_cpu_usage\u003d\u0027compute.node.cpu.percent\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"19d2094c_4bdbe8f3","line":60,"in_reply_to":"e13573c8_8ba4ebfc","updated":"2025-02-20 15:20:22.000000000","message":"ok. So, if someone try to push to prometheus to instance_root_disk_size I think it should also fail, as that metric would not be used by the datastore. Short version, I think we should not include those two in the list.","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"c3d70c4076ef532cb207cee13a6419ec74d9884b","unresolved":true,"context_lines":[{"line_number":319,"context_line":"    def make_host_statistic(self, metrics\u003ddict()):"},{"line_number":320,"context_line":"        \"\"\"Add host metrics to the datasource"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        :param metrics: The metrics add to resource when using Gnocchi"},{"line_number":323,"context_line":"        \"\"\""},{"line_number":324,"context_line":"        # data sources that support fake metrics"},{"line_number":325,"context_line":"        if CONF.optimize.datasource \u003d\u003d \"gnocchi\":"}],"source_content_type":"text/x-python","patch_set":5,"id":"bea63448_b1041fb5","line":322,"updated":"2025-02-20 13:42:30.000000000","message":"nit, since this method is now generic, the comment about \u0027when using Gnocchi\u0027 should be removed","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"ff593a540d90e24d949278b8f50dea2a1e8414d5","unresolved":true,"context_lines":[{"line_number":319,"context_line":"    def make_host_statistic(self, metrics\u003ddict()):"},{"line_number":320,"context_line":"        \"\"\"Add host metrics to the datasource"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        :param metrics: The metrics add to resource when using Gnocchi"},{"line_number":323,"context_line":"        \"\"\""},{"line_number":324,"context_line":"        # data sources that support fake metrics"},{"line_number":325,"context_line":"        if CONF.optimize.datasource \u003d\u003d \"gnocchi\":"}],"source_content_type":"text/x-python","patch_set":5,"id":"e8f6334e_1b8358ab","line":322,"in_reply_to":"bea63448_b1041fb5","updated":"2025-02-20 14:57:50.000000000","message":"yeah, if you look below, you will see that only gnocchi is using this, but yes, needs to be clear about that","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"c3d70c4076ef532cb207cee13a6419ec74d9884b","unresolved":true,"context_lines":[{"line_number":330,"context_line":"    def make_host_statistic_gnocchi(self, metrics\u003ddict()):"},{"line_number":331,"context_line":"        \"\"\"Create host resource and its measures in Gnocchi DB"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        :param metrics: The metrics add to resource when using Gnocchi"},{"line_number":334,"context_line":"        \"\"\""},{"line_number":335,"context_line":"        hypervisors_client \u003d self.mgr.hypervisor_client"},{"line_number":336,"context_line":"        hypervisors \u003d hypervisors_client.list_hypervisors("}],"source_content_type":"text/x-python","patch_set":5,"id":"7891bc53_5d0d7c67","line":333,"updated":"2025-02-20 13:42:30.000000000","message":"same as above, not only Gnocchi specific now","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"ff593a540d90e24d949278b8f50dea2a1e8414d5","unresolved":true,"context_lines":[{"line_number":330,"context_line":"    def make_host_statistic_gnocchi(self, metrics\u003ddict()):"},{"line_number":331,"context_line":"        \"\"\"Create host resource and its measures in Gnocchi DB"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        :param metrics: The metrics add to resource when using Gnocchi"},{"line_number":334,"context_line":"        \"\"\""},{"line_number":335,"context_line":"        hypervisors_client \u003d self.mgr.hypervisor_client"},{"line_number":336,"context_line":"        hypervisors \u003d hypervisors_client.list_hypervisors("}],"source_content_type":"text/x-python","patch_set":5,"id":"6afaeec1_7c5bcf54","line":333,"in_reply_to":"7891bc53_5d0d7c67","updated":"2025-02-20 14:57:50.000000000","message":"tks, will fix","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"c3d70c4076ef532cb207cee13a6419ec74d9884b","unresolved":true,"context_lines":[{"line_number":453,"context_line":"        :param interval_sec: seconds between each generated"},{"line_number":454,"context_line":"          sample."},{"line_number":455,"context_line":"        :param add_unique_label: when set to True, a label"},{"line_number":456,"context_line":"          with the hey \u0027orig_timestamp\u0027 will be added with to"},{"line_number":457,"context_line":"          all samples. Doesn\u0027t not affect the sample timestamp,"},{"line_number":458,"context_line":"          but create a new series every time."},{"line_number":459,"context_line":"        :param inc_factor: factor used when calculating the"}],"source_content_type":"text/x-python","patch_set":5,"id":"8598d32e_d7b6261d","line":456,"updated":"2025-02-20 13:42:30.000000000","message":"hey? not sure what is meant to say","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"ff593a540d90e24d949278b8f50dea2a1e8414d5","unresolved":true,"context_lines":[{"line_number":453,"context_line":"        :param interval_sec: seconds between each generated"},{"line_number":454,"context_line":"          sample."},{"line_number":455,"context_line":"        :param add_unique_label: when set to True, a label"},{"line_number":456,"context_line":"          with the hey \u0027orig_timestamp\u0027 will be added with to"},{"line_number":457,"context_line":"          all samples. Doesn\u0027t not affect the sample timestamp,"},{"line_number":458,"context_line":"          but create a new series every time."},{"line_number":459,"context_line":"        :param inc_factor: factor used when calculating the"}],"source_content_type":"text/x-python","patch_set":5,"id":"6b14ebdf_ad3ad1d9","line":456,"in_reply_to":"8598d32e_d7b6261d","updated":"2025-02-20 14:57:50.000000000","message":"yeah, it is confusing and I will rewrite it. thanks","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"c3d70c4076ef532cb207cee13a6419ec74d9884b","unresolved":true,"context_lines":[{"line_number":454,"context_line":"          sample."},{"line_number":455,"context_line":"        :param add_unique_label: when set to True, a label"},{"line_number":456,"context_line":"          with the hey \u0027orig_timestamp\u0027 will be added with to"},{"line_number":457,"context_line":"          all samples. Doesn\u0027t not affect the sample timestamp,"},{"line_number":458,"context_line":"          but create a new series every time."},{"line_number":459,"context_line":"        :param inc_factor: factor used when calculating the"},{"line_number":460,"context_line":"          value of a sample, which is a factor of the sample\u0027s"}],"source_content_type":"text/x-python","patch_set":5,"id":"037e7333_b3ab778d","line":457,"updated":"2025-02-20 13:42:30.000000000","message":"is the double negative intended here?","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":34452,"name":"Joan Gilabert","display_name":"jgilaber","email":"jgilaber@redhat.com","username":"jgilaber"},"change_message_id":"c3d70c4076ef532cb207cee13a6419ec74d9884b","unresolved":true,"context_lines":[{"line_number":464,"context_line":""},{"line_number":465,"context_line":"        :return: String with all samples for a given metric."},{"line_number":466,"context_line":"        \"\"\""},{"line_number":467,"context_line":"        # timestamp needs to be in microseconds"},{"line_number":468,"context_line":"        ts_now_ms \u003d int(datetime.now().timestamp())*1000"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"        # NOTE(dviroel): by including a unique label value, we avoid the"}],"source_content_type":"text/x-python","patch_set":5,"id":"4151debb_ad22b104","line":467,"updated":"2025-02-20 13:42:30.000000000","message":"is the returned timestamp in microseconds or milliseconds? I think the timestamp is return in seconds, so this would be in milliseconds","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"ff593a540d90e24d949278b8f50dea2a1e8414d5","unresolved":true,"context_lines":[{"line_number":464,"context_line":""},{"line_number":465,"context_line":"        :return: String with all samples for a given metric."},{"line_number":466,"context_line":"        \"\"\""},{"line_number":467,"context_line":"        # timestamp needs to be in microseconds"},{"line_number":468,"context_line":"        ts_now_ms \u003d int(datetime.now().timestamp())*1000"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"        # NOTE(dviroel): by including a unique label value, we avoid the"}],"source_content_type":"text/x-python","patch_set":5,"id":"84a0f4ce_cc4bb3a2","line":467,"in_reply_to":"4151debb_ad22b104","updated":"2025-02-20 14:57:50.000000000","message":"correct, it is miliseconds, the comment is not correct. Thanks.","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"1178a811d049299ee40f29da9643ba772b660ef1","unresolved":true,"context_lines":[{"line_number":479,"context_line":"            str_labels \u003d json.dumps(labels, separators\u003d(\u0027,\u0027, \u0027\u003d\u0027))"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        # timestamp is in ns"},{"line_number":482,"context_line":"        step_ns \u003d interval_secs * 100"},{"line_number":483,"context_line":"        data \u003d \u0027# TYPE %s %s\\n\u0027 % (metric_name, metric_type)"},{"line_number":484,"context_line":"        # generate \u0027count\u0027 samples with incremental values"},{"line_number":485,"context_line":"        # samples need to be ordered by their timestamp"}],"source_content_type":"text/x-python","patch_set":5,"id":"48370efa_954f0aae","line":482,"range":{"start_line":482,"start_character":8,"end_line":482,"end_character":37},"updated":"2025-02-20 14:35:34.000000000","message":"What unit this should be? interval_secs * 100 is centiseconds.","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"ff593a540d90e24d949278b8f50dea2a1e8414d5","unresolved":true,"context_lines":[{"line_number":479,"context_line":"            str_labels \u003d json.dumps(labels, separators\u003d(\u0027,\u0027, \u0027\u003d\u0027))"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        # timestamp is in ns"},{"line_number":482,"context_line":"        step_ns \u003d interval_secs * 100"},{"line_number":483,"context_line":"        data \u003d \u0027# TYPE %s %s\\n\u0027 % (metric_name, metric_type)"},{"line_number":484,"context_line":"        # generate \u0027count\u0027 samples with incremental values"},{"line_number":485,"context_line":"        # samples need to be ordered by their timestamp"}],"source_content_type":"text/x-python","patch_set":5,"id":"6cc6bcc4_6fd56cf6","line":482,"range":{"start_line":482,"start_character":34,"end_line":482,"end_character":37},"updated":"2025-02-20 14:57:50.000000000","message":"ops, needs to be 1000\nand it is ms not ns.","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"e5a338371153372136434791464faaafefb909f0","unresolved":true,"context_lines":[{"line_number":479,"context_line":"            str_labels \u003d json.dumps(labels, separators\u003d(\u0027,\u0027, \u0027\u003d\u0027))"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        # timestamp is in ns"},{"line_number":482,"context_line":"        step_ns \u003d interval_secs * 100"},{"line_number":483,"context_line":"        data \u003d \u0027# TYPE %s %s\\n\u0027 % (metric_name, metric_type)"},{"line_number":484,"context_line":"        # generate \u0027count\u0027 samples with incremental values"},{"line_number":485,"context_line":"        # samples need to be ordered by their timestamp"}],"source_content_type":"text/x-python","patch_set":5,"id":"a68269cd_4e950f4a","line":482,"range":{"start_line":482,"start_character":8,"end_line":482,"end_character":37},"in_reply_to":"48370efa_954f0aae","updated":"2025-02-20 15:00:17.000000000","message":"correct, i will fix in the next ps","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"1178a811d049299ee40f29da9643ba772b660ef1","unresolved":true,"context_lines":[{"line_number":521,"context_line":"            host_labels \u003d {"},{"line_number":522,"context_line":"                # TODO(dviroel): some targets may use their IP"},{"line_number":523,"context_line":"                # instead. We would need to query prometheus about"},{"line_number":524,"context_line":"                # targets and check fqdn label"},{"line_number":525,"context_line":"                \"instance\": h[\u0027hypervisor_hostname\u0027] + \":9100\","},{"line_number":526,"context_line":"                \"mode\": \"idle\","},{"line_number":527,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":5,"id":"cd5bf8f5_41546517","line":524,"updated":"2025-02-20 14:35:34.000000000","message":"By default, the prometheus datastore will look for a label \u0027fqdn\u0027 to be equal to  the hypervisor_hostname. I\u0027d suggest to add it.","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"e5a338371153372136434791464faaafefb909f0","unresolved":true,"context_lines":[{"line_number":521,"context_line":"            host_labels \u003d {"},{"line_number":522,"context_line":"                # TODO(dviroel): some targets may use their IP"},{"line_number":523,"context_line":"                # instead. We would need to query prometheus about"},{"line_number":524,"context_line":"                # targets and check fqdn label"},{"line_number":525,"context_line":"                \"instance\": h[\u0027hypervisor_hostname\u0027] + \":9100\","},{"line_number":526,"context_line":"                \"mode\": \"idle\","},{"line_number":527,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":5,"id":"ee2e1903_438582ae","line":524,"in_reply_to":"cd5bf8f5_41546517","updated":"2025-02-20 15:00:17.000000000","message":"yes, the right thing to do is to create the mapping, but I don\u0027t think I can have this info with promtool, so I would need to query prometheus directly","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"185a95b223b033232fa81a806307225e912d4814","unresolved":true,"context_lines":[{"line_number":521,"context_line":"            host_labels \u003d {"},{"line_number":522,"context_line":"                # TODO(dviroel): some targets may use their IP"},{"line_number":523,"context_line":"                # instead. We would need to query prometheus about"},{"line_number":524,"context_line":"                # targets and check fqdn label"},{"line_number":525,"context_line":"                \"instance\": h[\u0027hypervisor_hostname\u0027] + \":9100\","},{"line_number":526,"context_line":"                \"mode\": \"idle\","},{"line_number":527,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":5,"id":"7fbfa8d4_69a90dc9","line":524,"in_reply_to":"ebaa088b_2547d98d","updated":"2025-02-20 17:07:35.000000000","message":"is is not required by the datasource query[1], but I think that makes sense to include, since it is also going to be added in a real environment.\nThe \u0027fqdn to instance\u0027 mapping uses info from \"targets?state\u003dactive\" endpoint,which is not implemented here. For this change, and testing in devstack, it is considered that the environment will use the localhost instead of the IP.[2]\n\n[1] https://github.com/openstack/watcher/blob/7fcca0cc469b89957fd3821c72c3bb2d167a23ba/watcher/decision_engine/datasources/prometheus.py#L310-L311\n[2] https://github.com/openstack/watcher/blob/7fcca0cc469b89957fd3821c72c3bb2d167a23ba/playbooks/templates/prometheus.yml.j2#L9","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"b788b23b51131f28dcb67f2c5502b486e1ec3739","unresolved":true,"context_lines":[{"line_number":521,"context_line":"            host_labels \u003d {"},{"line_number":522,"context_line":"                # TODO(dviroel): some targets may use their IP"},{"line_number":523,"context_line":"                # instead. We would need to query prometheus about"},{"line_number":524,"context_line":"                # targets and check fqdn label"},{"line_number":525,"context_line":"                \"instance\": h[\u0027hypervisor_hostname\u0027] + \":9100\","},{"line_number":526,"context_line":"                \"mode\": \"idle\","},{"line_number":527,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":5,"id":"ebaa088b_2547d98d","line":524,"in_reply_to":"ee2e1903_438582ae","updated":"2025-02-20 15:20:22.000000000","message":"I\u0027m not sure, I\u0027m following the problem. What i mean is that we should also add to this dict:\n\n\u0027fqdn\u0027: h[\u0027hypervisor_hostname\u0027]\n\nI think that\u0027s all we need?","commit_id":"a372bfb8da064588d44b41b2e7d6edcb1caa9ed6"},{"author":{"_account_id":9976,"name":"Ronelle Landy","email":"rlandy@redhat.com","username":"rlandy"},"change_message_id":"22203e802992816d034a9e395e74a27ff7f2faac","unresolved":true,"context_lines":[{"line_number":324,"context_line":"          in the configured datasource."},{"line_number":325,"context_line":"        \"\"\""},{"line_number":326,"context_line":"        # data sources that support fake metrics"},{"line_number":327,"context_line":"        if CONF.optimize.datasource \u003d\u003d \"gnocchi\":"},{"line_number":328,"context_line":"            self.make_host_statistic_gnocchi(metrics)"},{"line_number":329,"context_line":"        elif CONF.optimize.datasource \u003d\u003d \"prometheus\":"},{"line_number":330,"context_line":"            self.make_host_statistic_prometheus()"}],"source_content_type":"text/x-python","patch_set":8,"id":"0ba4b103_07151540","line":327,"updated":"2025-02-26 15:55:33.000000000","message":"Passing an empty string for the datasource is still doc\u0027ed as an option. Does the test flow work if an empty string is passed now that the \u0027not\u0027 clause is removed?","commit_id":"ee622e27a4b7d7cffd5fb03ee7a13c083eb039b2"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"a0cc1cb6f7a244705e54669063da2e6f5296a7ac","unresolved":true,"context_lines":[{"line_number":324,"context_line":"          in the configured datasource."},{"line_number":325,"context_line":"        \"\"\""},{"line_number":326,"context_line":"        # data sources that support fake metrics"},{"line_number":327,"context_line":"        if CONF.optimize.datasource \u003d\u003d \"gnocchi\":"},{"line_number":328,"context_line":"            self.make_host_statistic_gnocchi(metrics)"},{"line_number":329,"context_line":"        elif CONF.optimize.datasource \u003d\u003d \"prometheus\":"},{"line_number":330,"context_line":"            self.make_host_statistic_prometheus()"}],"source_content_type":"text/x-python","patch_set":8,"id":"4ffcc8fe_75f21a5f","line":327,"in_reply_to":"0ba4b103_07151540","updated":"2025-02-26 19:30:17.000000000","message":"yes, in this case we just don\u0027t add any metrics.","commit_id":"ee622e27a4b7d7cffd5fb03ee7a13c083eb039b2"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"90e5bfaf73314dcb6bf1d804a6d6a92907441944","unresolved":true,"context_lines":[{"line_number":518,"context_line":"    def make_host_statistic_prometheus(self):"},{"line_number":519,"context_line":"        \"\"\"Create host resource and its measures in Prometheus. \"\"\""},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        hypervisors_client \u003d self.mgr.hypervisor_client"},{"line_number":522,"context_line":"        hypervisors \u003d hypervisors_client.list_hypervisors("},{"line_number":523,"context_line":"            detail\u003dTrue)[\u0027hypervisors\u0027]"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        for h in hypervisors:"},{"line_number":526,"context_line":"            host_labels \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffb38f08_76448c34","line":523,"range":{"start_line":521,"start_character":0,"end_line":523,"end_character":39},"updated":"2025-02-24 07:43:13.000000000","message":"Here we define get_hypervisors_setup method. https://opendev.org/openstack/watcher-tempest-plugin/src/branch/master/watcher_tempest_plugin/tests/scenario/base.py#L88\nCan we reuse this same method here like this?:\n\n```suggestion\n        hypervisors \u003d self.get_hypervisors_setup()\n```","commit_id":"ee622e27a4b7d7cffd5fb03ee7a13c083eb039b2"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"e10a063e3489a1edee499f6f52deaa883f6a8214","unresolved":true,"context_lines":[{"line_number":518,"context_line":"    def make_host_statistic_prometheus(self):"},{"line_number":519,"context_line":"        \"\"\"Create host resource and its measures in Prometheus. \"\"\""},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        hypervisors_client \u003d self.mgr.hypervisor_client"},{"line_number":522,"context_line":"        hypervisors \u003d hypervisors_client.list_hypervisors("},{"line_number":523,"context_line":"            detail\u003dTrue)[\u0027hypervisors\u0027]"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        for h in hypervisors:"},{"line_number":526,"context_line":"            host_labels \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"12c1f767_829eda0e","line":523,"range":{"start_line":521,"start_character":0,"end_line":523,"end_character":39},"in_reply_to":"76cba8e7_ef411eb6","updated":"2025-02-25 04:47:58.000000000","message":"thank you!","commit_id":"ee622e27a4b7d7cffd5fb03ee7a13c083eb039b2"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"aaf41fab748fd2e2988cd387c6766a5525284491","unresolved":true,"context_lines":[{"line_number":518,"context_line":"    def make_host_statistic_prometheus(self):"},{"line_number":519,"context_line":"        \"\"\"Create host resource and its measures in Prometheus. \"\"\""},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"        hypervisors_client \u003d self.mgr.hypervisor_client"},{"line_number":522,"context_line":"        hypervisors \u003d hypervisors_client.list_hypervisors("},{"line_number":523,"context_line":"            detail\u003dTrue)[\u0027hypervisors\u0027]"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        for h in hypervisors:"},{"line_number":526,"context_line":"            host_labels \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"76cba8e7_ef411eb6","line":523,"range":{"start_line":521,"start_character":0,"end_line":523,"end_character":39},"in_reply_to":"ffb38f08_76448c34","updated":"2025-02-24 19:37:50.000000000","message":"fixing it in the follow up change: https://review.opendev.org/c/openstack/watcher-tempest-plugin/+/942481/5/watcher_tempest_plugin/tests/scenario/base.py\nIf you agree with that, thanks","commit_id":"ee622e27a4b7d7cffd5fb03ee7a13c083eb039b2"}]}
