)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"4e902a2ceac8d2f0d04fba93741e29af5418af5e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"32703198_ccb666b6","updated":"2024-11-14 08:30:25.000000000","message":"screenshots in https://imgur.com/a/https-review-opendev-org-c-openstack-watcher-dashboard-935043-bGzx3pn","commit_id":"99ab9870ae338d0be1efa7a75e272d30dc11caf8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4f3aa76738b23dcc330fe4a73d4240dc05a91871","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"b6de68fc_119acbaf","updated":"2024-12-03 01:23:02.000000000","message":"the https://imgur.com/a/https-review-opendev-org-c-openstack-watcher-dashboard-935043-bGzx3pn render looks good to me but some comments inline.","commit_id":"99ab9870ae338d0be1efa7a75e272d30dc11caf8"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"edd58aa498eb8322c32a19a505b1c0cb77d245cc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"baaac46c_b4893c04","updated":"2024-12-10 08:51:27.000000000","message":"Screenshots with latest PS https://imgur.com/a/3UqwUFb","commit_id":"ec7fc510b2d2900a035c8d4ec94d746ec022f294"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"99c39adc5b3dd150d8acefae982416abc98623b9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"59a83ea6_ec72ef69","updated":"2024-12-10 13:24:48.000000000","message":"Updating my vote based on the evidences of multiple global indicators support and also based on the screenshot provided. \nThanks Alfredo!","commit_id":"ec7fc510b2d2900a035c8d4ec94d746ec022f294"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"5612dfef623d1286b7ee22d6e5582361644d581e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"c0a7ead5_3af84c96","updated":"2024-12-11 07:45:57.000000000","message":"re-adding my vote but the patch ontop needs to go first anyway","commit_id":"ec7fc510b2d2900a035c8d4ec94d746ec022f294"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"ae81ffcaecf8ce392c2614d992c751bf1d4efc11","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"8d031105_c0cb73b6","updated":"2024-12-10 09:11:55.000000000","message":"recheck","commit_id":"ec7fc510b2d2900a035c8d4ec94d746ec022f294"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"239eb4e751fe4a6a0c813d5486669287a4fb1756","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"42da26f4_3a63afa9","updated":"2024-12-05 11:02:50.000000000","message":"the -1 is just to make sure that we discuss this before actually merging it.\n\nAnd sorry for being late to the review. But this patch is confusing to me, since as per Documentation[1][2] and code[3], we should expect only one Global Efficacy indicator, which is build based on efficacy indicators. So it is expected to only display a single one. I also see that some strategies are not calculating a global indicator, as per strategies docs[4].\nSo, aren\u0027t we mixing concepts here?\n\n[1] https://docs.openstack.org/watcher/latest/glossary.html#efficacy-definition\n[2] https://docs.openstack.org/watcher/latest/contributor/plugin/goal-plugin.html\n[3] https://github.com/openstack/watcher/blob/master/watcher/decision_engine/goal/efficacy/specs.py\n[4] https://docs.openstack.org/watcher/latest/strategies/host_maintenance.html#efficacy-indicator","commit_id":"ec7fc510b2d2900a035c8d4ec94d746ec022f294"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"68fb6314ba50d4785cc3ea244b9520ecc3beb7ba","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"8b41672f_be7632e9","in_reply_to":"42da26f4_3a63afa9","updated":"2024-12-09 08:09:14.000000000","message":"there is some more context there @viroel@gmail.com in the patch ontop of this one https://review.opendev.org/c/openstack/watcher-dashboard/+/932693/comment/7a2176ab_87f0d56f/ (e.g. see [1]) so we need to have a number of indicators \n\nperhaps it is a naming issue... there will be one global efficacy, but it contains any number of indicators that contribute to it, which is what amoralej is trying to fix here. previously this is assuming only one indicator.\n\nthis is also re-inforced by one of the links you included - there [2] \n\n```\n        global_efficacy.append(efficacy.Indicator(\n```\n\n\n\n\n[1] https://github.com/openstack/watcher/blob/b5e45b43b92f4239ade849328e0ec47eef1d8b22/watcher/decision_engine/solution/efficacy.py#L93-L100\n[2] https://github.com/openstack/watcher/blob/811a704f809652af660b2ffd3a4c76e4196f930f/watcher/decision_engine/goal/efficacy/specs.py#L47C1-L47C51","commit_id":"ec7fc510b2d2900a035c8d4ec94d746ec022f294"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"99c39adc5b3dd150d8acefae982416abc98623b9","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"67bde802_073e4ea8","in_reply_to":"6d8ec85c_13dec6fb","updated":"2024-12-10 13:24:48.000000000","message":"Yes, which doesn\u0027t mean that is also correct, but in the end it a supported format since Queens, as per this spec[1] and implementation[2]. The documentation doesn\u0027t reflect that imho. \nThanks for fixing this in the dashboard.\n\n[1] https://github.com/openstack/watcher-specs/blob/master/specs/queens/implemented/multiple-global-efficacy.rst\n[2] https://review.opendev.org/c/openstack/watcher/+/505109","commit_id":"ec7fc510b2d2900a035c8d4ec94d746ec022f294"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"c0064398038e0e0335368560037bd9e438cda407","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"6d8ec85c_13dec6fb","in_reply_to":"8b41672f_be7632e9","updated":"2024-12-10 07:22:22.000000000","message":"Actually in https://github.com/openstack/watcher/blob/811a704f809652af660b2ffd3a4c76e4196f930f/watcher/decision_engine/goal/efficacy/specs.py#L98-L164 you can see that HardwareMaintenance is returning multiple global indicators.","commit_id":"ec7fc510b2d2900a035c8d4ec94d746ec022f294"},{"author":{"_account_id":16312,"name":"Alfredo Moralejo","email":"amoralej@redhat.com","username":"amoralej"},"change_message_id":"5b17a486a88c31bf7eefff6f283b5f71ff0810b5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"84ef500a_e2a55918","in_reply_to":"baaac46c_b4893c04","updated":"2024-12-10 08:52:22.000000000","message":"@viroel@gmail.com you can see an example of multiple global indicators in these screenshots","commit_id":"ec7fc510b2d2900a035c8d4ec94d746ec022f294"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"cbe3a702367ce345da4f23261c8da107f4e395a8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"7446df0e_2b03d091","updated":"2025-02-03 17:45:41.000000000","message":"Updating vote here, this one is good to merge.","commit_id":"41206e6a418d33fb85f9ce9b0ea80d3ea2d71c56"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"6bb56a9968f720ce1317ff079c877861b21c4450","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"ae98416f_76803831","updated":"2025-01-09 08:00:48.000000000","message":"lgtm","commit_id":"41206e6a418d33fb85f9ce9b0ea80d3ea2d71c56"}],"watcher_dashboard/content/action_plans/tables.py":[{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"8f12b72729594c495d84101dbf46519a06088502","unresolved":true,"context_lines":[{"line_number":128,"context_line":"def format_global_efficacy(action_plan):"},{"line_number":129,"context_line":"    template_name \u003d \u0027infra_optim/action_plans/_global_efficacy.html\u0027"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    global_efficacy_list \u003d {}"},{"line_number":132,"context_line":"    for indicator in action_plan.global_efficacy:"},{"line_number":133,"context_line":"        global_efficacy \u003d watcher.EfficacyIndicator(indicator)"},{"line_number":134,"context_line":"        if global_efficacy.value is not None and global_efficacy.unit:"}],"source_content_type":"text/x-python","patch_set":4,"id":"09ed8e86_82b8d41f","line":131,"updated":"2024-11-15 11:24:07.000000000","message":"nitpick: why call it a list when it\u0027s a dict?","commit_id":"99ab9870ae338d0be1efa7a75e272d30dc11caf8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4f3aa76738b23dcc330fe4a73d4240dc05a91871","unresolved":true,"context_lines":[{"line_number":128,"context_line":"def format_global_efficacy(action_plan):"},{"line_number":129,"context_line":"    template_name \u003d \u0027infra_optim/action_plans/_global_efficacy.html\u0027"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    global_efficacy_list \u003d {}"},{"line_number":132,"context_line":"    for indicator in action_plan.global_efficacy:"},{"line_number":133,"context_line":"        global_efficacy \u003d watcher.EfficacyIndicator(indicator)"},{"line_number":134,"context_line":"        if global_efficacy.value is not None and global_efficacy.unit:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9d93ac52_1a0ecc07","line":131,"in_reply_to":"09ed8e86_82b8d41f","updated":"2024-12-03 01:23:02.000000000","message":"i belive they called it this because action_plan.global_efficacy is a list\nhowever you are correect that thsi is a dict not a list.","commit_id":"99ab9870ae338d0be1efa7a75e272d30dc11caf8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2ea1aabbb143359ca75b41c336e76e89f62c731d","unresolved":false,"context_lines":[{"line_number":128,"context_line":"def format_global_efficacy(action_plan):"},{"line_number":129,"context_line":"    template_name \u003d \u0027infra_optim/action_plans/_global_efficacy.html\u0027"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    global_efficacy_list \u003d {}"},{"line_number":132,"context_line":"    for indicator in action_plan.global_efficacy:"},{"line_number":133,"context_line":"        global_efficacy \u003d watcher.EfficacyIndicator(indicator)"},{"line_number":134,"context_line":"        if global_efficacy.value is not None and global_efficacy.unit:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3207bd89_172f5019","line":131,"in_reply_to":"9d93ac52_1a0ecc07","updated":"2025-01-09 23:06:38.000000000","message":"Done","commit_id":"99ab9870ae338d0be1efa7a75e272d30dc11caf8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"30fed2e1cf1f43726fc807c18b21f5a6578a1638","unresolved":true,"context_lines":[{"line_number":131,"context_line":"    global_efficacy_list \u003d {}"},{"line_number":132,"context_line":"    for indicator in action_plan.global_efficacy:"},{"line_number":133,"context_line":"        global_efficacy \u003d watcher.EfficacyIndicator(indicator)"},{"line_number":134,"context_line":"        if global_efficacy.value is not None and global_efficacy.unit:"},{"line_number":135,"context_line":"            global_efficacy_value \u003d \"%(value)s %(unit)s\" % dict("},{"line_number":136,"context_line":"                unit\u003dglobal_efficacy.unit,"},{"line_number":137,"context_line":"                value\u003dglobal_efficacy.value)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5269d22d_6ef5ab5e","line":134,"updated":"2024-11-15 08:48:20.000000000","message":"why not also have \"global_efficacy.unit is not None\" is there some difference in how these are declared/populated?","commit_id":"99ab9870ae338d0be1efa7a75e272d30dc11caf8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4f3aa76738b23dcc330fe4a73d4240dc05a91871","unresolved":true,"context_lines":[{"line_number":131,"context_line":"    global_efficacy_list \u003d {}"},{"line_number":132,"context_line":"    for indicator in action_plan.global_efficacy:"},{"line_number":133,"context_line":"        global_efficacy \u003d watcher.EfficacyIndicator(indicator)"},{"line_number":134,"context_line":"        if global_efficacy.value is not None and global_efficacy.unit:"},{"line_number":135,"context_line":"            global_efficacy_value \u003d \"%(value)s %(unit)s\" % dict("},{"line_number":136,"context_line":"                unit\u003dglobal_efficacy.unit,"},{"line_number":137,"context_line":"                value\u003dglobal_efficacy.value)"}],"source_content_type":"text/x-python","patch_set":4,"id":"f86fd1aa_e740b1a2","line":134,"in_reply_to":"5269d22d_6ef5ab5e","updated":"2024-12-03 01:23:02.000000000","message":"that is a good question.\ni would assume the answer is becue that what the code did before \nsee https://review.opendev.org/c/openstack/watcher-dashboard/+/935043/4/watcher_dashboard/content/action_plans/tables.py#b135\n\nthis if/elif bock has been lifted form the orginal code but i can\u0027t say if it was orginally correct there.","commit_id":"99ab9870ae338d0be1efa7a75e272d30dc11caf8"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"68fb6314ba50d4785cc3ea244b9520ecc3beb7ba","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    global_efficacy_list \u003d {}"},{"line_number":132,"context_line":"    for indicator in action_plan.global_efficacy:"},{"line_number":133,"context_line":"        global_efficacy \u003d watcher.EfficacyIndicator(indicator)"},{"line_number":134,"context_line":"        if global_efficacy.value is not None and global_efficacy.unit:"},{"line_number":135,"context_line":"            global_efficacy_value \u003d \"%(value)s %(unit)s\" % dict("},{"line_number":136,"context_line":"                unit\u003dglobal_efficacy.unit,"},{"line_number":137,"context_line":"                value\u003dglobal_efficacy.value)"}],"source_content_type":"text/x-python","patch_set":4,"id":"00034331_799edaef","line":134,"in_reply_to":"f86fd1aa_e740b1a2","updated":"2024-12-09 08:09:14.000000000","message":"Done","commit_id":"99ab9870ae338d0be1efa7a75e272d30dc11caf8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4f3aa76738b23dcc330fe4a73d4240dc05a91871","unresolved":true,"context_lines":[{"line_number":132,"context_line":"    for indicator in action_plan.global_efficacy:"},{"line_number":133,"context_line":"        global_efficacy \u003d watcher.EfficacyIndicator(indicator)"},{"line_number":134,"context_line":"        if global_efficacy.value is not None and global_efficacy.unit:"},{"line_number":135,"context_line":"            global_efficacy_value \u003d \"%(value)s %(unit)s\" % dict("},{"line_number":136,"context_line":"                unit\u003dglobal_efficacy.unit,"},{"line_number":137,"context_line":"                value\u003dglobal_efficacy.value)"},{"line_number":138,"context_line":"            global_efficacy_list[global_efficacy.name] \u003d global_efficacy_value"},{"line_number":139,"context_line":"        elif global_efficacy.value is not None:"},{"line_number":140,"context_line":"            global_efficacy_value \u003d \"%(value)s\" % global_efficacy.value"}],"source_content_type":"text/x-python","patch_set":4,"id":"c4d8df45_955e59a9","line":137,"range":{"start_line":135,"start_character":11,"end_line":137,"end_character":44},"updated":"2024-12-03 01:23:02.000000000","message":"```suggestion\n            global_efficacy_value \u003d f\"{global_efficacy.value} {global_efficacy.unit}\"\n```\n\nwe do not need to construct a dict just to do substitution \n\nthis is cleaner.","commit_id":"99ab9870ae338d0be1efa7a75e272d30dc11caf8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2ea1aabbb143359ca75b41c336e76e89f62c731d","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    for indicator in action_plan.global_efficacy:"},{"line_number":133,"context_line":"        global_efficacy \u003d watcher.EfficacyIndicator(indicator)"},{"line_number":134,"context_line":"        if global_efficacy.value is not None and global_efficacy.unit:"},{"line_number":135,"context_line":"            global_efficacy_value \u003d \"%(value)s %(unit)s\" % dict("},{"line_number":136,"context_line":"                unit\u003dglobal_efficacy.unit,"},{"line_number":137,"context_line":"                value\u003dglobal_efficacy.value)"},{"line_number":138,"context_line":"            global_efficacy_list[global_efficacy.name] \u003d global_efficacy_value"},{"line_number":139,"context_line":"        elif global_efficacy.value is not None:"},{"line_number":140,"context_line":"            global_efficacy_value \u003d \"%(value)s\" % global_efficacy.value"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f7db27b_4da0dd61","line":137,"range":{"start_line":135,"start_character":11,"end_line":137,"end_character":44},"in_reply_to":"c4d8df45_955e59a9","updated":"2025-01-09 23:06:38.000000000","message":"Done","commit_id":"99ab9870ae338d0be1efa7a75e272d30dc11caf8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4f3aa76738b23dcc330fe4a73d4240dc05a91871","unresolved":true,"context_lines":[{"line_number":137,"context_line":"                value\u003dglobal_efficacy.value)"},{"line_number":138,"context_line":"            global_efficacy_list[global_efficacy.name] \u003d global_efficacy_value"},{"line_number":139,"context_line":"        elif global_efficacy.value is not None:"},{"line_number":140,"context_line":"            global_efficacy_value \u003d \"%(value)s\" % global_efficacy.value"},{"line_number":141,"context_line":"            global_efficacy_list[global_efficacy.name] \u003d global_efficacy_value"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    context \u003d {"},{"line_number":144,"context_line":"        \"global_indicators\": global_efficacy_list,"}],"source_content_type":"text/x-python","patch_set":4,"id":"076108c9_99dad3ec","line":141,"range":{"start_line":140,"start_character":12,"end_line":141,"end_character":78},"updated":"2024-12-03 01:23:02.000000000","message":"unless global_efficacy.value is a dict with a key call value this incorrect.\n\nif we just want the string convertion of whatever global_efficacy.value hold we shoudl do this instead.\n```\nglobal_efficacy_value \u003d str(global_efficacy.value)\n```\nhowever i think we can simplfy this to the following\n\n```suggestion\n            global_efficacy_list[global_efficacy.name] \u003d str(global_efficacy.value)\n```\nor\n```\n            global_efficacy_list[global_efficacy.name] \u003d str(\n                global_efficacy.value)\n```\nif we need to wrap due to the line limit","commit_id":"99ab9870ae338d0be1efa7a75e272d30dc11caf8"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2ea1aabbb143359ca75b41c336e76e89f62c731d","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                value\u003dglobal_efficacy.value)"},{"line_number":138,"context_line":"            global_efficacy_list[global_efficacy.name] \u003d global_efficacy_value"},{"line_number":139,"context_line":"        elif global_efficacy.value is not None:"},{"line_number":140,"context_line":"            global_efficacy_value \u003d \"%(value)s\" % global_efficacy.value"},{"line_number":141,"context_line":"            global_efficacy_list[global_efficacy.name] \u003d global_efficacy_value"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    context \u003d {"},{"line_number":144,"context_line":"        \"global_indicators\": global_efficacy_list,"}],"source_content_type":"text/x-python","patch_set":4,"id":"a2903d0b_b2a0b8ec","line":141,"range":{"start_line":140,"start_character":12,"end_line":141,"end_character":78},"in_reply_to":"076108c9_99dad3ec","updated":"2025-01-09 23:06:38.000000000","message":"Done","commit_id":"99ab9870ae338d0be1efa7a75e272d30dc11caf8"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"f33c62ce30a32d8fb7ff091cd360cf98ce2e5ac5","unresolved":true,"context_lines":[{"line_number":133,"context_line":"        global_efficacy \u003d watcher.EfficacyIndicator(indicator)"},{"line_number":134,"context_line":"        if (global_efficacy.value is not None and"},{"line_number":135,"context_line":"                global_efficacy.unit is not None):"},{"line_number":136,"context_line":"            global_efficacy_dict[global_efficacy.name] \u003d \\"},{"line_number":137,"context_line":"                f\"{global_efficacy.value} {global_efficacy.unit}\""},{"line_number":138,"context_line":"        elif global_efficacy.value is not None:"},{"line_number":139,"context_line":"            global_efficacy_dict[global_efficacy.name] \u003d str("}],"source_content_type":"text/x-python","patch_set":5,"id":"d25427aa_acb5f3c6","line":136,"updated":"2024-12-13 14:51:00.000000000","message":"nit: I would recommend avoiding using backslashes for wrapping, because it\u0027s very easy to make errors with them. In most places in Python you can wrap long lines by putting them in parens, for example:\n\nglobal_efficacy_dict[global_efficacy.name] \u003d (\n    f\"{global_efficacy.value} {global_efficacy.unit}\")","commit_id":"ec7fc510b2d2900a035c8d4ec94d746ec022f294"}]}
