)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":22042,"name":"Chris Smart","email":"distroguy@gmail.com","username":"csmart"},"change_message_id":"6b431cdf4573a9e14580f3d7fb4d31aa71910255","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Vahid Mohsseni \u003cvahidmohsseni@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-07-10 13:30:47 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the bug when unpacking key, values from the container metadata/property"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ie5e1f275839e38340a75ab18c3b9ec9bc7745d68"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"f3b5cf39_550cb8e4","line":7,"updated":"2024-08-16 05:16:27.000000000","message":"@bformosa@nvidia.com thanks for the contribution! It looks good, but would be great if you could provide a little more context around how people hit this bug.","commit_id":"807941bb152d075dbea0d048e8181a3637b76533"},{"author":{"_account_id":22042,"name":"Chris Smart","email":"distroguy@gmail.com","username":"csmart"},"change_message_id":"19a2312ffaf422c361b2a329441eb3559b336a40","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Vahid Mohsseni \u003cvahidmohsseni@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-07-10 13:30:47 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the bug when unpacking key, values from the container metadata/property"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ie5e1f275839e38340a75ab18c3b9ec9bc7745d68"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"d6113c6c_163396e2","line":7,"in_reply_to":"1f7e535b_27519b38","updated":"2024-08-19 03:01:24.000000000","message":"Done","commit_id":"807941bb152d075dbea0d048e8181a3637b76533"},{"author":{"_account_id":37145,"name":"Vahid Mohsseni","display_name":"Vahid","email":"vahidmohsseni@gmail.com","username":"vahidmohsseni"},"change_message_id":"1aa0f053edf1ddeae94158ee2a3fa2f1be2f8ea9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Vahid Mohsseni \u003cvahidmohsseni@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-07-10 13:30:47 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the bug when unpacking key, values from the container metadata/property"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ie5e1f275839e38340a75ab18c3b9ec9bc7745d68"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3d16c5f9_42d5708b","line":7,"in_reply_to":"d6113c6c_163396e2","updated":"2024-08-19 12:09:16.000000000","message":"Hi,\nSorry for late reply. \n\nThe bug can be reproduced by updating the value of a container\u0027s metadata/property using this module. \nFor example, if a container has a property \"foo: bar\", then it cannot be updated via the following script:\n\n```yaml\n\n    - name: Create a dummy container with metadata foo/bar\n      openstack.cloud.object_container:\n        state: present\n        cloud: my_cloud\n        metadata:\n          \u0027foo\u0027: \"bar\"\n        container: \"dummy\"\n\n    - name: Change the value of metadata for an existing object container\n      openstack.cloud.object_container:\n        state: present\n        cloud: my_cloud\n        metadata:\n          \u0027foo\u0027: \"baz\"\n        container: \"dummy\"\n```","commit_id":"807941bb152d075dbea0d048e8181a3637b76533"},{"author":{"_account_id":22042,"name":"Chris Smart","email":"distroguy@gmail.com","username":"csmart"},"change_message_id":"d50779e391a849f4c2ab1af3bbed74574784a810","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Vahid Mohsseni \u003cvahidmohsseni@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-07-10 13:30:47 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the bug when unpacking key, values from the container metadata/property"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ie5e1f275839e38340a75ab18c3b9ec9bc7745d68"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1f7e535b_27519b38","line":7,"in_reply_to":"f3b5cf39_550cb8e4","updated":"2024-08-16 05:24:16.000000000","message":"*@Vahid, sorry!","commit_id":"807941bb152d075dbea0d048e8181a3637b76533"},{"author":{"_account_id":37240,"name":"Ben Formosa","display_name":"bformosa","email":"bformosa@nvidia.com","username":"bformosa"},"change_message_id":"8222872a60d606e5893f08ed1391932c3a59c3aa","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the bug when unpacking key, values from the container metadata/property"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ie5e1f275839e38340a75ab18c3b9ec9bc7745d68"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"8060e35c_55cec3aa","line":9,"updated":"2024-08-19 00:59:20.000000000","message":"Here\u0027s a suggestion for more detailed commit message:\n\n---\n\nFix exception when updating container with metadata\n\nA ValueError is raised when running the object_container module with the\n`metadata` param against a container with existing metadata.\n\nWhen the module attempts to enumerate the existing container metadata, a\nValueError exception is raised, because the code is iterating over the\nmetadata keys, instead of `dict_items`.\nCompare to the iteration through another dict `metadata` on the next\nline:\n\n    new_metadata \u003d dict((k, v) for k, v in metadata.items()\n\nThis change adds a call to `items()` on the dictionary.\nNote that this is added outside the parentheses so that the behaviour of the\n`or` statement is not affected, and that another exception isn\u0027t caused\nif `container.metadata` is not a dict.\n\nCloses-Bug: #2071934\nChange-Id: Ie5e1f275839e38340a75ab18c3b9ec9bc7745d68","commit_id":"807941bb152d075dbea0d048e8181a3637b76533"},{"author":{"_account_id":37240,"name":"Ben Formosa","display_name":"bformosa","email":"bformosa@nvidia.com","username":"bformosa"},"change_message_id":"53256f57959703a5e978d8927d793cf75a79ae67","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix the bug when unpacking key, values from the container metadata/property"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ie5e1f275839e38340a75ab18c3b9ec9bc7745d68"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"c9b9d097_4568b113","line":9,"in_reply_to":"8060e35c_55cec3aa","updated":"2024-10-08 22:05:11.000000000","message":"Done","commit_id":"807941bb152d075dbea0d048e8181a3637b76533"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":37240,"name":"Ben Formosa","display_name":"bformosa","email":"bformosa@nvidia.com","username":"bformosa"},"change_message_id":"8222872a60d606e5893f08ed1391932c3a59c3aa","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"806da866_5e8c7d10","updated":"2024-08-19 00:59:20.000000000","message":"I\u0027d love to see this change merged.\nI\u0027ve made some comments which might be helpful.\n\nI also note that the failing tests relate to quotas, and not this change, so hopefully they can be ignored (or fixed elsewhere).\n\nAdditionally, I\u0027d like to include a test for this in ci/roles/object_container/tasks/main.yml.\n\nI\u0027ll try to push a patchset once I work out how.","commit_id":"807941bb152d075dbea0d048e8181a3637b76533"},{"author":{"_account_id":37240,"name":"Ben Formosa","display_name":"bformosa","email":"bformosa@nvidia.com","username":"bformosa"},"change_message_id":"b457edd23879b55fd1fcde7aa061a49008df4b60","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"dbd234da_dcad8b66","updated":"2024-08-16 04:59:10.000000000","message":"recheck","commit_id":"807941bb152d075dbea0d048e8181a3637b76533"},{"author":{"_account_id":37240,"name":"Ben Formosa","display_name":"bformosa","email":"bformosa@nvidia.com","username":"bformosa"},"change_message_id":"53256f57959703a5e978d8927d793cf75a79ae67","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"6d4f3c29_66191138","in_reply_to":"806da866_5e8c7d10","updated":"2024-10-08 22:05:11.000000000","message":"Done","commit_id":"807941bb152d075dbea0d048e8181a3637b76533"},{"author":{"_account_id":37240,"name":"Ben Formosa","display_name":"bformosa","email":"bformosa@nvidia.com","username":"bformosa"},"change_message_id":"8222872a60d606e5893f08ed1391932c3a59c3aa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"411316a5_9273c143","in_reply_to":"dbd234da_dcad8b66","updated":"2024-08-19 00:59:20.000000000","message":"Done","commit_id":"807941bb152d075dbea0d048e8181a3637b76533"},{"author":{"_account_id":37240,"name":"Ben Formosa","display_name":"bformosa","email":"bformosa@nvidia.com","username":"bformosa"},"change_message_id":"53256f57959703a5e978d8927d793cf75a79ae67","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a0b0a804_7be5133a","updated":"2024-10-08 22:05:11.000000000","message":"Rebased to master after 926525 was merged. All comments resolved.","commit_id":"e0dc4776bb522f83a3d30092cdeb5f7bffc3b385"}],"plugins/modules/object_container.py":[{"author":{"_account_id":37240,"name":"Ben Formosa","display_name":"bformosa","email":"bformosa@nvidia.com","username":"bformosa"},"change_message_id":"8222872a60d606e5893f08ed1391932c3a59c3aa","unresolved":true,"context_lines":[{"line_number":269,"context_line":"        if metadata is not None:"},{"line_number":270,"context_line":"            # Swift metadata keys must be treated as case-insensitive"},{"line_number":271,"context_line":"            old_metadata \u003d dict((k.lower(), v)"},{"line_number":272,"context_line":"                                for k, v in (container.metadata.items() or {}))"},{"line_number":273,"context_line":"            new_metadata \u003d dict((k, v) for k, v in metadata.items()"},{"line_number":274,"context_line":"                                if k.lower() not in old_metadata"},{"line_number":275,"context_line":"                                or v !\u003d old_metadata[k.lower()])"}],"source_content_type":"text/x-python","patch_set":1,"id":"0d3f3b13_4681f9ed","line":272,"updated":"2024-08-19 00:59:20.000000000","message":"If `container.metadata` is not a dict, this might cause an exception. It\u0027s not clear to me exactly how `container.metadata` is set, but it\u0027s possible it could be null or falsey.\n\nI suspect that the `or` construct is there to catch this case.\nYou might move `.items()` outside of the parens here.\n```suggestion\n                                for k, v in (container.metadata or {}).items())\n```\n\nThat said, I\u0027ve tested both and both worked fine.","commit_id":"807941bb152d075dbea0d048e8181a3637b76533"},{"author":{"_account_id":37240,"name":"Ben Formosa","display_name":"bformosa","email":"bformosa@nvidia.com","username":"bformosa"},"change_message_id":"53256f57959703a5e978d8927d793cf75a79ae67","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        if metadata is not None:"},{"line_number":270,"context_line":"            # Swift metadata keys must be treated as case-insensitive"},{"line_number":271,"context_line":"            old_metadata \u003d dict((k.lower(), v)"},{"line_number":272,"context_line":"                                for k, v in (container.metadata.items() or {}))"},{"line_number":273,"context_line":"            new_metadata \u003d dict((k, v) for k, v in metadata.items()"},{"line_number":274,"context_line":"                                if k.lower() not in old_metadata"},{"line_number":275,"context_line":"                                or v !\u003d old_metadata[k.lower()])"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffea1da3_b8c3fd29","line":272,"in_reply_to":"0d3f3b13_4681f9ed","updated":"2024-10-08 22:05:11.000000000","message":"Done","commit_id":"807941bb152d075dbea0d048e8181a3637b76533"}]}
