)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"10757822bde74f3f171c507ad6ba47862794b55d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"36f6aaa9_2308ab4a","updated":"2025-01-13 08:26:55.000000000","message":"first pass with some high level comments \nlooks good thanks for getting this started","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"4c59c8cf63d469a48cce847e5a51824e82a5da33","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"0d7949b4_6472e439","updated":"2025-01-10 15:52:17.000000000","message":"recheck","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"360fa4cb31c8f11bac6668039539cac310d4f4bc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"b3038cc1_b92006b4","updated":"2025-01-14 14:01:50.000000000","message":"recheck","commit_id":"a920d8d9e5b31c6981222fb80f67fa090ce4ae0c"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"654379ec4551a9f24ec20040f75946b37bbeb6cf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"62a5d3fd_0303ee14","updated":"2025-01-14 08:52:08.000000000","message":"thanks for updates this is looking good.\ni didn\u0027t stare at the tests long on this pass i\u0027ll be back ;)","commit_id":"a920d8d9e5b31c6981222fb80f67fa090ce4ae0c"},{"author":{"_account_id":32968,"name":"Juan Larriba","email":"jlarriba@redhat.com","username":"jlarriba"},"change_message_id":"a2d7cc1db1182ec890e00bcfd56423dc0e4e5aa9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"2a0decdd_0301999b","updated":"2025-01-15 11:54:35.000000000","message":"I think that the queries for the metrics provide accurate values as they are, I have discussed for some time around them with Alfredo, and they seem to be the most accurate queries according to the tests done.","commit_id":"3ffa726b091db90dbb3eef2a9b01f1441ea99651"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"02a3ea72dd9a61797a3562ebd2511cf02284d428","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"f8531e8d_b562d399","updated":"2025-01-15 14:16:47.000000000","message":"Looks good, how far are we from getting a job testing this code? since with these metrics added, we could run CI with some strategies like Workload stabilization and VM Workload Consolidation Strategy","commit_id":"3ffa726b091db90dbb3eef2a9b01f1441ea99651"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"0299472ef6126e59a0c7c69cb66979b0b5fb77e9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"b91dae72_89ef43df","in_reply_to":"f8531e8d_b562d399","updated":"2025-01-15 14:37:59.000000000","message":"Actually, I\u0027ve done some successful local testing with this patch. WRT the job, I know there is work in progress in tempest plugin to support prometheus as data source. I can not give any ETA for it, maybe @chkumar@redhat.com and @rlandy@redhat.com can give more details.","commit_id":"3ffa726b091db90dbb3eef2a9b01f1441ea99651"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"88769e689b3ed3274e74303e30af1756055aee72","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"cd65cbf9_f1b0052e","updated":"2025-01-20 13:07:28.000000000","message":"Updating my vote to +1, since code looks good and I agree that we can build and test this in a CI job on a follow up change. Thanks Alfredo.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a03d3f89fe8ff46037bd692f4d8afb46f775ceef","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"acadf981_ba86932d","updated":"2025-01-21 20:06:31.000000000","message":"by the way this looks pretty reasonable over all so if you split up the test im pretty happy with this.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"2cdb6252e96536ff77007c2676ecf5903ffb08e8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"d8ab6f56_e636edbb","updated":"2025-01-23 07:51:19.000000000","message":"re-adding +1 but please check minor docs nit @amoralej@redhat.com","commit_id":"1ae5d7f815214f417ee24b4f9ff557216791febe"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"319812cb705d25197ebe0cdfda9a555ecdcba61a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"50effd09_eb3dd3a4","updated":"2025-01-22 16:08:13.000000000","message":"recheck","commit_id":"1ae5d7f815214f417ee24b4f9ff557216791febe"},{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"efce3c7060f4b76568f52a0400d7c87fbce02de6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"c55d01bf_af9f2c64","updated":"2025-01-23 03:38:55.000000000","message":"recheck known issue with strategies tests https://bugs.launchpad.net/watcher-tempest-plugin/+bug/2095416 and https://07ee508b1ec6931ea42a-55c346d8a0a53f06bfa3e84321f61ba5.ssl.cf1.rackcdn.com/938893/10/check/watcher-tempest-strategies/5537332/testr_results.html","commit_id":"1ae5d7f815214f417ee24b4f9ff557216791febe"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7e0d3c3452bf7881d5acce72b59db52f7d5801c6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"d8ab631d_b46cfd6a","updated":"2025-01-23 12:54:07.000000000","message":"ack, this just adresses the comment form marios so this still looks good to me","commit_id":"136e5d927cdff68883675acc9875b4cdab52ffd6"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"744c1830a39c73301919b9c6834e836bd076e4ca","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"60373e33_e4e226a2","updated":"2025-01-27 12:34:00.000000000","message":"recheck","commit_id":"136e5d927cdff68883675acc9875b4cdab52ffd6"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"95a27c444771883cb04a74eb7016f20fadd3a32d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"db72f7a8_fb2afb70","updated":"2025-01-24 12:52:20.000000000","message":"recheck","commit_id":"136e5d927cdff68883675acc9875b4cdab52ffd6"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"9f3b1406cdd2c5ec15a165dfa3e5ec7ac86d59fb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"da8134e1_3b6ed83a","updated":"2025-01-23 12:32:23.000000000","message":"thank you!","commit_id":"136e5d927cdff68883675acc9875b4cdab52ffd6"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"77e213523ab0b92af90255e20ca090d738344842","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"9929cf73_09ce58bd","updated":"2025-02-03 12:27:43.000000000","message":"upgrading my vote\nthank you Alfredo","commit_id":"136e5d927cdff68883675acc9875b4cdab52ffd6"}],"doc/source/datasources/prometheus.rst":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"654379ec4551a9f24ec20040f75946b37bbeb6cf","unresolved":true,"context_lines":[{"line_number":43,"context_line":"     \u0027tria.controlplane.domain\u0027: \u002710.1.2.3:9100\u0027"},{"line_number":44,"context_line":"    }"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"For instance metrics, it is required that Prometheus store contains a label"},{"line_number":47,"context_line":"with the uuid of the OpenStack instance in each relevant metric. By default,"},{"line_number":48,"context_line":"the datasource will look the ``uuid`` in the ``resource`` label although the"},{"line_number":49,"context_line":"name of the key can me customized using the parameter ``instance_uuid_label``."}],"source_content_type":"text/x-rst","patch_set":5,"id":"246099c9_2ea89546","line":46,"range":{"start_line":46,"start_character":53,"end_line":46,"end_character":67},"updated":"2025-01-14 08:52:08.000000000","message":"probably \u0027store\u0027 should be deleted? or make it \u0027stores\u0027 and delete contains","commit_id":"a920d8d9e5b31c6981222fb80f67fa090ce4ae0c"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"4fbb27c58bbe731cc456479cbd686ee6e9f7f7e5","unresolved":false,"context_lines":[{"line_number":43,"context_line":"     \u0027tria.controlplane.domain\u0027: \u002710.1.2.3:9100\u0027"},{"line_number":44,"context_line":"    }"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"For instance metrics, it is required that Prometheus store contains a label"},{"line_number":47,"context_line":"with the uuid of the OpenStack instance in each relevant metric. By default,"},{"line_number":48,"context_line":"the datasource will look the ``uuid`` in the ``resource`` label although the"},{"line_number":49,"context_line":"name of the key can me customized using the parameter ``instance_uuid_label``."}],"source_content_type":"text/x-rst","patch_set":5,"id":"ffa44efb_18558920","line":46,"range":{"start_line":46,"start_character":53,"end_line":46,"end_character":67},"in_reply_to":"246099c9_2ea89546","updated":"2025-01-15 14:54:56.000000000","message":"Done","commit_id":"a920d8d9e5b31c6981222fb80f67fa090ce4ae0c"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"654379ec4551a9f24ec20040f75946b37bbeb6cf","unresolved":true,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"For instance metrics, it is required that Prometheus store contains a label"},{"line_number":47,"context_line":"with the uuid of the OpenStack instance in each relevant metric. By default,"},{"line_number":48,"context_line":"the datasource will look the ``uuid`` in the ``resource`` label although the"},{"line_number":49,"context_line":"name of the key can me customized using the parameter ``instance_uuid_label``."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Limitations"}],"source_content_type":"text/x-rst","patch_set":5,"id":"813fc708_ff231551","line":48,"range":{"start_line":48,"start_character":20,"end_line":48,"end_character":24},"updated":"2025-01-14 08:52:08.000000000","message":"uses the label ``resource``. The ``instance_uuid_label`` config option in\nwatcher.conf allows deployers to override this default to any other label name that stores the ``uuid``.\n\n(just a suggestion)","commit_id":"a920d8d9e5b31c6981222fb80f67fa090ce4ae0c"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"4fbb27c58bbe731cc456479cbd686ee6e9f7f7e5","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"For instance metrics, it is required that Prometheus store contains a label"},{"line_number":47,"context_line":"with the uuid of the OpenStack instance in each relevant metric. By default,"},{"line_number":48,"context_line":"the datasource will look the ``uuid`` in the ``resource`` label although the"},{"line_number":49,"context_line":"name of the key can me customized using the parameter ``instance_uuid_label``."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Limitations"}],"source_content_type":"text/x-rst","patch_set":5,"id":"82d24b3c_ab458770","line":48,"range":{"start_line":48,"start_character":20,"end_line":48,"end_character":24},"in_reply_to":"813fc708_ff231551","updated":"2025-01-15 14:54:56.000000000","message":"Done","commit_id":"a920d8d9e5b31c6981222fb80f67fa090ce4ae0c"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"02a3ea72dd9a61797a3562ebd2511cf02284d428","unresolved":true,"context_lines":[{"line_number":46,"context_line":"For instance metrics, it is required that Prometheus store contains a label"},{"line_number":47,"context_line":"with the uuid of the OpenStack instance in each relevant metric. By default,"},{"line_number":48,"context_line":"the datasource will look the ``uuid`` in the ``resource`` label although the"},{"line_number":49,"context_line":"name of the key can me customized using the parameter ``instance_uuid_label``."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Limitations"},{"line_number":52,"context_line":"-----------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"2f610f31_dea98bc9","line":49,"range":{"start_line":49,"start_character":20,"end_line":49,"end_character":22},"updated":"2025-01-15 14:16:47.000000000","message":"be","commit_id":"a920d8d9e5b31c6981222fb80f67fa090ce4ae0c"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"0299472ef6126e59a0c7c69cb66979b0b5fb77e9","unresolved":false,"context_lines":[{"line_number":46,"context_line":"For instance metrics, it is required that Prometheus store contains a label"},{"line_number":47,"context_line":"with the uuid of the OpenStack instance in each relevant metric. By default,"},{"line_number":48,"context_line":"the datasource will look the ``uuid`` in the ``resource`` label although the"},{"line_number":49,"context_line":"name of the key can me customized using the parameter ``instance_uuid_label``."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"Limitations"},{"line_number":52,"context_line":"-----------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"cd3afc78_aa3d44b1","line":49,"range":{"start_line":49,"start_character":20,"end_line":49,"end_character":22},"in_reply_to":"2f610f31_dea98bc9","updated":"2025-01-15 14:37:59.000000000","message":"Done","commit_id":"a920d8d9e5b31c6981222fb80f67fa090ce4ae0c"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"02a3ea72dd9a61797a3562ebd2511cf02284d428","unresolved":true,"context_lines":[{"line_number":84,"context_line":"added under the ``[prometheus_client]`` section and the available options are"},{"line_number":85,"context_line":"duplicated below from the code as they are self documenting:"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":".. code-block::"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    cfg.StrOpt(\u0027host\u0027,"},{"line_number":90,"context_line":"               help\u003d\"The hostname or IP address for the prometheus server.\"),"}],"source_content_type":"text/x-rst","patch_set":6,"id":"6e2f3243_b6abd956","line":87,"updated":"2025-01-15 14:16:47.000000000","message":"Update with the new configoption: \u0027instance_uuid_label\u0027","commit_id":"3ffa726b091db90dbb3eef2a9b01f1441ea99651"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"0299472ef6126e59a0c7c69cb66979b0b5fb77e9","unresolved":false,"context_lines":[{"line_number":84,"context_line":"added under the ``[prometheus_client]`` section and the available options are"},{"line_number":85,"context_line":"duplicated below from the code as they are self documenting:"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":".. code-block::"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    cfg.StrOpt(\u0027host\u0027,"},{"line_number":90,"context_line":"               help\u003d\"The hostname or IP address for the prometheus server.\"),"}],"source_content_type":"text/x-rst","patch_set":6,"id":"f29cb4f2_ce01be5c","line":87,"in_reply_to":"6e2f3243_b6abd956","updated":"2025-01-15 14:37:59.000000000","message":"Done","commit_id":"3ffa726b091db90dbb3eef2a9b01f1441ea99651"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"b9f66c0a213d09ccf2209a1744a590f399af788d","unresolved":true,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"For instance metrics, it is required that Prometheus contains a label"},{"line_number":47,"context_line":"with the uuid of the OpenStack instance in each relevant metric. By default,"},{"line_number":48,"context_line":"uses the label ``resource``. The ``instance_uuid_label`` config option in"},{"line_number":49,"context_line":"watcher.conf allows deployers to override this default to any other label name"},{"line_number":50,"context_line":"that stores the  ``uuid``."},{"line_number":51,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"b2d358c1_9cbf3075","line":48,"range":{"start_line":48,"start_character":27,"end_line":48,"end_character":28},"updated":"2025-01-16 07:57:02.000000000","message":"By default the datasource will look for the label ``resource``.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"2cdb6252e96536ff77007c2676ecf5903ffb08e8","unresolved":true,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"For instance metrics, it is required that Prometheus contains a label"},{"line_number":47,"context_line":"with the uuid of the OpenStack instance in each relevant metric. By default,"},{"line_number":48,"context_line":"uses the label ``resource``. The ``instance_uuid_label`` config option in"},{"line_number":49,"context_line":"watcher.conf allows deployers to override this default to any other label name"},{"line_number":50,"context_line":"that stores the  ``uuid``."},{"line_number":51,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"eec74b2c_fe87a34a","line":48,"range":{"start_line":48,"start_character":27,"end_line":48,"end_character":28},"in_reply_to":"b2d358c1_9cbf3075","updated":"2025-01-23 07:51:19.000000000","message":"please check @amoralej@redhat.com","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"a5944a1c3aa8177e6d62ae466316e0cfd24369d6","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"For instance metrics, it is required that Prometheus contains a label"},{"line_number":47,"context_line":"with the uuid of the OpenStack instance in each relevant metric. By default,"},{"line_number":48,"context_line":"uses the label ``resource``. The ``instance_uuid_label`` config option in"},{"line_number":49,"context_line":"watcher.conf allows deployers to override this default to any other label name"},{"line_number":50,"context_line":"that stores the  ``uuid``."},{"line_number":51,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"4c7d32a7_97b47335","line":48,"range":{"start_line":48,"start_character":27,"end_line":48,"end_character":28},"in_reply_to":"eec74b2c_fe87a34a","updated":"2025-01-23 12:23:46.000000000","message":"Done","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"}],"watcher/decision_engine/datasources/prometheus.py":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"10757822bde74f3f171c507ad6ba47862794b55d","unresolved":true,"context_lines":[{"line_number":320,"context_line":"            )"},{"line_number":321,"context_line":"        elif meter \u003d\u003d \u0027ceilometer_memory_usage\u0027:"},{"line_number":322,"context_line":"            query_args \u003d ("},{"line_number":323,"context_line":"                \"%s_over_time(%s{resource\u003d\u0027%s\u0027}[%ss])\" %"},{"line_number":324,"context_line":"                (aggregate, meter, instance_label, period)"},{"line_number":325,"context_line":"            )"},{"line_number":326,"context_line":"        elif meter \u003d\u003d \u0027ceilometer_cpu\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"e73571a5_89d9fcac","line":323,"range":{"start_line":323,"start_character":33,"end_line":323,"end_character":41},"updated":"2025-01-13 08:26:55.000000000","message":"as discussed briefly last week we need to document this (\"Requirements\" in https://review.opendev.org/c/openstack/watcher/+/934423/34/doc/source/datasources/prometheus.rst) and we may also want to make this configurable in the same way as the fqdn_label option)","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"d4b9918dd595f9cf6e74c03908d35eed2c8dba58","unresolved":false,"context_lines":[{"line_number":320,"context_line":"            )"},{"line_number":321,"context_line":"        elif meter \u003d\u003d \u0027ceilometer_memory_usage\u0027:"},{"line_number":322,"context_line":"            query_args \u003d ("},{"line_number":323,"context_line":"                \"%s_over_time(%s{resource\u003d\u0027%s\u0027}[%ss])\" %"},{"line_number":324,"context_line":"                (aggregate, meter, instance_label, period)"},{"line_number":325,"context_line":"            )"},{"line_number":326,"context_line":"        elif meter \u003d\u003d \u0027ceilometer_cpu\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"f6f590de_9bfc8f14","line":323,"range":{"start_line":323,"start_character":33,"end_line":323,"end_character":41},"in_reply_to":"e73571a5_89d9fcac","updated":"2025-01-14 08:21:51.000000000","message":"Done","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"10757822bde74f3f171c507ad6ba47862794b55d","unresolved":true,"context_lines":[{"line_number":328,"context_line":"            # percentage so we need to divide between the number of vcpus."},{"line_number":329,"context_line":"            vcpus \u003d resource.vcpus"},{"line_number":330,"context_line":"            if not vcpus:"},{"line_number":331,"context_line":"                LOG.warning(\"instance vcpu count not set, assuming 1\")"},{"line_number":332,"context_line":"                vcpus \u003d 1"},{"line_number":333,"context_line":"            query_args \u003d ("},{"line_number":334,"context_line":"                \"(%s by (instance)(rate(%s{resource\u003d\u0027%s\u0027}[%ss]))/10e+8) \""}],"source_content_type":"text/x-python","patch_set":3,"id":"49bc6423_dcaff574","line":331,"updated":"2025-01-13 08:26:55.000000000","message":"can we include the instance ID here too so we know which vm we are dealing with","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"d4b9918dd595f9cf6e74c03908d35eed2c8dba58","unresolved":false,"context_lines":[{"line_number":328,"context_line":"            # percentage so we need to divide between the number of vcpus."},{"line_number":329,"context_line":"            vcpus \u003d resource.vcpus"},{"line_number":330,"context_line":"            if not vcpus:"},{"line_number":331,"context_line":"                LOG.warning(\"instance vcpu count not set, assuming 1\")"},{"line_number":332,"context_line":"                vcpus \u003d 1"},{"line_number":333,"context_line":"            query_args \u003d ("},{"line_number":334,"context_line":"                \"(%s by (instance)(rate(%s{resource\u003d\u0027%s\u0027}[%ss]))/10e+8) \""}],"source_content_type":"text/x-python","patch_set":3,"id":"c089386c_3254da29","line":331,"in_reply_to":"49bc6423_dcaff574","updated":"2025-01-14 08:21:51.000000000","message":"Done","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"10757822bde74f3f171c507ad6ba47862794b55d","unresolved":true,"context_lines":[{"line_number":385,"context_line":""},{"line_number":386,"context_line":"        # For instance resource type, the datasource expects the uuid of the"},{"line_number":387,"context_line":"        # instance to be assigned to a label in the prometheus metrics, with a"},{"line_number":388,"context_line":"        # specific key value."},{"line_number":389,"context_line":"        if resource_type \u003d\u003d \u0027compute_node\u0027:"},{"line_number":390,"context_line":"            instance_label \u003d self._resolve_prometheus_instance_label("},{"line_number":391,"context_line":"                resource.hostname)"}],"source_content_type":"text/x-python","patch_set":3,"id":"b3f2e2e9_36d426f3","line":388,"updated":"2025-01-13 08:26:55.000000000","message":"as noted above lets expand on this in the datasource doc and consider making it a configurable label name","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"d4b9918dd595f9cf6e74c03908d35eed2c8dba58","unresolved":false,"context_lines":[{"line_number":385,"context_line":""},{"line_number":386,"context_line":"        # For instance resource type, the datasource expects the uuid of the"},{"line_number":387,"context_line":"        # instance to be assigned to a label in the prometheus metrics, with a"},{"line_number":388,"context_line":"        # specific key value."},{"line_number":389,"context_line":"        if resource_type \u003d\u003d \u0027compute_node\u0027:"},{"line_number":390,"context_line":"            instance_label \u003d self._resolve_prometheus_instance_label("},{"line_number":391,"context_line":"                resource.hostname)"}],"source_content_type":"text/x-python","patch_set":3,"id":"6559a2d1_06426f7d","line":388,"in_reply_to":"b3f2e2e9_36d426f3","updated":"2025-01-14 08:21:51.000000000","message":"Done","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"10757822bde74f3f171c507ad6ba47862794b55d","unresolved":true,"context_lines":[{"line_number":391,"context_line":"                resource.hostname)"},{"line_number":392,"context_line":"        elif resource_type \u003d\u003d \u0027instance\u0027:"},{"line_number":393,"context_line":"            instance_label \u003d resource.uuid"},{"line_number":394,"context_line":"            # For ram_allecated and rood_disk size metrics there are no valid"},{"line_number":395,"context_line":"            # values in the prometheus backend store. We rely in the values"},{"line_number":396,"context_line":"            # provided in the vms inventory."},{"line_number":397,"context_line":"            if meter \u003d\u003d \u0027instance.memory\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"b355d555_31b1ea57","line":394,"updated":"2025-01-13 08:26:55.000000000","message":"allocated/root_disk","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"d4b9918dd595f9cf6e74c03908d35eed2c8dba58","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                resource.hostname)"},{"line_number":392,"context_line":"        elif resource_type \u003d\u003d \u0027instance\u0027:"},{"line_number":393,"context_line":"            instance_label \u003d resource.uuid"},{"line_number":394,"context_line":"            # For ram_allecated and rood_disk size metrics there are no valid"},{"line_number":395,"context_line":"            # values in the prometheus backend store. We rely in the values"},{"line_number":396,"context_line":"            # provided in the vms inventory."},{"line_number":397,"context_line":"            if meter \u003d\u003d \u0027instance.memory\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"98340c2a_c91274de","line":394,"in_reply_to":"b355d555_31b1ea57","updated":"2025-01-14 08:21:51.000000000","message":"Done","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"10757822bde74f3f171c507ad6ba47862794b55d","unresolved":true,"context_lines":[{"line_number":407,"context_line":""},{"line_number":408,"context_line":"        promql_aggregate \u003d self._resolve_prometheus_aggregate(aggregate, meter)"},{"line_number":409,"context_line":"        query_args \u003d self._build_prometheus_query("},{"line_number":410,"context_line":"            promql_aggregate, meter, instance_label, period, resource"},{"line_number":411,"context_line":"        )"},{"line_number":412,"context_line":"        if not query_args:"},{"line_number":413,"context_line":"            LOG.error(\"Cannot proceed without valid prometheus query\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"a0066202_26f72a72","line":410,"updated":"2025-01-13 08:26:55.000000000","message":"i think you\u0027re only accessing resource.vcpus in the called _build_prometheus_query\nshould we just pass that instead of the resource?","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"28c04db3cde29169fb50482da22d4aea5d8b060a","unresolved":true,"context_lines":[{"line_number":407,"context_line":""},{"line_number":408,"context_line":"        promql_aggregate \u003d self._resolve_prometheus_aggregate(aggregate, meter)"},{"line_number":409,"context_line":"        query_args \u003d self._build_prometheus_query("},{"line_number":410,"context_line":"            promql_aggregate, meter, instance_label, period, resource"},{"line_number":411,"context_line":"        )"},{"line_number":412,"context_line":"        if not query_args:"},{"line_number":413,"context_line":"            LOG.error(\"Cannot proceed without valid prometheus query\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"d9327f2f_122915b8","line":410,"in_reply_to":"a0066202_26f72a72","updated":"2025-01-13 13:16:49.000000000","message":"I think passing the resource we are more ready for future requirements if something new appears. Said so, if you prefer to just send the vcpus, I can do it.","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"654379ec4551a9f24ec20040f75946b37bbeb6cf","unresolved":false,"context_lines":[{"line_number":407,"context_line":""},{"line_number":408,"context_line":"        promql_aggregate \u003d self._resolve_prometheus_aggregate(aggregate, meter)"},{"line_number":409,"context_line":"        query_args \u003d self._build_prometheus_query("},{"line_number":410,"context_line":"            promql_aggregate, meter, instance_label, period, resource"},{"line_number":411,"context_line":"        )"},{"line_number":412,"context_line":"        if not query_args:"},{"line_number":413,"context_line":"            LOG.error(\"Cannot proceed without valid prometheus query\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"ae1e7057_078ed02d","line":410,"in_reply_to":"d9327f2f_122915b8","updated":"2025-01-14 08:52:08.000000000","message":"thanks for confirming. in general i tend to avoid doing things \u0027in case useful in future\u0027 but in this case i agree it \u0027could be\u0027 ;) so... i\u0027m fine leaving it like this unless there are other strong opinions... marking resolved from my side","commit_id":"d1f5e8a4c1ce81b27bbd4e0834a14f66aa679e4c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":40,"context_line":"                      host_power\u003dNone,"},{"line_number":41,"context_line":"                      instance_cpu_usage\u003d\u0027ceilometer_cpu\u0027,"},{"line_number":42,"context_line":"                      instance_ram_usage\u003d\u0027ceilometer_memory_usage\u0027,"},{"line_number":43,"context_line":"                      instance_ram_allocated\u003d\u0027instance.memory\u0027,"},{"line_number":44,"context_line":"                      instance_l3_cache_usage\u003dNone,"},{"line_number":45,"context_line":"                      instance_root_disk_size\u003d\u0027instance.disk\u0027,"},{"line_number":46,"context_line":"                      )"}],"source_content_type":"text/x-python","patch_set":9,"id":"7822384f_59de02a2","line":43,"range":{"start_line":43,"start_character":44,"end_line":43,"end_character":63},"updated":"2025-01-21 20:05:18.000000000","message":"i tought all the megrics provided by sgcore had a ceilometer_ prefix added.\nare we shour this is correct?it would have been nice to have a comment explain why this is instance.* here rather then below but i guess its ok.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"319812cb705d25197ebe0cdfda9a555ecdcba61a","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                      host_power\u003dNone,"},{"line_number":41,"context_line":"                      instance_cpu_usage\u003d\u0027ceilometer_cpu\u0027,"},{"line_number":42,"context_line":"                      instance_ram_usage\u003d\u0027ceilometer_memory_usage\u0027,"},{"line_number":43,"context_line":"                      instance_ram_allocated\u003d\u0027instance.memory\u0027,"},{"line_number":44,"context_line":"                      instance_l3_cache_usage\u003dNone,"},{"line_number":45,"context_line":"                      instance_root_disk_size\u003d\u0027instance.disk\u0027,"},{"line_number":46,"context_line":"                      )"}],"source_content_type":"text/x-python","patch_set":9,"id":"b0019d7c_13590891","line":43,"range":{"start_line":43,"start_character":44,"end_line":43,"end_character":63},"in_reply_to":"7822384f_59de02a2","updated":"2025-01-22 16:08:13.000000000","message":"that\u0027s because we are not taking it from the prometheus metrics but from the instance.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0772a3ea077aff4961f93b14b2096495baaddc0c","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                      host_power\u003dNone,"},{"line_number":41,"context_line":"                      instance_cpu_usage\u003d\u0027ceilometer_cpu\u0027,"},{"line_number":42,"context_line":"                      instance_ram_usage\u003d\u0027ceilometer_memory_usage\u0027,"},{"line_number":43,"context_line":"                      instance_ram_allocated\u003d\u0027instance.memory\u0027,"},{"line_number":44,"context_line":"                      instance_l3_cache_usage\u003dNone,"},{"line_number":45,"context_line":"                      instance_root_disk_size\u003d\u0027instance.disk\u0027,"},{"line_number":46,"context_line":"                      )"}],"source_content_type":"text/x-python","patch_set":9,"id":"b5b5024f_d6502bc5","line":43,"range":{"start_line":43,"start_character":44,"end_line":43,"end_character":63},"in_reply_to":"7822384f_59de02a2","updated":"2025-01-22 13:32:37.000000000","message":"we can ignore this. it was a little confusion no the inital review but you have a code comemtn later so its fine to proceed with.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":257,"context_line":"            )"},{"line_number":258,"context_line":"        return promql_aggregate"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def _build_prometheus_query(self, aggregate, meter, instance_label,"},{"line_number":261,"context_line":"                                period, resource\u003dNone):"},{"line_number":262,"context_line":"        \"\"\"Build and return the prometheus query string with the given args"},{"line_number":263,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"54413e74_75bb6c8e","line":260,"range":{"start_line":260,"start_character":8,"end_line":260,"end_character":31},"updated":"2025-01-21 20:05:18.000000000","message":"when i originally as for this to be factored out i was expecting this to use a map of meter to query or a function per type.\n\ni think this is ok with the limited number of meter we have today but if we keep adding more we shoudl likely refactor this.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"b9f66c0a213d09ccf2209a1744a590f399af788d","unresolved":false,"context_lines":[{"line_number":342,"context_line":"                \"*(100/%s), 100)\" %"},{"line_number":343,"context_line":"                (aggregate, meter, uuid_label_key, instance_label, period,"},{"line_number":344,"context_line":"                 vcpus)"},{"line_number":345,"context_line":"            )"},{"line_number":346,"context_line":"        else:"},{"line_number":347,"context_line":"            raise exception.InvalidParameter("},{"line_number":348,"context_line":"                message\u003d(_(\"Cannot process prometheus meter %s\") % meter)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bc5c6048_9dc90e7d","line":345,"updated":"2025-01-16 07:57:02.000000000","message":"had to go lookup that up, link in case useful for others https://prometheus.io/docs/prometheus/latest/querying/functions/#clamp_max","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":false,"context_lines":[{"line_number":342,"context_line":"                \"*(100/%s), 100)\" %"},{"line_number":343,"context_line":"                (aggregate, meter, uuid_label_key, instance_label, period,"},{"line_number":344,"context_line":"                 vcpus)"},{"line_number":345,"context_line":"            )"},{"line_number":346,"context_line":"        else:"},{"line_number":347,"context_line":"            raise exception.InvalidParameter("},{"line_number":348,"context_line":"                message\u003d(_(\"Cannot process prometheus meter %s\") % meter)"}],"source_content_type":"text/x-python","patch_set":9,"id":"70a0df03_dbc79d2a","line":345,"in_reply_to":"bc5c6048_9dc90e7d","updated":"2025-01-21 20:05:18.000000000","message":"clamp_max(v instant-vector, max scalar) clamps the sample values of all elements in v to have an upper limit of max.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":false,"context_lines":[{"line_number":398,"context_line":"            instance_label \u003d self._resolve_prometheus_instance_label("},{"line_number":399,"context_line":"                resource.hostname)"},{"line_number":400,"context_line":"        elif resource_type \u003d\u003d \u0027instance\u0027:"},{"line_number":401,"context_line":"            instance_label \u003d resource.uuid"},{"line_number":402,"context_line":"            # For ram_allocated and root_disk size metrics there are no valid"},{"line_number":403,"context_line":"            # values in the prometheus backend store. We rely in the values"},{"line_number":404,"context_line":"            # provided in the vms inventory."}],"source_content_type":"text/x-python","patch_set":9,"id":"1cf0232f_0e4de57f","line":401,"range":{"start_line":401,"start_character":29,"end_line":401,"end_character":37},"updated":"2025-01-21 20:05:18.000000000","message":"i guess resource in the case of a vm is build form the nova api\nvia this https://github.com/openstack/watcher/blob/master/watcher/decision_engine/model/collector/nova.py#L428-L454\nas part of the NovaClusterDataModelCollector\n\nits a obejct of the Instance(compute_resource.ComputeResource) https://github.com/openstack/watcher/blob/master/watcher/decision_engine/model/element/instance.py#L43-L60\n\nso yes the memory, uuid and disk should always be present as this i s guraded by the resource_type \u003d\u003d \u0027instance\u0027 check.\n\nthis is another example fo wehre i think the existing api is not ideal but this is concentent with how its used today.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":false,"context_lines":[{"line_number":405,"context_line":"            if meter \u003d\u003d \u0027instance.memory\u0027:"},{"line_number":406,"context_line":"                return float(resource.memory)"},{"line_number":407,"context_line":"            elif meter \u003d\u003d \u0027instance.disk\u0027:"},{"line_number":408,"context_line":"                return float(resource.disk)"},{"line_number":409,"context_line":"        else:"},{"line_number":410,"context_line":"            LOG.warning("},{"line_number":411,"context_line":"                \"Prometheus data source does not currently support \""}],"source_content_type":"text/x-python","patch_set":9,"id":"8aa0541f_72d91541","line":408,"updated":"2025-01-21 20:05:18.000000000","message":"oh ok i see\n\nwe are taking these form the instance.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"319812cb705d25197ebe0cdfda9a555ecdcba61a","unresolved":false,"context_lines":[{"line_number":405,"context_line":"            if meter \u003d\u003d \u0027instance.memory\u0027:"},{"line_number":406,"context_line":"                return float(resource.memory)"},{"line_number":407,"context_line":"            elif meter \u003d\u003d \u0027instance.disk\u0027:"},{"line_number":408,"context_line":"                return float(resource.disk)"},{"line_number":409,"context_line":"        else:"},{"line_number":410,"context_line":"            LOG.warning("},{"line_number":411,"context_line":"                \"Prometheus data source does not currently support \""}],"source_content_type":"text/x-python","patch_set":9,"id":"f6b5b5a6_c9dd56c4","line":408,"in_reply_to":"8aa0541f_72d91541","updated":"2025-01-22 16:08:13.000000000","message":"exactly 😊","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"}],"watcher/tests/decision_engine/datasources/test_prometheus_helper.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    @mock.patch.object(prometheus_client.PrometheusAPIClient, \u0027query\u0027)"},{"line_number":148,"context_line":"    @mock.patch.object(prometheus_client.PrometheusAPIClient, \u0027_get\u0027)"},{"line_number":149,"context_line":"    def test_get_instance_metrics(self, mock_prometheus_get,"},{"line_number":150,"context_line":"                                  mock_prometheus_query):"},{"line_number":151,"context_line":"        mock_instance \u003d mock.Mock("},{"line_number":152,"context_line":"            uuid\u003d\u0027uuid-0\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"694ed89c_8c643520","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":33},"updated":"2025-01-21 20:05:18.000000000","message":"if you want ot have a single function test mulitle value  you syould use ddt\n\nlike this https://github.com/openstack/nova/blob/3d21445b73c2cbe044d6086c2e9d8f276c2c736d/nova/tests/unit/api/openstack/compute/test_shelve.py#L33-L59\n\notherwise we shoudl test one function per unit test.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0772a3ea077aff4961f93b14b2096495baaddc0c","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    @mock.patch.object(prometheus_client.PrometheusAPIClient, \u0027query\u0027)"},{"line_number":148,"context_line":"    @mock.patch.object(prometheus_client.PrometheusAPIClient, \u0027_get\u0027)"},{"line_number":149,"context_line":"    def test_get_instance_metrics(self, mock_prometheus_get,"},{"line_number":150,"context_line":"                                  mock_prometheus_query):"},{"line_number":151,"context_line":"        mock_instance \u003d mock.Mock("},{"line_number":152,"context_line":"            uuid\u003d\u0027uuid-0\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bd2ed16a_00c99a1d","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":33},"in_reply_to":"694ed89c_8c643520","updated":"2025-01-22 13:32:37.000000000","message":"Acknowledged","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        cpu_usage \u003d helper.get_instance_cpu_usage(mock_instance)"},{"line_number":169,"context_line":"        self.assertIsInstance(cpu_usage, float)"},{"line_number":170,"context_line":"        self.assertEqual(expected_cpu_usage, cpu_usage)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        mock_prom_metric \u003d mock.Mock("},{"line_number":173,"context_line":"            labels\u003d{\u0027resource\u0027: \u0027uuid-0\u0027},"}],"source_content_type":"text/x-python","patch_set":9,"id":"4a7f0084_a455739b","line":170,"updated":"2025-01-21 20:05:18.000000000","message":"so this is one test","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0772a3ea077aff4961f93b14b2096495baaddc0c","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        cpu_usage \u003d helper.get_instance_cpu_usage(mock_instance)"},{"line_number":169,"context_line":"        self.assertIsInstance(cpu_usage, float)"},{"line_number":170,"context_line":"        self.assertEqual(expected_cpu_usage, cpu_usage)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        mock_prom_metric \u003d mock.Mock("},{"line_number":173,"context_line":"            labels\u003d{\u0027resource\u0027: \u0027uuid-0\u0027},"}],"source_content_type":"text/x-python","patch_set":9,"id":"5c5ba064_51c34df3","line":170,"in_reply_to":"4a7f0084_a455739b","updated":"2025-01-22 13:32:37.000000000","message":"Done","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":175,"context_line":"            value\u003dexpected_ram_usage"},{"line_number":176,"context_line":"        )"},{"line_number":177,"context_line":"        mock_prometheus_query.return_value \u003d [mock_prom_metric]"},{"line_number":178,"context_line":"        ram_usage \u003d helper.get_instance_ram_usage(mock_instance,"},{"line_number":179,"context_line":"                                                  period\u003d222,"},{"line_number":180,"context_line":"                                                  aggregate\u003d\"max\","},{"line_number":181,"context_line":"                                                  granularity\u003d200)"},{"line_number":182,"context_line":"        self.assertIsInstance(ram_usage, float)"},{"line_number":183,"context_line":"        self.assertEqual(expected_ram_usage, ram_usage)"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"376ff95d_0710012d","line":181,"range":{"start_line":178,"start_character":8,"end_line":181,"end_character":66},"updated":"2025-01-21 20:05:18.000000000","message":"while this is allwoed by pep8 i would prefer if we avoided this style\n\n```suggestion\n        ram_usage \u003d helper.get_instance_ram_usage(\n            mock_instance, period\u003d222, aggregate\u003d\"max\",\n            granularity\u003d200)\n```\n\nthat is a lot simpler to read. and imporatnly it wastes less virtical space makign it simpler to keep the entire function in view.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0772a3ea077aff4961f93b14b2096495baaddc0c","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            value\u003dexpected_ram_usage"},{"line_number":176,"context_line":"        )"},{"line_number":177,"context_line":"        mock_prometheus_query.return_value \u003d [mock_prom_metric]"},{"line_number":178,"context_line":"        ram_usage \u003d helper.get_instance_ram_usage(mock_instance,"},{"line_number":179,"context_line":"                                                  period\u003d222,"},{"line_number":180,"context_line":"                                                  aggregate\u003d\"max\","},{"line_number":181,"context_line":"                                                  granularity\u003d200)"},{"line_number":182,"context_line":"        self.assertIsInstance(ram_usage, float)"},{"line_number":183,"context_line":"        self.assertEqual(expected_ram_usage, ram_usage)"},{"line_number":184,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7c7522c9_ebbb084e","line":181,"range":{"start_line":178,"start_character":8,"end_line":181,"end_character":66},"in_reply_to":"376ff95d_0710012d","updated":"2025-01-22 13:32:37.000000000","message":"Done","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":180,"context_line":"                                                  aggregate\u003d\"max\","},{"line_number":181,"context_line":"                                                  granularity\u003d200)"},{"line_number":182,"context_line":"        self.assertIsInstance(ram_usage, float)"},{"line_number":183,"context_line":"        self.assertEqual(expected_ram_usage, ram_usage)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        ram_allocated \u003d helper.get_instance_ram_allocated(mock_instance,"},{"line_number":186,"context_line":"                                                          period\u003d222,"}],"source_content_type":"text/x-python","patch_set":9,"id":"047b1088_074184cb","line":183,"updated":"2025-01-21 20:05:18.000000000","message":"this is the secodn test","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0772a3ea077aff4961f93b14b2096495baaddc0c","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                                                  aggregate\u003d\"max\","},{"line_number":181,"context_line":"                                                  granularity\u003d200)"},{"line_number":182,"context_line":"        self.assertIsInstance(ram_usage, float)"},{"line_number":183,"context_line":"        self.assertEqual(expected_ram_usage, ram_usage)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        ram_allocated \u003d helper.get_instance_ram_allocated(mock_instance,"},{"line_number":186,"context_line":"                                                          period\u003d222,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ab8c818f_3f8bfd74","line":183,"in_reply_to":"047b1088_074184cb","updated":"2025-01-22 13:32:37.000000000","message":"Done","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":187,"context_line":"                                                          aggregate\u003d\"max\")"},{"line_number":188,"context_line":"        self.assertIsInstance(ram_allocated, float)"},{"line_number":189,"context_line":"        self.assertEqual(512, ram_allocated)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        disk_size \u003d helper.get_instance_root_disk_size(mock_instance,"},{"line_number":192,"context_line":"                                                       period\u003d331,"},{"line_number":193,"context_line":"                                                       aggregate\u003d\"avg\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"c37a556a_ce18a834","line":190,"updated":"2025-01-21 20:05:18.000000000","message":"this is the third test","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0772a3ea077aff4961f93b14b2096495baaddc0c","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                                                          aggregate\u003d\"max\")"},{"line_number":188,"context_line":"        self.assertIsInstance(ram_allocated, float)"},{"line_number":189,"context_line":"        self.assertEqual(512, ram_allocated)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        disk_size \u003d helper.get_instance_root_disk_size(mock_instance,"},{"line_number":192,"context_line":"                                                       period\u003d331,"},{"line_number":193,"context_line":"                                                       aggregate\u003d\"avg\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"369bd54c_28937453","line":190,"in_reply_to":"c37a556a_ce18a834","updated":"2025-01-22 13:32:37.000000000","message":"Done","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":193,"context_line":"                                                       aggregate\u003d\"avg\")"},{"line_number":194,"context_line":"        self.assertIsInstance(disk_size, float)"},{"line_number":195,"context_line":"        self.assertEqual(2, disk_size)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    @mock.patch.object(prometheus_client.PrometheusAPIClient, \u0027query\u0027)"},{"line_number":198,"context_line":"    @mock.patch.object(prometheus_client.PrometheusAPIClient, \u0027_get\u0027)"},{"line_number":199,"context_line":"    def test_prometheus_statistic_aggregation_instc(self, mock_prometheus_get,"}],"source_content_type":"text/x-python","patch_set":9,"id":"165edaa0_b8c7d665","line":196,"updated":"2025-01-21 20:05:18.000000000","message":"this is the forth.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0772a3ea077aff4961f93b14b2096495baaddc0c","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                                                       aggregate\u003d\"avg\")"},{"line_number":194,"context_line":"        self.assertIsInstance(disk_size, float)"},{"line_number":195,"context_line":"        self.assertEqual(2, disk_size)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    @mock.patch.object(prometheus_client.PrometheusAPIClient, \u0027query\u0027)"},{"line_number":198,"context_line":"    @mock.patch.object(prometheus_client.PrometheusAPIClient, \u0027_get\u0027)"},{"line_number":199,"context_line":"    def test_prometheus_statistic_aggregation_instc(self, mock_prometheus_get,"}],"source_content_type":"text/x-python","patch_set":9,"id":"fbf7231a_cacaef7a","line":196,"in_reply_to":"165edaa0_b8c7d665","updated":"2025-01-22 13:32:37.000000000","message":"Done","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    @mock.patch.object(prometheus_client.PrometheusAPIClient, \u0027query\u0027)"},{"line_number":198,"context_line":"    @mock.patch.object(prometheus_client.PrometheusAPIClient, \u0027_get\u0027)"},{"line_number":199,"context_line":"    def test_prometheus_statistic_aggregation_instc(self, mock_prometheus_get,"},{"line_number":200,"context_line":"                                                    mock_prometheus_query):"},{"line_number":201,"context_line":"        mock_instance \u003d mock.Mock("},{"line_number":202,"context_line":"            uuid\u003d\u0027uuid-0\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ea122e0d_3d16b2d4","line":199,"updated":"2025-01-21 20:05:18.000000000","message":"same with this you shoudl break this up to teake each if branch in a sperate test.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0772a3ea077aff4961f93b14b2096495baaddc0c","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    @mock.patch.object(prometheus_client.PrometheusAPIClient, \u0027query\u0027)"},{"line_number":198,"context_line":"    @mock.patch.object(prometheus_client.PrometheusAPIClient, \u0027_get\u0027)"},{"line_number":199,"context_line":"    def test_prometheus_statistic_aggregation_instc(self, mock_prometheus_get,"},{"line_number":200,"context_line":"                                                    mock_prometheus_query):"},{"line_number":201,"context_line":"        mock_instance \u003d mock.Mock("},{"line_number":202,"context_line":"            uuid\u003d\u0027uuid-0\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"b2255f8c_7ccf4bc9","line":199,"in_reply_to":"ea122e0d_3d16b2d4","updated":"2025-01-22 13:32:37.000000000","message":"Done","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":228,"context_line":"            \"clamp_max((avg by (instance)(rate(\""},{"line_number":229,"context_line":"            \"ceilometer_cpu{resource\u003d\u0027uuid-0\u0027}[300s]))\""},{"line_number":230,"context_line":"            \"/10e+8) *(100/2), 100)\""},{"line_number":231,"context_line":"        )"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        mock_prom_metric \u003d mock.Mock("},{"line_number":234,"context_line":"            labels\u003d{\u0027resource\u0027: \u0027uuid-0\u0027},"}],"source_content_type":"text/x-python","patch_set":9,"id":"f044aad5_c4fbadfc","line":231,"updated":"2025-01-21 20:05:18.000000000","message":"this i sthe end fo the first test.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0772a3ea077aff4961f93b14b2096495baaddc0c","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            \"clamp_max((avg by (instance)(rate(\""},{"line_number":229,"context_line":"            \"ceilometer_cpu{resource\u003d\u0027uuid-0\u0027}[300s]))\""},{"line_number":230,"context_line":"            \"/10e+8) *(100/2), 100)\""},{"line_number":231,"context_line":"        )"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        mock_prom_metric \u003d mock.Mock("},{"line_number":234,"context_line":"            labels\u003d{\u0027resource\u0027: \u0027uuid-0\u0027},"}],"source_content_type":"text/x-python","patch_set":9,"id":"ab249029_eb8bfdc0","line":231,"in_reply_to":"f044aad5_c4fbadfc","updated":"2025-01-22 13:32:37.000000000","message":"Done","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":249,"context_line":"        mock_prometheus_query.assert_called_with("},{"line_number":250,"context_line":"            \"avg_over_time(ceilometer_memory_usage{resource\u003d\u0027uuid-0\u0027}[300s])\""},{"line_number":251,"context_line":"        )"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        result_disk \u003d helper.statistic_aggregation("},{"line_number":254,"context_line":"            resource\u003dmock_instance,"},{"line_number":255,"context_line":"            resource_type\u003d\u0027instance\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"d1274019_2f38cafd","line":252,"updated":"2025-01-21 20:05:18.000000000","message":"second","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0772a3ea077aff4961f93b14b2096495baaddc0c","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        mock_prometheus_query.assert_called_with("},{"line_number":250,"context_line":"            \"avg_over_time(ceilometer_memory_usage{resource\u003d\u0027uuid-0\u0027}[300s])\""},{"line_number":251,"context_line":"        )"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"        result_disk \u003d helper.statistic_aggregation("},{"line_number":254,"context_line":"            resource\u003dmock_instance,"},{"line_number":255,"context_line":"            resource_type\u003d\u0027instance\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"75032c88_bef7270b","line":252,"in_reply_to":"d1274019_2f38cafd","updated":"2025-01-22 13:32:37.000000000","message":"Done","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":259,"context_line":"            aggregate\u003d\u0027mean\u0027,"},{"line_number":260,"context_line":"        )"},{"line_number":261,"context_line":"        self.assertEqual(2, result_disk)"},{"line_number":262,"context_line":"        self.assertIsInstance(result_disk, float)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        result_memory \u003d helper.statistic_aggregation("},{"line_number":265,"context_line":"            resource\u003dmock_instance,"}],"source_content_type":"text/x-python","patch_set":9,"id":"dc6ce2f8_7fd0bfd3","line":262,"updated":"2025-01-21 20:05:18.000000000","message":"third","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0772a3ea077aff4961f93b14b2096495baaddc0c","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            aggregate\u003d\u0027mean\u0027,"},{"line_number":260,"context_line":"        )"},{"line_number":261,"context_line":"        self.assertEqual(2, result_disk)"},{"line_number":262,"context_line":"        self.assertIsInstance(result_disk, float)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        result_memory \u003d helper.statistic_aggregation("},{"line_number":265,"context_line":"            resource\u003dmock_instance,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5bc4a91c_bd3e48c8","line":262,"in_reply_to":"dc6ce2f8_7fd0bfd3","updated":"2025-01-22 13:32:37.000000000","message":"Done","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"08368fad5de58c8c50d12c4fe80ab3ec2e26fbfb","unresolved":true,"context_lines":[{"line_number":270,"context_line":"            aggregate\u003d\u0027mean\u0027,"},{"line_number":271,"context_line":"        )"},{"line_number":272,"context_line":"        self.assertEqual(512, result_memory)"},{"line_number":273,"context_line":"        self.assertIsInstance(result_memory, float)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def test_statistic_aggregation_metric_unavailable(self):"},{"line_number":276,"context_line":"        self.assertRaisesRegex("}],"source_content_type":"text/x-python","patch_set":9,"id":"09974a1c_0d440d81","line":273,"updated":"2025-01-21 20:05:18.000000000","message":"and final test,\n\nyou can see you naturally added a new line and group the separate tests into paragraphs.","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0772a3ea077aff4961f93b14b2096495baaddc0c","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            aggregate\u003d\u0027mean\u0027,"},{"line_number":271,"context_line":"        )"},{"line_number":272,"context_line":"        self.assertEqual(512, result_memory)"},{"line_number":273,"context_line":"        self.assertIsInstance(result_memory, float)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def test_statistic_aggregation_metric_unavailable(self):"},{"line_number":276,"context_line":"        self.assertRaisesRegex("}],"source_content_type":"text/x-python","patch_set":9,"id":"15b4b60c_2202ec99","line":273,"in_reply_to":"09974a1c_0d440d81","updated":"2025-01-22 13:32:37.000000000","message":"Done","commit_id":"07d1fffb742dd7f41749657e5e6cf345f92bd50e"}]}
