)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"ca033cdaafb1f57453536f3f181c720e30e80ebd","unresolved":true,"context_lines":[{"line_number":9,"context_line":"At the moment identity_user module treats empty default_project_name"},{"line_number":10,"context_line":"argument that is provided as an empty string, as valid name_or_id."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"As it\u0027s quite tricky to \"undefine\" a variable on a role level playbooks might"},{"line_number":13,"context_line":"be quite tricky, as in example [1]. So quite much complexity must be"},{"line_number":14,"context_line":"added to such roles to use omit when resulting variable is an empty"},{"line_number":15,"context_line":"string. At the same time providing empty string worked nicely before"},{"line_number":16,"context_line":"refactoring [2] made for collection version 2.0."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"So it\u0027s way easier to change condition in the module to ensure that"},{"line_number":19,"context_line":"empty strings are not treated as valid name_or_id."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"[1] https://opendev.org/openstack/openstack-ansible-plugins/src/branch/master/roles/service_setup/tasks/main.yml#L68-L90"},{"line_number":22,"context_line":"[2] https://opendev.org/openstack/ansible-collections-openstack/commit/c9afdbfd73d788450d0e9f28ffc6893e350c0460"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"d3ec8d35_9db24f8e","line":19,"range":{"start_line":12,"start_character":0,"end_line":19,"end_character":50},"updated":"2023-04-17 22:22:18.000000000","message":"Sorry, not sure I understand the problem. Why not to use \"omit\" which is common way to skip settings that shouldn\u0027t be set? Passing empty to undefine looks quite hacky to me and not obvious..","commit_id":"4c00d19e418d9b48f14d7ffc87a5db9c4394d64f"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"e8da8b9dc128cc367072cfd48bac55aefb018722","unresolved":true,"context_lines":[{"line_number":9,"context_line":"At the moment identity_user module treats empty default_project_name"},{"line_number":10,"context_line":"argument that is provided as an empty string, as valid name_or_id."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"As it\u0027s quite tricky to \"undefine\" a variable on a role level playbooks might"},{"line_number":13,"context_line":"be quite tricky, as in example [1]. So quite much complexity must be"},{"line_number":14,"context_line":"added to such roles to use omit when resulting variable is an empty"},{"line_number":15,"context_line":"string. At the same time providing empty string worked nicely before"},{"line_number":16,"context_line":"refactoring [2] made for collection version 2.0."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"So it\u0027s way easier to change condition in the module to ensure that"},{"line_number":19,"context_line":"empty strings are not treated as valid name_or_id."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"[1] https://opendev.org/openstack/openstack-ansible-plugins/src/branch/master/roles/service_setup/tasks/main.yml#L68-L90"},{"line_number":22,"context_line":"[2] https://opendev.org/openstack/ansible-collections-openstack/commit/c9afdbfd73d788450d0e9f28ffc6893e350c0460"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"0f4963a4_d458b8e0","line":19,"range":{"start_line":12,"start_character":0,"end_line":19,"end_character":50},"in_reply_to":"d3ec8d35_9db24f8e","updated":"2023-05-04 15:43:14.000000000","message":"It\u0027s not always possible to use omit. You also can\u0027t set role defaults to omit, for example, as then it will be _omit_placeholder_\u003cuuid\u003e. Also, as I said, you will need to place quite complex logic everywhere in the role to validate that string is not empty, rather then offload this quite trivial thing to the module.","commit_id":"4c00d19e418d9b48f14d7ffc87a5db9c4394d64f"}],"plugins/modules/identity_user.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7444288d615bd1a3f01e0c6b06b5107c3a6a3e53","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                 if self.params[k] is not None)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        domain_name_or_id \u003d self.params[\u0027domain\u0027]"},{"line_number":209,"context_line":"        if domain_name_or_id is not None:"},{"line_number":210,"context_line":"            domain \u003d self.conn.identity.find_domain(domain_name_or_id,"},{"line_number":211,"context_line":"                                                    ignore_missing\u003dFalse)"},{"line_number":212,"context_line":"            kwargs[\u0027attributes\u0027][\u0027domain_id\u0027] \u003d domain.id"}],"source_content_type":"text/x-python","patch_set":1,"id":"606a500b_c546d190","line":209,"updated":"2023-04-12 10:50:34.000000000","message":"I wonder if the same logic should be applied here and everywhere for consistency","commit_id":"4c00d19e418d9b48f14d7ffc87a5db9c4394d64f"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"e8da8b9dc128cc367072cfd48bac55aefb018722","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                 if self.params[k] is not None)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        domain_name_or_id \u003d self.params[\u0027domain\u0027]"},{"line_number":209,"context_line":"        if domain_name_or_id is not None:"},{"line_number":210,"context_line":"            domain \u003d self.conn.identity.find_domain(domain_name_or_id,"},{"line_number":211,"context_line":"                                                    ignore_missing\u003dFalse)"},{"line_number":212,"context_line":"            kwargs[\u0027attributes\u0027][\u0027domain_id\u0027] \u003d domain.id"}],"source_content_type":"text/x-python","patch_set":1,"id":"bc443b1d_5df384d8","line":209,"in_reply_to":"606a500b_c546d190","updated":"2023-05-04 15:43:14.000000000","message":"Well, yeah, given nobody is against this change, proposing a batch for consistency is possible.","commit_id":"4c00d19e418d9b48f14d7ffc87a5db9c4394d64f"}]}
