)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"7745c4fdfbeb82d64906a752ca4e9ad2f547e0f0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"cebd6040_d486d78c","updated":"2025-04-08 19:02:51.000000000","message":"This was reviewed by a group of cores as part of the PTG review jam.","commit_id":"95067c80a79db850d2e6389e5549c3ea6e032d83"}],"ironicclient/osc/v1/baremetal_node.py":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"7745c4fdfbeb82d64906a752ca4e9ad2f547e0f0","unresolved":true,"context_lines":[{"line_number":2376,"context_line":"        data \u003d baremetal_client.node.get_history_list("},{"line_number":2377,"context_line":"            parsed_args.node,"},{"line_number":2378,"context_line":"            parsed_args.long)"},{"line_number":2379,"context_line":"        data \u003d oscutils.sort_items(data, parsed_args.sort)"},{"line_number":2380,"context_line":""},{"line_number":2381,"context_line":"        return (labels,"},{"line_number":2382,"context_line":"                (oscutils.get_dict_properties(s, fields) for s in data))"}],"source_content_type":"text/x-python","patch_set":2,"id":"e24b996c_aa4c6d1d","line":2379,"updated":"2025-04-08 19:02:51.000000000","message":"So while this works reliably in the default case (Ironic\u0027s default max limit is 1000, and Ironic\u0027s default node history limit is 250 entries), when configured in such a way that max_limit \u003e node history limit, this will only sort the first page of results.\n\nWhere this gets awkward is that when we added upstream sort_key functionality (https://review.opendev.org/c/openstack/ironic/+/940522) we did not properly indicate the API was changing with a microversion. So we\u0027re in a position of either having sort that works for all versions of Ironic/the API but breaks in non-default configurations, or having sort that works properly with no edge cases but only in modern Ironic (since Jan 31 2025).\n\nWhat Julia suggested, and I fully endorse, is using the first microversion added after that Jan 31 2025 change landed (Microversion 1.97 was added in March 17 2025 so it can be a sentinel).\n\nSummary: Please update this code to use API-native sorting if microversion 1.97 or newer, and to use the method provided here if an earlier microversion is in play.","commit_id":"95067c80a79db850d2e6389e5549c3ea6e032d83"}]}
