)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6d44969e7dbcb5dd46a8bb5538b9a68824054c87","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"While Python supports using tuples as dict keys, json.dumps() (which"},{"line_number":10,"context_line":"is what oslo_serialization.jsonutils.dumps() calls under the hood)"},{"line_number":11,"context_line":"does not. Stop using tuples as keys in our weight debug log."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ieaaa11bd78bf479c968ccbe614d1c42525b74bd6"},{"line_number":14,"context_line":"Closes-bug: 2028518"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"759fd4f0_1ef3cc79","line":11,"updated":"2023-12-20 08:38:10.000000000","message":"FWIW, this is because of the poor modeling of JSON itself, not the fault to Python. A tuple can be hashable, hence being a dict key.","commit_id":"329023fd34fa049b6fad5bd7fdd95c3066eb3d2b"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f2e8a2c1163cdff4bdeae9da0f448dcfaff366ff","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e996b705_6e2f182f","updated":"2023-12-21 01:33:44.000000000","message":"i have some other ideas of how to do this but this works so im ok with this approch","commit_id":"329023fd34fa049b6fad5bd7fdd95c3066eb3d2b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"31cbc3c4bb8c4bd3e22d40e7e422ea94a64b8b99","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"824d7f94_14854b16","updated":"2023-12-21 02:21:10.000000000","message":"since you respone lets chat about the best way to adress this tomorrow","commit_id":"f71781d7ccad04e423d925e756702a5db53b5dce"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"29d40e38d345f382fc10b3b661507bbfa982c68f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"7767cc74_69d29f28","updated":"2026-05-18 14:11:16.000000000","message":"mostly just adressed my orginal nits and rebased\nlets see what ci says.","commit_id":"af22b390918f8208629199a6b2055569514d1f0b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d5ec821601984a76276fe804bbd5716f664df43c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"2f531b9c_405f1d15","updated":"2026-05-18 14:47:37.000000000","message":"ok this seams to be wrokign as expected\n\nhttps://zuul.opendev.org/t/openstack/build/4ee06dda0a71458d8c309f4ed9dd53e0/log/controller/logs/screen-n-sch.txt#2955-2994\n\n```\nMay 18 14:35:15.225595 np622d5fde82874 nova-scheduler[78351]: DEBUG nova.scheduler.manager [None req-794ebd86-a01e-4379-b904-30c6a85f3680 tempest-VTPMTest-1838552400 tempest-VTPMTest-1838552400-project-member] Filtered [(nped3289060c484, nped3289060c484) ram: 31583MB disk: 119808MB io_ops: 0 instances: 0, allocation_candidates: 1, (np622d5fde82874, np622d5fde82874) ram: 31583MB disk: 118784MB io_ops: 0 instances: 0, allocation_candidates: 1] {{(pid\u003d78351) _get_sorted_hosts /opt/stack/nova/nova/scheduler/manager.py:743}}\nMay 18 14:35:15.225595 np622d5fde82874 nova-scheduler[78351]: DEBUG nova.weights [None req-794ebd86-a01e-4379-b904-30c6a85f3680 tempest-VTPMTest-1838552400 tempest-VTPMTest-1838552400-project-member] NumInstancesWeigher: raw weights {\u0027Host nped3289060c484 node nped3289060c484\u0027: 0, \u0027Host np622d5fde82874 node np622d5fde82874\u0027: 0} {{(pid\u003d78351) get_weighed_objects /opt/stack/nova/nova/weights.py:139}}\nMay 18 14:35:15.225595 np622d5fde82874 nova-scheduler[78351]: DEBUG nova.weights [None req-794ebd86-a01e-4379-b904-30c6a85f3680 tempest-VTPMTest-1838552400 tempest-VTPMTest-1838552400-project-member] NumInstancesWeigher: normalized weights {\u0027Host nped3289060c484 node nped3289060c484\u0027: 0, \u0027Host np622d5fde82874 node np622d5fde82874\u0027: 0} {{(pid\u003d78351) get_weighed_objects /opt/stack/nova/nova/weights.py:147}}\n...\n```\nthe ci run is still in progress but we nolonger see any traceback\n\nwe however also dont see them on older rusn \nhttps://zuul.opendev.org/t/openstack/build/f165240d56d847749bc7c5ddd1820c5e/log/controller/logs/screen-n-sch.txt#2942-2981\n```\nMay 15 20:01:09.522067 np17c30fcd7b8b4 nova-scheduler[78911]: DEBUG nova.scheduler.manager [None req-9a7fdf39-77fa-41d5-972a-5b5f93e6183c tempest-VTPMTest-2095303977 tempest-VTPMTest-2095303977-project-member] Filtered [(np17c30fcd7b8b4, np17c30fcd7b8b4) ram: 31583MB disk: 118784MB io_ops: 0 instances: 0, allocation_candidates: 1, (np9a6f7ae222f14, np9a6f7ae222f14) ram: 31583MB disk: 119808MB io_ops: 0 instances: 0, allocation_candidates: 1] {{(pid\u003d78911) _get_sorted_hosts /opt/stack/nova/nova/scheduler/manager.py:743}}\nMay 15 20:01:09.522067 np17c30fcd7b8b4 nova-scheduler[78911]: DEBUG nova.weights [None req-9a7fdf39-77fa-41d5-972a-5b5f93e6183c tempest-VTPMTest-2095303977 tempest-VTPMTest-2095303977-project-member] CPUWeigher: raw weights {(\u0027np17c30fcd7b8b4\u0027, \u0027np17c30fcd7b8b4\u0027): 8.0, (\u0027np9a6f7ae222f14\u0027, \u0027np9a6f7ae222f14\u0027): 8.0} {{(pid\u003d78911) get_weighed_objects /opt/stack/nova/nova/weights.py:136}}\nMay 15 20:01:09.522067 np17c30fcd7b8b4 nova-scheduler[78911]: DEBUG nova.weights [None req-9a7fdf39-77fa-41d5-972a-5b5f93e6183c tempest-VTPMTest-2095303977 tempest-VTPMTest-2095303977-project-member] CPUWeigher: normalized weights {(\u0027np17c30fcd7b8b4\u0027, \u0027np17c30fcd7b8b4\u0027): 1.0, (\u0027np9a6f7ae222f14\u0027, \u0027np9a6f7ae222f14\u0027): 1.0} {{(pid\u003d78911) get_weighed_objects /opt/stack/nova/nova/weights.py:148}}\nMay 1\n```\nas such i think since the bug was orgianlly reported oslo has been updated to handel the tuple case\n\nwe could still proceed with this but it looks like it may not be needed anymore.","commit_id":"af22b390918f8208629199a6b2055569514d1f0b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c53a62d66ce53f51bae11c5b0a6555890a8937f1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"1a9158df_bba5ac92","in_reply_to":"2f531b9c_405f1d15","updated":"2026-05-18 14:50:11.000000000","message":"actully the old format is not valide json\n```\n{(\u0027np17c30fcd7b8b4\u0027, \u0027np17c30fcd7b8b4\u0027): 8.0, (\u0027np9a6f7ae222f14\u0027, \u0027np9a6f7ae222f14\u0027): 8.0}\n```\n\nso if you enabled json log output that likely  woudl have rasied a traceback so perhaps we need a test case for that as well.\n\nwe could do that as a followup but l;et me push a DNM to valdiate that quickly","commit_id":"af22b390918f8208629199a6b2055569514d1f0b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4f997521aba963ee8020bd91a0b338ce6e4f1961","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"b73f2209_8e094f14","updated":"2026-05-18 22:33:54.000000000","message":"i added a better regression test to directly demonstrate the problem when json logging was enabeld given this actully passes without that.","commit_id":"ca2971c85381029489f3d1d5021ab72e3824e972"}],"nova/weights.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6d44969e7dbcb5dd46a8bb5538b9a68824054c87","unresolved":true,"context_lines":[{"line_number":135,"context_line":"            return {"},{"line_number":136,"context_line":"                \u0027Host %s node %s\u0027 % (obj.obj.host, obj.obj.nodename): weight"},{"line_number":137,"context_line":"                for obj, weight in zip(weighed_objs, weights)"},{"line_number":138,"context_line":"            }"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        for weigher in weighers:"},{"line_number":141,"context_line":"            weights \u003d weigher.weigh_objects(weighed_objs, weighing_properties)"}],"source_content_type":"text/x-python","patch_set":2,"id":"099338ad_9b032941","line":138,"updated":"2023-12-20 08:38:10.000000000","message":"Yup, looks to me the best way.","commit_id":"329023fd34fa049b6fad5bd7fdd95c3066eb3d2b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"31cbc3c4bb8c4bd3e22d40e7e422ea94a64b8b99","unresolved":true,"context_lines":[{"line_number":135,"context_line":"            return {"},{"line_number":136,"context_line":"                \u0027Host %s node %s\u0027 % (obj.obj.host, obj.obj.nodename): weight"},{"line_number":137,"context_line":"                for obj, weight in zip(weighed_objs, weights)"},{"line_number":138,"context_line":"            }"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        for weigher in weighers:"},{"line_number":141,"context_line":"            weights \u003d weigher.weigh_objects(weighed_objs, weighing_properties)"}],"source_content_type":"text/x-python","patch_set":2,"id":"f39f7764_137d3830","line":138,"in_reply_to":"099338ad_9b032941","updated":"2023-12-21 02:21:10.000000000","message":"actully a better way would be to use or update the __repr__\nof teh WeighedObject to print want we want and just call str on obj and use that as the key.\nhttps://review.opendev.org/c/openstack/nova/+/904060/3/nova/weights.py#68\n\nwe could add a dedicated __str__ if we want which is jsut \n```\ndef __str__(self):\n   return \u0027Host %s node %s\u0027 % (self.obj.host, self.obj.nodename)\n```\n\nthat would be more pythonic and cleaner then this.","commit_id":"329023fd34fa049b6fad5bd7fdd95c3066eb3d2b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"29d40e38d345f382fc10b3b661507bbfa982c68f","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            return {"},{"line_number":136,"context_line":"                \u0027Host %s node %s\u0027 % (obj.obj.host, obj.obj.nodename): weight"},{"line_number":137,"context_line":"                for obj, weight in zip(weighed_objs, weights)"},{"line_number":138,"context_line":"            }"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        for weigher in weighers:"},{"line_number":141,"context_line":"            weights \u003d weigher.weigh_objects(weighed_objs, weighing_properties)"}],"source_content_type":"text/x-python","patch_set":2,"id":"a96e4676_70e1f206","line":138,"in_reply_to":"f39f7764_137d3830","updated":"2026-05-18 14:11:16.000000000","message":"Done","commit_id":"329023fd34fa049b6fad5bd7fdd95c3066eb3d2b"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"0549ad768362d193c5ebb41bec0036c35625d496","unresolved":true,"context_lines":[{"line_number":166,"context_line":"                weigher_score \u003d multiplier * weight"},{"line_number":167,"context_line":"                obj.weight +\u003d weigher_score"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"                log_data[(obj.obj.host, obj.obj.nodename)] \u003d ("},{"line_number":170,"context_line":"                    f\"{multiplier} * {weight}\")"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"            LOG.debug("}],"source_content_type":"text/x-python","patch_set":2,"id":"2209ce01_fc9b4964","line":169,"range":{"start_line":169,"start_character":25,"end_line":169,"end_character":57},"updated":"2023-12-21 01:37:36.000000000","message":"forgot this one :(","commit_id":"329023fd34fa049b6fad5bd7fdd95c3066eb3d2b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"29d40e38d345f382fc10b3b661507bbfa982c68f","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                weigher_score \u003d multiplier * weight"},{"line_number":167,"context_line":"                obj.weight +\u003d weigher_score"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"                log_data[(obj.obj.host, obj.obj.nodename)] \u003d ("},{"line_number":170,"context_line":"                    f\"{multiplier} * {weight}\")"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"            LOG.debug("}],"source_content_type":"text/x-python","patch_set":2,"id":"f50f390d_6357ad1d","line":169,"range":{"start_line":169,"start_character":25,"end_line":169,"end_character":57},"in_reply_to":"2209ce01_fc9b4964","updated":"2026-05-18 14:11:16.000000000","message":"Acknowledged","commit_id":"329023fd34fa049b6fad5bd7fdd95c3066eb3d2b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"851cc241655aa1e5c2f3580d3a8693caa7230e77","unresolved":true,"context_lines":[{"line_number":143,"context_line":"            # NOTE(artom) This is a sentinel to make sure we don\u0027t repeat bug"},{"line_number":144,"context_line":"            # 2028518. By sending the log string directly to jsonutils.dumps(),"},{"line_number":145,"context_line":"            # we avoid hiding buggy code behind LOG.debug."},{"line_number":146,"context_line":"            jsonutils.dumps(get_log_string(weighed_objs, weights))"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"            LOG.debug(\"%s: raw weights %s\","},{"line_number":149,"context_line":"                      weigher.__class__.__name__, get_log_string(weighed_objs,"}],"source_content_type":"text/x-python","patch_set":3,"id":"838cc062_1a419a10","line":146,"updated":"2023-12-21 02:22:26.000000000","message":"instead of this i would prefer to add a unit test that mocks log.debug and actully tests the log functionality.","commit_id":"f71781d7ccad04e423d925e756702a5db53b5dce"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"29d40e38d345f382fc10b3b661507bbfa982c68f","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            # NOTE(artom) This is a sentinel to make sure we don\u0027t repeat bug"},{"line_number":144,"context_line":"            # 2028518. By sending the log string directly to jsonutils.dumps(),"},{"line_number":145,"context_line":"            # we avoid hiding buggy code behind LOG.debug."},{"line_number":146,"context_line":"            jsonutils.dumps(get_log_string(weighed_objs, weights))"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"            LOG.debug(\"%s: raw weights %s\","},{"line_number":149,"context_line":"                      weigher.__class__.__name__, get_log_string(weighed_objs,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ab458af_162afa67","line":146,"in_reply_to":"838cc062_1a419a10","updated":"2026-05-18 14:11:16.000000000","message":"Done","commit_id":"f71781d7ccad04e423d925e756702a5db53b5dce"}]}
