)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"erkin.mussurmankulov@ps.kz","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"53262a02344f19cb9f9bf9b2aad56906dbb9d8f3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"54221fcd_cfe21440","updated":"2026-08-10 18:57:46.000000000","message":"Also, please add `soft-affinity` and `soft-anti-affinity` to [trove/cluster/service.py:226](https://opendev.org/openstack/trove/src/branch/master/trove/cluster/service.py#L226).\n\nI know that cluster functionality isn\u0027t fully supported yet, but we\u0027ll have less chance to forget about these new params when we try to resurrect cluster support 😆","commit_id":"144f3c9c0380d5c3c70d8af3ab066ab0e1fbc719"},{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"erkin.mussurmankulov@ps.kz","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"3afd9ee28bfe662b5d3d02e5a46c8df854ffb73a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"49536197_c7d3c798","updated":"2026-08-07 09:00:08.000000000","message":"Nice patch, LGTM.\n\nHowever, we need a small tempest scenario to verify that all affinity rules, including the new `soft-anti-affinity` and `soft-affinity` are passed correctly into the Nova API by the Trove control plane and don\u0027t invoke any exceptions during instance creation.\n\n*We can\u0027t test its real work, though, as zuul assumes only a single compute node, but it isn\u0027t required for this scenario.*\n\nPlease provide such a test with `[DNM]` mark in the t-t-p repo, and create `[DNM]` test branch in this repo with `Depends-On` to this patch and the tempest scenario. Don\u0027t forget that resources in Zuul nodes are limited, so you can just create and remove instances sequentially in a single tempest scenario.\n\nAlso, we should make corresponding changes to the `python-troveclient` repo.","commit_id":"144f3c9c0380d5c3c70d8af3ab066ab0e1fbc719"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"87158558b4a65bfcaf17e175f84df62b80cc996c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"1002eb5b_371be2a0","updated":"2026-08-20 12:26:17.000000000","message":"Hello Olessya and Eric, Thank you very much for the MR. This is a great patch to improve usability! It\u0027s almost perfect, and I really appreciate that it covers cluster functionality as well.","commit_id":"8752ee2e953a15e8309d175cd4fe2dad1ddfc89c"},{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"erkin.mussurmankulov@ps.kz","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"86533c86cfcb0b47572f7cf7b678891d5aa93920","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2e6b4162_442862d9","updated":"2026-08-11 10:14:12.000000000","message":"LGTM, +1 on this one.\nThe reason why this patch exists is that we got an issue with our real customer: both his master and replica instances were created on the same compute node.\nWe would like to set this option to `soft-anti-affinity` in our production OpenStack, to mitigate the risk of such a problem in the future, because not many users are aware of the locality option at the moment when they create their Database.\n\n\nHowever, I can\u0027t do +2 here because we\u0027re working in the same company, and merging MRs from a colleague is against OpenStack principles.\n\nSo, someone from the core developers team, take a look at this patch, please.\n\nWe would like to introduce this change in the current release.","commit_id":"8752ee2e953a15e8309d175cd4fe2dad1ddfc89c"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"710bb55bce3751937d8e34abfd5e06a58689d067","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"dffc7269_2730cdc0","updated":"2026-08-22 04:01:32.000000000","message":"Hello Olessya, Thanks for the update! LGTM :)","commit_id":"37389f79b3f61452f134b32511d2668831ba73ad"}],"trove/cluster/service.py":[{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"87158558b4a65bfcaf17e175f84df62b80cc996c","unresolved":true,"context_lines":[{"line_number":222,"context_line":"                              \"modules\": modules})"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        locality \u003d body[\u0027cluster\u0027].get(\u0027locality\u0027)"},{"line_number":225,"context_line":"        if locality:"},{"line_number":226,"context_line":"            locality_domain \u003d ["},{"line_number":227,"context_line":"                \u0027affinity\u0027, \u0027soft-affinity\u0027,"},{"line_number":228,"context_line":"                \u0027anti-affinity\u0027, \u0027soft-anti-affinity\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"3135a8c8_2da23124","line":225,"updated":"2026-08-20 12:26:17.000000000","message":"I noticed that this locality validation logic and the hardcoded list of valid localities are duplicated in both `trove/cluster/service.py` and `trove/instance/service.py`.\n\nFor better readability and future maintainability, how about extracting this into a common utility function and defining the valid locality strings as a constant (e.g., `VALID_LOCALITIES`) in something like `trove/common/constants.py`? \n\nIt\u0027s non-blocking, but it would be a nice cleanup to avoid missing updates if we ever change the allowed locality values in the future.","commit_id":"8752ee2e953a15e8309d175cd4fe2dad1ddfc89c"},{"author":{"_account_id":39300,"name":"Olessya Khussainova","display_name":"Olessya Khussainova","email":"olessya.khussainova@ps.kz","username":"Cellofun"},"change_message_id":"f804addceeafcffefe776e88afbaf0d1983939b0","unresolved":false,"context_lines":[{"line_number":222,"context_line":"                              \"modules\": modules})"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        locality \u003d body[\u0027cluster\u0027].get(\u0027locality\u0027)"},{"line_number":225,"context_line":"        if locality:"},{"line_number":226,"context_line":"            locality_domain \u003d ["},{"line_number":227,"context_line":"                \u0027affinity\u0027, \u0027soft-affinity\u0027,"},{"line_number":228,"context_line":"                \u0027anti-affinity\u0027, \u0027soft-anti-affinity\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"968fe4b9_b87c8c80","line":225,"in_reply_to":"3135a8c8_2da23124","updated":"2026-08-21 07:20:09.000000000","message":"Hello Hirotaka! Thank you for the review and suggestion, great catch!","commit_id":"8752ee2e953a15e8309d175cd4fe2dad1ddfc89c"}],"trove/instance/service.py":[{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"erkin.mussurmankulov@ps.kz","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"53262a02344f19cb9f9bf9b2aad56906dbb9d8f3","unresolved":true,"context_lines":[{"line_number":884,"context_line":"    @staticmethod"},{"line_number":885,"context_line":"    def _get_locality(instance):"},{"line_number":886,"context_line":"        locality \u003d instance.get(\u0027locality\u0027)"},{"line_number":887,"context_line":"        if instance.get(\u0027replica_of\u0027):"},{"line_number":888,"context_line":"            return locality"},{"line_number":889,"context_line":"        return locality or CONF.default_locality"}],"source_content_type":"text/x-python","patch_set":1,"id":"17207fb0_15620e11","line":887,"updated":"2026-08-10 18:57:46.000000000","message":"This code looks a little bit tricky. Why should we return locality here exactly, and why not CONF.default_locality as provided below?\nI took a look at the main method and get it, but right here it\u0027s `a kind of magic` 😄\nPlease add a comment in places like this in the future to explain why this code does what it does.\n\n__________\n\nBut since this helper isn\u0027t used anywhere else except the \"create\" method, the presence of this helper is pointless in the first place.\nWe can do what this helper does in the main method instead, for example:\n\n```\nlocality \u003d body[\u0027instance\u0027].get(\u0027locality\u0027)\nif not slave_of_id and locality is None:\n    locality \u003d CONF.default_locality\n```\nThis code is much more readable and much shorter.","commit_id":"144f3c9c0380d5c3c70d8af3ab066ab0e1fbc719"},{"author":{"_account_id":39300,"name":"Olessya Khussainova","display_name":"Olessya Khussainova","email":"olessya.khussainova@ps.kz","username":"Cellofun"},"change_message_id":"157d38bcbd5a67b3dc67e83f0530b521eb15f947","unresolved":false,"context_lines":[{"line_number":884,"context_line":"    @staticmethod"},{"line_number":885,"context_line":"    def _get_locality(instance):"},{"line_number":886,"context_line":"        locality \u003d instance.get(\u0027locality\u0027)"},{"line_number":887,"context_line":"        if instance.get(\u0027replica_of\u0027):"},{"line_number":888,"context_line":"            return locality"},{"line_number":889,"context_line":"        return locality or CONF.default_locality"}],"source_content_type":"text/x-python","patch_set":1,"id":"9e95f045_0e6b2abd","line":887,"in_reply_to":"17207fb0_15620e11","updated":"2026-08-11 04:20:30.000000000","message":"Done","commit_id":"144f3c9c0380d5c3c70d8af3ab066ab0e1fbc719"}]}
