)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":27224,"name":"Duc Truong","email":"duc.openstack@gmail.com","username":"dtruong2"},"change_message_id":"cc622893285f6e1b36febb6d407bf595f531dd4b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"743d8b68_752afc22","updated":"2024-01-05 05:52:02.000000000","message":"Good catch. lgtm","commit_id":"f20734a6e8a20ebfc86eec113531e354f393d574"},{"author":{"_account_id":36379,"name":"Nguyễn Ngọc Hiếu","display_name":"ZiTechDev","email":"hieunn23@fpt.com","username":"zitechdev201"},"change_message_id":"fff283f97ae1380c84ac8307562c841915578fd6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a35393c0_40670453","in_reply_to":"743d8b68_752afc22","updated":"2024-01-06 07:29:40.000000000","message":"Thank you for the review, but I\u0027ve just made a small change. Could you please review it again?","commit_id":"f20734a6e8a20ebfc86eec113531e354f393d574"},{"author":{"_account_id":35916,"name":"Pham Le Gia Dai","display_name":"Dai","email":"daipham.3213@gmail.com","username":"daiplg","status":"Full Stack Dev"},"change_message_id":"2e03e70af2db90411d8a5b6a7356422a825835b0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"d4d40bd9_884fff0e","updated":"2024-01-08 10:35:16.000000000","message":"LGTM","commit_id":"2b6693576355b673dcc4e3e53f1291204412c512"}],"senlin/policies/lb_policy.py":[{"author":{"_account_id":35916,"name":"Pham Le Gia Dai","display_name":"Dai","email":"daipham.3213@gmail.com","username":"daiplg","status":"Full Stack Dev"},"change_message_id":"be0da6c5b968f23f8ec55219791ae34ebcc52115","unresolved":true,"context_lines":[{"line_number":526,"context_line":"                    count \u003d action.data[\u0027deletion\u0027][\u0027count\u0027]"},{"line_number":527,"context_line":"            else:  # action.action \u003d\u003d consts.CLUSTER_SCALE_IN"},{"line_number":528,"context_line":"                count \u003d action.inputs.get(\u0027count\u0027, 1)"},{"line_number":529,"context_line":"                if not isinstance(count, int) or count \u003c\u003d 0:"},{"line_number":530,"context_line":"                    count \u003d 1"},{"line_number":531,"context_line":"        elif action.action \u003d\u003d consts.CLUSTER_REPLACE_NODES:"},{"line_number":532,"context_line":"            candidates \u003d list(action.inputs[\u0027candidates\u0027].keys())"}],"source_content_type":"text/x-python","patch_set":2,"id":"62cf6e57_7a8e9978","line":529,"updated":"2024-01-05 06:47:44.000000000","message":"what happens if the `count` is 0? If it is default set to `1`, was it a good behavior?","commit_id":"f20734a6e8a20ebfc86eec113531e354f393d574"},{"author":{"_account_id":35916,"name":"Pham Le Gia Dai","display_name":"Dai","email":"daipham.3213@gmail.com","username":"daiplg","status":"Full Stack Dev"},"change_message_id":"7b1d75f738ec3f98f0ae67a03c7f6e8b869c4cd2","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                    count \u003d action.data[\u0027deletion\u0027][\u0027count\u0027]"},{"line_number":527,"context_line":"            else:  # action.action \u003d\u003d consts.CLUSTER_SCALE_IN"},{"line_number":528,"context_line":"                count \u003d action.inputs.get(\u0027count\u0027, 1)"},{"line_number":529,"context_line":"                if not isinstance(count, int) or count \u003c\u003d 0:"},{"line_number":530,"context_line":"                    count \u003d 1"},{"line_number":531,"context_line":"        elif action.action \u003d\u003d consts.CLUSTER_REPLACE_NODES:"},{"line_number":532,"context_line":"            candidates \u003d list(action.inputs[\u0027candidates\u0027].keys())"}],"source_content_type":"text/x-python","patch_set":2,"id":"34df25b2_a2ccf31c","line":529,"in_reply_to":"62cf6e57_7a8e9978","updated":"2024-01-06 07:17:13.000000000","message":"LGTM","commit_id":"f20734a6e8a20ebfc86eec113531e354f393d574"},{"author":{"_account_id":36379,"name":"Nguyễn Ngọc Hiếu","display_name":"ZiTechDev","email":"hieunn23@fpt.com","username":"zitechdev201"},"change_message_id":"fff283f97ae1380c84ac8307562c841915578fd6","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                    count \u003d action.data[\u0027deletion\u0027][\u0027count\u0027]"},{"line_number":527,"context_line":"            else:  # action.action \u003d\u003d consts.CLUSTER_SCALE_IN"},{"line_number":528,"context_line":"                count \u003d action.inputs.get(\u0027count\u0027, 1)"},{"line_number":529,"context_line":"                if not isinstance(count, int) or count \u003c\u003d 0:"},{"line_number":530,"context_line":"                    count \u003d 1"},{"line_number":531,"context_line":"        elif action.action \u003d\u003d consts.CLUSTER_REPLACE_NODES:"},{"line_number":532,"context_line":"            candidates \u003d list(action.inputs[\u0027candidates\u0027].keys())"}],"source_content_type":"text/x-python","patch_set":2,"id":"295f91a0_bcc46708","line":529,"in_reply_to":"62cf6e57_7a8e9978","updated":"2024-01-06 07:29:40.000000000","message":"Thank you for your feedback,\n\nI have reviewed and found that checking for positive integers here is not really necessary, as it has already been validated and handled in the API and conductor modules (including the case where count \u003d 0). Therefore, I will remove it to avoid unnecessary complexity in the logic. You can refer to the handling of the \u0027count\u0027 number here:\n\nAPI model: https://github.com/openstack/senlin/blob/5c0fae04534a424f62c255508287c6fb555c11c5/senlin/objects/requests/clusters.py#L183C1-L190C1\n\nConductor: https://github.com/openstack/senlin/blob/5c0fae04534a424f62c255508287c6fb555c11c5/senlin/conductor/service.py#L1234C1-L1257C10","commit_id":"f20734a6e8a20ebfc86eec113531e354f393d574"}]}
