)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"328e1a6b3d525ca5dffc78448951739ad16631a5","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Ivan Halomi \u003civan.halomi@tietoevry.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-03-11 15:16:37 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor of kolla_container_facts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Refactor that prepares kolla_container_facts"},{"line_number":10,"context_line":"module for introducing more actions that will be moved"},{"line_number":11,"context_line":"from kolla_container module and kolla_container_volume_facts."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ieaec8f64922e4e5a2199db2d6983518b124cb4aa"},{"line_number":14,"context_line":"Signed-off-by: Ivan Halomi \u003civan.halomi@tietoevry.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"5b79b736_a414df41","line":11,"range":{"start_line":7,"start_character":0,"end_line":11,"end_character":61},"updated":"2024-03-12 17:44:50.000000000","message":"I miss some rationale either here or a link to something.\n\nWhy is this done/needed/better? I\u0027m sure there is something better after this change.\nSo let\u0027s show it to the world :)","commit_id":"1cec543a9da0554ad8b01bfc71bc68df4a6f8b14"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"8453357cf22d6641d49d6638dd7868a2684c617c","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Ivan Halomi \u003civan.halomi@tietoevry.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-03-11 15:16:37 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor of kolla_container_facts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Refactor that prepares kolla_container_facts"},{"line_number":10,"context_line":"module for introducing more actions that will be moved"},{"line_number":11,"context_line":"from kolla_container module and kolla_container_volume_facts."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ieaec8f64922e4e5a2199db2d6983518b124cb4aa"},{"line_number":14,"context_line":"Signed-off-by: Ivan Halomi \u003civan.halomi@tietoevry.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"ca2f8a2b_f4bb1c47","line":11,"range":{"start_line":7,"start_character":0,"end_line":11,"end_character":61},"in_reply_to":"1be08fd5_2da97f9a","updated":"2024-03-13 14:41:19.000000000","message":"in my personal opinion (which happens to be shared by some people on the internet) a commit message should always explain why a change is being done.\n\nSo imho it would be good to replicate the gist of the conversation in the commit message, why this is useful.\n\nif this is too much work, then the second best thing is a link to the conversation, but my experience says, that links break over time, where git history rarely breaks.\n\nI know we do not - imho - do a good job of writing good commit messages everywhere.\n\nI would just like to see this improvement, because it makes understanding the codebase and the history of changes very hard for new developers imho.","commit_id":"1cec543a9da0554ad8b01bfc71bc68df4a6f8b14"},{"author":{"_account_id":36701,"name":"Ivan Halomi","display_name":"Ivan Halomi","email":"ivan.halomi@gmail.com","username":"ivanhalomi"},"change_message_id":"762a0c6c9774e1157a457592d5da8c57e6c32033","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Ivan Halomi \u003civan.halomi@tietoevry.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-03-11 15:16:37 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor of kolla_container_facts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Refactor that prepares kolla_container_facts"},{"line_number":10,"context_line":"module for introducing more actions that will be moved"},{"line_number":11,"context_line":"from kolla_container module and kolla_container_volume_facts."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ieaec8f64922e4e5a2199db2d6983518b124cb4aa"},{"line_number":14,"context_line":"Signed-off-by: Ivan Halomi \u003civan.halomi@tietoevry.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1be08fd5_2da97f9a","line":11,"range":{"start_line":7,"start_character":0,"end_line":11,"end_character":61},"in_reply_to":"5b79b736_a414df41","updated":"2024-03-13 08:12:06.000000000","message":"It\u0027s because of new action that was added for the migration patchset. Discussion about it here:\nhttps://review.opendev.org/c/openstack/kolla-ansible/+/905837/comments/8e41ee4a_d4294d0b \n\nSo I am not sure if linking this comments make sense in commit message.","commit_id":"1cec543a9da0554ad8b01bfc71bc68df4a6f8b14"},{"author":{"_account_id":36701,"name":"Ivan Halomi","display_name":"Ivan Halomi","email":"ivan.halomi@gmail.com","username":"ivanhalomi"},"change_message_id":"8f0ff458db027efc734f06ce49689a77a2d51e34","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Ivan Halomi \u003civan.halomi@tietoevry.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2024-03-11 15:16:37 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Refactor of kolla_container_facts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Refactor that prepares kolla_container_facts"},{"line_number":10,"context_line":"module for introducing more actions that will be moved"},{"line_number":11,"context_line":"from kolla_container module and kolla_container_volume_facts."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ieaec8f64922e4e5a2199db2d6983518b124cb4aa"},{"line_number":14,"context_line":"Signed-off-by: Ivan Halomi \u003civan.halomi@tietoevry.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"66d9b3f8_247af2fc","line":11,"range":{"start_line":7,"start_character":0,"end_line":11,"end_character":61},"in_reply_to":"ca2f8a2b_f4bb1c47","updated":"2024-03-15 14:56:09.000000000","message":"Done","commit_id":"1cec543a9da0554ad8b01bfc71bc68df4a6f8b14"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":36701,"name":"Ivan Halomi","display_name":"Ivan Halomi","email":"ivan.halomi@gmail.com","username":"ivanhalomi"},"change_message_id":"35ac4735bd1f52660312bfdd9a5a54e5abfe417c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"83bda87f_d4a75ac8","updated":"2024-03-11 08:28:06.000000000","message":"recheck","commit_id":"8113aa8667bdaa80b622982444972a85a86a591f"},{"author":{"_account_id":36701,"name":"Ivan Halomi","display_name":"Ivan Halomi","email":"ivan.halomi@gmail.com","username":"ivanhalomi"},"change_message_id":"db211d68a77fd8c99efb70b15b77681b9438e8b3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"d15563f6_2c33fb12","updated":"2024-03-25 12:23:51.000000000","message":"recheck","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"b63db80a637f820eb1bcbe938e6db933c63331de","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"1e6a57b7_995fdf91","updated":"2024-06-10 09:24:51.000000000","message":"LGTM beside the cryptic variable name mentioned below.","commit_id":"5c440e7b0db79d2ab81f10aaea51b0edced52e9a"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"b180b304bb62ed238a5561b7a8a6f6d8e56f009d","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":16,"id":"59621a63_6b9d6dde","updated":"2024-06-25 07:57:24.000000000","message":"Code LGTM.\n\nI\u0027m not sure about backport voting, honestly.\n\non one hand, this is a rather large change, so maybe should not be backported due to inherent risk.\n\non the other hand, this is change is a refactoring and as such transparent to the user.\n\nbackporting it would make future backports for bugfixes in this area simpler, so that would be a benefit for developers of kolla.\n\nI would like to hear more opinions on this.","commit_id":"9ea43f8d0cb276daad7c35c03fb581cdb7cda3cf"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"7190314aabb055419b051d4d8121957d027548a7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"bd3d0617_c26c81f1","in_reply_to":"406cfa6e_bad7462e","updated":"2024-08-09 08:23:44.000000000","message":"Done","commit_id":"9ea43f8d0cb276daad7c35c03fb581cdb7cda3cf"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"6dc1dadbd5d881d172a2782d316b3b0e697af8f0","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":16,"id":"406cfa6e_bad7462e","in_reply_to":"59621a63_6b9d6dde","updated":"2024-08-07 13:09:33.000000000","message":"I would not backport unless required","commit_id":"9ea43f8d0cb276daad7c35c03fb581cdb7cda3cf"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"9367d34c355e7bbf6d5d5634a4998626f9317f5e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"4519e9ff_b3b413b2","updated":"2024-08-07 13:10:50.000000000","message":"for posterity","commit_id":"1eab2173e94dd0f905dca9b353417ae6e90de1a0"}],"ansible/library/kolla_container_facts.py":[{"author":{"_account_id":34113,"name":"Martin Hiner","email":"martin.hiner@tietoevry.com","username":"hinermar"},"change_message_id":"40c2b6a39c2f291ff91c9a2ae3640e87e40d7c5b","unresolved":true,"context_lines":[{"line_number":42,"context_line":"      - Name or names of the containers"},{"line_number":43,"context_line":"    required: False"},{"line_number":44,"context_line":"    type: str or list"},{"line_number":45,"context_line":"  container_engine:"},{"line_number":46,"context_line":"    description:"},{"line_number":47,"context_line":"      - Name of container engine to use"},{"line_number":48,"context_line":"    required: True"}],"source_content_type":"text/x-python","patch_set":5,"id":"d7315713_b5d68a6c","line":45,"updated":"2024-03-11 10:51:57.000000000","message":"Duplicate description for container_engine.","commit_id":"8113aa8667bdaa80b622982444972a85a86a591f"},{"author":{"_account_id":36701,"name":"Ivan Halomi","display_name":"Ivan Halomi","email":"ivan.halomi@gmail.com","username":"ivanhalomi"},"change_message_id":"25a2acf56ad4d643bae6f5ad296d186cc0f6ed88","unresolved":false,"context_lines":[{"line_number":42,"context_line":"      - Name or names of the containers"},{"line_number":43,"context_line":"    required: False"},{"line_number":44,"context_line":"    type: str or list"},{"line_number":45,"context_line":"  container_engine:"},{"line_number":46,"context_line":"    description:"},{"line_number":47,"context_line":"      - Name of container engine to use"},{"line_number":48,"context_line":"    required: True"}],"source_content_type":"text/x-python","patch_set":5,"id":"87138887_929bfdda","line":45,"in_reply_to":"d7315713_b5d68a6c","updated":"2024-03-13 08:47:54.000000000","message":"Done","commit_id":"8113aa8667bdaa80b622982444972a85a86a591f"},{"author":{"_account_id":34113,"name":"Martin Hiner","email":"martin.hiner@tietoevry.com","username":"hinermar"},"change_message_id":"40c2b6a39c2f291ff91c9a2ae3640e87e40d7c5b","unresolved":true,"context_lines":[{"line_number":74,"context_line":"\u0027\u0027\u0027"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class ContainerWorker(ABC):"},{"line_number":78,"context_line":"    def __init__(self, module):"},{"line_number":79,"context_line":"        self.module \u003d module"},{"line_number":80,"context_line":"        self.results \u003d dict(changed\u003dFalse, _containers\u003d[])"}],"source_content_type":"text/x-python","patch_set":5,"id":"adc4b731_247eb06b","line":77,"updated":"2024-03-11 10:51:57.000000000","message":"I think it\u0027s a good idea to add \u0027Facts\u0027 to class names to differentiate the from classes used in kolla_container.","commit_id":"8113aa8667bdaa80b622982444972a85a86a591f"},{"author":{"_account_id":34113,"name":"Martin Hiner","email":"martin.hiner@tietoevry.com","username":"hinermar"},"change_message_id":"8030616ddc54f9e21c9b0470fd3f0e6efc1f51b0","unresolved":false,"context_lines":[{"line_number":74,"context_line":"\u0027\u0027\u0027"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"class ContainerWorker(ABC):"},{"line_number":78,"context_line":"    def __init__(self, module):"},{"line_number":79,"context_line":"        self.module \u003d module"},{"line_number":80,"context_line":"        self.results \u003d dict(changed\u003dFalse, _containers\u003d[])"}],"source_content_type":"text/x-python","patch_set":5,"id":"62755b8f_e6e59f78","line":77,"in_reply_to":"adc4b731_247eb06b","updated":"2024-03-11 10:54:34.000000000","message":"Done","commit_id":"8113aa8667bdaa80b622982444972a85a86a591f"},{"author":{"_account_id":34113,"name":"Martin Hiner","email":"martin.hiner@tietoevry.com","username":"hinermar"},"change_message_id":"40c2b6a39c2f291ff91c9a2ae3640e87e40d7c5b","unresolved":true,"context_lines":[{"line_number":141,"context_line":"        name\u003ddict(required\u003dFalse, type\u003d\u0027list\u0027, default\u003d[]),"},{"line_number":142,"context_line":"        api_version\u003ddict(required\u003dFalse, type\u003d\u0027str\u0027, default\u003d\u0027auto\u0027),"},{"line_number":143,"context_line":"        container_engine\u003ddict(required\u003dTrue, type\u003d\u0027str\u0027),"},{"line_number":144,"context_line":"        action\u003ddict(required\u003dTrue, type\u003d\u0027str\u0027)"},{"line_number":145,"context_line":"    )"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    module \u003d AnsibleModule(argument_spec\u003dargument_spec)"}],"source_content_type":"text/x-python","patch_set":5,"id":"c0dd6ad6_d9977611","line":144,"updated":"2024-03-11 10:51:57.000000000","message":"Add \u0027choices\u0027 option here.\nAlso it would be nice to have \u0027required_if\u0027 option for ansible module prepared for more actions.","commit_id":"8113aa8667bdaa80b622982444972a85a86a591f"},{"author":{"_account_id":36701,"name":"Ivan Halomi","display_name":"Ivan Halomi","email":"ivan.halomi@gmail.com","username":"ivanhalomi"},"change_message_id":"25a2acf56ad4d643bae6f5ad296d186cc0f6ed88","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        name\u003ddict(required\u003dFalse, type\u003d\u0027list\u0027, default\u003d[]),"},{"line_number":142,"context_line":"        api_version\u003ddict(required\u003dFalse, type\u003d\u0027str\u0027, default\u003d\u0027auto\u0027),"},{"line_number":143,"context_line":"        container_engine\u003ddict(required\u003dTrue, type\u003d\u0027str\u0027),"},{"line_number":144,"context_line":"        action\u003ddict(required\u003dTrue, type\u003d\u0027str\u0027)"},{"line_number":145,"context_line":"    )"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    module \u003d AnsibleModule(argument_spec\u003dargument_spec)"}],"source_content_type":"text/x-python","patch_set":5,"id":"05716d01_8e48e505","line":144,"in_reply_to":"c0dd6ad6_d9977611","updated":"2024-03-13 08:47:54.000000000","message":"Done","commit_id":"8113aa8667bdaa80b622982444972a85a86a591f"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"f2738bf956c86ee00eedd77cb15f37666513ddac","unresolved":true,"context_lines":[{"line_number":83,"context_line":"class DockerFactsWorker(ContainerFactsWorker):"},{"line_number":84,"context_line":"    def __init__(self, module):"},{"line_number":85,"context_line":"        super().__init__(module)"},{"line_number":86,"context_line":"        import docker"},{"line_number":87,"context_line":"        self.client \u003d docker.APIClient(version\u003dmodule.params.get("},{"line_number":88,"context_line":"                                       \u0027api_version\u0027))"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ac8db222_e8c76f05","line":86,"updated":"2024-03-13 14:39:58.000000000","message":"what happens if we fail here? would be nice to get a proper message instead of an ugly traceback","commit_id":"1cec543a9da0554ad8b01bfc71bc68df4a6f8b14"},{"author":{"_account_id":36701,"name":"Ivan Halomi","display_name":"Ivan Halomi","email":"ivan.halomi@gmail.com","username":"ivanhalomi"},"change_message_id":"8f0ff458db027efc734f06ce49689a77a2d51e34","unresolved":false,"context_lines":[{"line_number":83,"context_line":"class DockerFactsWorker(ContainerFactsWorker):"},{"line_number":84,"context_line":"    def __init__(self, module):"},{"line_number":85,"context_line":"        super().__init__(module)"},{"line_number":86,"context_line":"        import docker"},{"line_number":87,"context_line":"        self.client \u003d docker.APIClient(version\u003dmodule.params.get("},{"line_number":88,"context_line":"                                       \u0027api_version\u0027))"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9414185d_e213cb0d","line":86,"in_reply_to":"ac8db222_e8c76f05","updated":"2024-03-15 14:56:09.000000000","message":"Done","commit_id":"1cec543a9da0554ad8b01bfc71bc68df4a6f8b14"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"f2738bf956c86ee00eedd77cb15f37666513ddac","unresolved":true,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class PodmanFactsWorker(ContainerFactsWorker):"},{"line_number":106,"context_line":"    def __init__(self, module):"},{"line_number":107,"context_line":"        import podman.errors as pe"},{"line_number":108,"context_line":"        from podman import PodmanClient"},{"line_number":109,"context_line":"        self.pe \u003d pe"},{"line_number":110,"context_line":"        super().__init__(module)"}],"source_content_type":"text/x-python","patch_set":9,"id":"618d80d4_a4833d99","line":107,"updated":"2024-03-13 14:39:58.000000000","message":"ditto","commit_id":"1cec543a9da0554ad8b01bfc71bc68df4a6f8b14"},{"author":{"_account_id":36701,"name":"Ivan Halomi","display_name":"Ivan Halomi","email":"ivan.halomi@gmail.com","username":"ivanhalomi"},"change_message_id":"8f0ff458db027efc734f06ce49689a77a2d51e34","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class PodmanFactsWorker(ContainerFactsWorker):"},{"line_number":106,"context_line":"    def __init__(self, module):"},{"line_number":107,"context_line":"        import podman.errors as pe"},{"line_number":108,"context_line":"        from podman import PodmanClient"},{"line_number":109,"context_line":"        self.pe \u003d pe"},{"line_number":110,"context_line":"        super().__init__(module)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ef5799bf_89962fb4","line":107,"in_reply_to":"618d80d4_a4833d99","updated":"2024-03-15 14:56:09.000000000","message":"Done","commit_id":"1cec543a9da0554ad8b01bfc71bc68df4a6f8b14"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"a22136438d2622cc6c73742672eca847c554c83e","unresolved":true,"context_lines":[{"line_number":98,"context_line":"            names \u003d [names]"},{"line_number":99,"context_line":"        for container in containers:"},{"line_number":100,"context_line":"            for container_name in container[\u0027Names\u0027]:"},{"line_number":101,"context_line":"                # remove \u0027/\u0027 prefix character"},{"line_number":102,"context_line":"                container_name \u003d container_name[1:]"},{"line_number":103,"context_line":"                if names and container_name not in names:"},{"line_number":104,"context_line":"                    continue"},{"line_number":105,"context_line":"                self.results[\u0027_containers\u0027].append(container)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bbf7796a_914c9ac3","line":102,"range":{"start_line":101,"start_character":16,"end_line":102,"end_character":51},"updated":"2024-03-25 10:00:36.000000000","message":"this removes any first character from the container name, not just `/`. Do we have some guarantee, that there is always a leading slash? If not it migt be worth to always check, e.g. via regex, if the first character is a slash and only remove that.","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"227474bf171b3e25993c8153c681e3ef55bbeaf1","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            names \u003d [names]"},{"line_number":99,"context_line":"        for container in containers:"},{"line_number":100,"context_line":"            for container_name in container[\u0027Names\u0027]:"},{"line_number":101,"context_line":"                # remove \u0027/\u0027 prefix character"},{"line_number":102,"context_line":"                container_name \u003d container_name[1:]"},{"line_number":103,"context_line":"                if names and container_name not in names:"},{"line_number":104,"context_line":"                    continue"},{"line_number":105,"context_line":"                self.results[\u0027_containers\u0027].append(container)"}],"source_content_type":"text/x-python","patch_set":12,"id":"6ee4d540_483498f4","line":102,"range":{"start_line":101,"start_character":16,"end_line":102,"end_character":51},"in_reply_to":"08b6e808_d37cd303","updated":"2024-03-27 14:07:33.000000000","message":"Acknowledged","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":36701,"name":"Ivan Halomi","display_name":"Ivan Halomi","email":"ivan.halomi@gmail.com","username":"ivanhalomi"},"change_message_id":"b2b36828e671926b7adbb2f1fbfa5c074f71d787","unresolved":true,"context_lines":[{"line_number":98,"context_line":"            names \u003d [names]"},{"line_number":99,"context_line":"        for container in containers:"},{"line_number":100,"context_line":"            for container_name in container[\u0027Names\u0027]:"},{"line_number":101,"context_line":"                # remove \u0027/\u0027 prefix character"},{"line_number":102,"context_line":"                container_name \u003d container_name[1:]"},{"line_number":103,"context_line":"                if names and container_name not in names:"},{"line_number":104,"context_line":"                    continue"},{"line_number":105,"context_line":"                self.results[\u0027_containers\u0027].append(container)"}],"source_content_type":"text/x-python","patch_set":12,"id":"08b6e808_d37cd303","line":102,"range":{"start_line":101,"start_character":16,"end_line":102,"end_character":51},"in_reply_to":"bbf7796a_914c9ac3","updated":"2024-03-25 10:08:19.000000000","message":"There should always be leading slash because that\u0027s the way docker handles names, but in the end this will be changed in the following change that will use higher docker-py API where it returns container object with name attribute same as podman does now.","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"033894bb60c9eb38ea0918e18ff39c0ff885ba6b","unresolved":true,"context_lines":[{"line_number":102,"context_line":"                container_name \u003d container_name[1:]"},{"line_number":103,"context_line":"                if names and container_name not in names:"},{"line_number":104,"context_line":"                    continue"},{"line_number":105,"context_line":"                self.results[\u0027_containers\u0027].append(container)"},{"line_number":106,"context_line":"                self.results[container_name] \u003d container"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f14b23c_fc4a1213","line":105,"range":{"start_line":105,"start_character":0,"end_line":105,"end_character":2},"updated":"2024-04-03 15:24:00.000000000","message":"Take this with a grain of salt, but I\u0027m a huge fan of using typecheckers on python code, I know it\u0027s not in our CI, so feel free to ignore the following :)\n\nself.results is of type dict (see line 75 in this change), the dict type has no append method. To make it clear that the append method is used on the container list inside the dict I added a small class of Type TypedDict, see the code below.\n\nHowever, you also set `self.results[container_name]` but this element never got introduced before, which also is not that clean.\n\nHere\u0027s some code to fix the pylance/pyright errors this produces (uninitialized variables and so on):\n\n```\nfrom typing import TypedDict\n\n#new class to be explicit about our Result Type\nclass Results(TypedDict):\n    changed: bool\n    _containers: list[dict]\n    container_name: str\n\n# just slightly adjusted the self.results variable here\nclass ContainerFactsWorker(ABC):\n    def __init__(self, module):\n        self.module \u003d module\n        self.results: Results \u003d {\n            \"changed\": False,\n            \"_containers\": [],\n            \"container_name\": \"\",\n        }\n```\n\nI hope this is helpful (I also wish our CI would yell at this, to be honest, I guess I will look into that).","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"0e8ff7e05f171ab30e9c09bb32b01af276ce7cb3","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                container_name \u003d container_name[1:]"},{"line_number":103,"context_line":"                if names and container_name not in names:"},{"line_number":104,"context_line":"                    continue"},{"line_number":105,"context_line":"                self.results[\u0027_containers\u0027].append(container)"},{"line_number":106,"context_line":"                self.results[container_name] \u003d container"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"e8aa366a_d5ab1976","line":105,"range":{"start_line":105,"start_character":0,"end_line":105,"end_character":2},"in_reply_to":"13c18b8c_878d461f","updated":"2024-06-10 09:18:18.000000000","message":"Acknowledged","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":36701,"name":"Ivan Halomi","display_name":"Ivan Halomi","email":"ivan.halomi@gmail.com","username":"ivanhalomi"},"change_message_id":"282fc515196292fd8a2f855471195ac51f8c25a3","unresolved":true,"context_lines":[{"line_number":102,"context_line":"                container_name \u003d container_name[1:]"},{"line_number":103,"context_line":"                if names and container_name not in names:"},{"line_number":104,"context_line":"                    continue"},{"line_number":105,"context_line":"                self.results[\u0027_containers\u0027].append(container)"},{"line_number":106,"context_line":"                self.results[container_name] \u003d container"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"13c18b8c_878d461f","line":105,"range":{"start_line":105,"start_character":0,"end_line":105,"end_character":2},"in_reply_to":"3f14b23c_fc4a1213","updated":"2024-04-03 22:55:08.000000000","message":"From my point of view this array of containers is completely useless and I didn\u0027t find any usage of it. Everywhere in code we get container facts and then just check by this condition in the next task\n\n when: container_facts[service.container_name] is defined\n    \nOther problem is that I think you misunderstood how is container_name used. It is used in condition mentioned earlier and it is not a string but container object and key is not \"container_name\" but actual container name which is later used in condition to check if this container exists so it can\u0027t be defined before.\n\nSince this is just refactor I kept not used _containers dictionary but I think we can just remove it.","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"cfd0e35f7978344c1c8157ec6825034df57b9765","unresolved":true,"context_lines":[{"line_number":114,"context_line":"        except ImportError:"},{"line_number":115,"context_line":"            self.module.fail_json("},{"line_number":116,"context_line":"                msg\u003d\"The podman library could not be imported\")"},{"line_number":117,"context_line":"        self.pe \u003d pe"},{"line_number":118,"context_line":"        super().__init__(module)"},{"line_number":119,"context_line":"        self.client \u003d PodmanClient("},{"line_number":120,"context_line":"            base_url\u003d\"http+unix:/run/podman/podman.sock\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"9e86c1fc_381debcf","line":117,"range":{"start_line":117,"start_character":13,"end_line":117,"end_character":20},"updated":"2024-04-04 14:56:55.000000000","message":"please don\u0027t use such cryptic abbreviations. it\u0027s really hard to parse what \"pe\" is.","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"b180b304bb62ed238a5561b7a8a6f6d8e56f009d","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        except ImportError:"},{"line_number":115,"context_line":"            self.module.fail_json("},{"line_number":116,"context_line":"                msg\u003d\"The podman library could not be imported\")"},{"line_number":117,"context_line":"        self.pe \u003d pe"},{"line_number":118,"context_line":"        super().__init__(module)"},{"line_number":119,"context_line":"        self.client \u003d PodmanClient("},{"line_number":120,"context_line":"            base_url\u003d\"http+unix:/run/podman/podman.sock\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"0e4c5b07_5880c8dc","line":117,"range":{"start_line":117,"start_character":13,"end_line":117,"end_character":20},"in_reply_to":"34c60ba6_9a6ed3e0","updated":"2024-06-25 07:57:24.000000000","message":"Done","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":36701,"name":"Ivan Halomi","display_name":"Ivan Halomi","email":"ivan.halomi@gmail.com","username":"ivanhalomi"},"change_message_id":"fb7240ddae3b63aecd2dddb04fd0b3e40bd1ae37","unresolved":true,"context_lines":[{"line_number":114,"context_line":"        except ImportError:"},{"line_number":115,"context_line":"            self.module.fail_json("},{"line_number":116,"context_line":"                msg\u003d\"The podman library could not be imported\")"},{"line_number":117,"context_line":"        self.pe \u003d pe"},{"line_number":118,"context_line":"        super().__init__(module)"},{"line_number":119,"context_line":"        self.client \u003d PodmanClient("},{"line_number":120,"context_line":"            base_url\u003d\"http+unix:/run/podman/podman.sock\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"d6aa8115_16dd53bb","line":117,"range":{"start_line":117,"start_character":13,"end_line":117,"end_character":20},"in_reply_to":"9e86c1fc_381debcf","updated":"2024-04-04 18:47:38.000000000","message":"it was pe before change so i just kept it that way, if it bothers you i can change it to podmanError or something but anyway in the next change it is just used to be set to common variable self.errors in ContainerFactsWorker.","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"b63db80a637f820eb1bcbe938e6db933c63331de","unresolved":true,"context_lines":[{"line_number":114,"context_line":"        except ImportError:"},{"line_number":115,"context_line":"            self.module.fail_json("},{"line_number":116,"context_line":"                msg\u003d\"The podman library could not be imported\")"},{"line_number":117,"context_line":"        self.pe \u003d pe"},{"line_number":118,"context_line":"        super().__init__(module)"},{"line_number":119,"context_line":"        self.client \u003d PodmanClient("},{"line_number":120,"context_line":"            base_url\u003d\"http+unix:/run/podman/podman.sock\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"34c60ba6_9a6ed3e0","line":117,"range":{"start_line":117,"start_character":13,"end_line":117,"end_character":20},"in_reply_to":"d6aa8115_16dd53bb","updated":"2024-06-10 09:24:51.000000000","message":"yes it bothers me, thanks.","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"033894bb60c9eb38ea0918e18ff39c0ff885ba6b","unresolved":true,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    cw: ContainerFactsWorker \u003d None"},{"line_number":154,"context_line":"    try:"},{"line_number":155,"context_line":"        if module.params.get(\u0027container_engine\u0027) \u003d\u003d \u0027docker\u0027:"},{"line_number":156,"context_line":"            cw \u003d DockerFactsWorker(module)"},{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            cw \u003d PodmanFactsWorker(module)"}],"source_content_type":"text/x-python","patch_set":12,"id":"e4f2cad0_fa5381c6","line":155,"range":{"start_line":155,"start_character":24,"end_line":155,"end_character":28},"updated":"2024-04-03 15:24:00.000000000","message":"my local linter is yelling at me that you can\u0027t use get method on a stringly typed object","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"0e8ff7e05f171ab30e9c09bb32b01af276ce7cb3","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    cw: ContainerFactsWorker \u003d None"},{"line_number":154,"context_line":"    try:"},{"line_number":155,"context_line":"        if module.params.get(\u0027container_engine\u0027) \u003d\u003d \u0027docker\u0027:"},{"line_number":156,"context_line":"            cw \u003d DockerFactsWorker(module)"},{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            cw \u003d PodmanFactsWorker(module)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7dac262a_69f6a47b","line":155,"range":{"start_line":155,"start_character":24,"end_line":155,"end_character":28},"in_reply_to":"1bba6bc9_af8ea965","updated":"2024-06-10 09:18:18.000000000","message":"Acknowledged","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":36701,"name":"Ivan Halomi","display_name":"Ivan Halomi","email":"ivan.halomi@gmail.com","username":"ivanhalomi"},"change_message_id":"282fc515196292fd8a2f855471195ac51f8c25a3","unresolved":true,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    cw: ContainerFactsWorker \u003d None"},{"line_number":154,"context_line":"    try:"},{"line_number":155,"context_line":"        if module.params.get(\u0027container_engine\u0027) \u003d\u003d \u0027docker\u0027:"},{"line_number":156,"context_line":"            cw \u003d DockerFactsWorker(module)"},{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            cw \u003d PodmanFactsWorker(module)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1bba6bc9_af8ea965","line":155,"range":{"start_line":155,"start_character":24,"end_line":155,"end_character":28},"in_reply_to":"e4f2cad0_fa5381c6","updated":"2024-04-03 22:55:08.000000000","message":"This was just copypase from kolla_container module and it\u0027s probably linters problem because that object is not stringly typed but python dictionary as you can see here https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/basic.py#L330","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"033894bb60c9eb38ea0918e18ff39c0ff885ba6b","unresolved":true,"context_lines":[{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            cw \u003d PodmanFactsWorker(module)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        result \u003d bool(getattr(cw, module.params.get(\u0027action\u0027))())"},{"line_number":161,"context_line":"        module.exit_json(result\u003dresult, **cw.results)"},{"line_number":162,"context_line":"    except Exception:"},{"line_number":163,"context_line":"        module.fail_json(changed\u003dTrue, msg\u003drepr(traceback.format_exc()),"}],"source_content_type":"text/x-python","patch_set":12,"id":"af11c82d_7a78401a","line":160,"range":{"start_line":160,"start_character":47,"end_line":160,"end_character":51},"updated":"2024-04-03 15:24:00.000000000","message":"see above","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"0e8ff7e05f171ab30e9c09bb32b01af276ce7cb3","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            cw \u003d PodmanFactsWorker(module)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        result \u003d bool(getattr(cw, module.params.get(\u0027action\u0027))())"},{"line_number":161,"context_line":"        module.exit_json(result\u003dresult, **cw.results)"},{"line_number":162,"context_line":"    except Exception:"},{"line_number":163,"context_line":"        module.fail_json(changed\u003dTrue, msg\u003drepr(traceback.format_exc()),"}],"source_content_type":"text/x-python","patch_set":12,"id":"abb83f34_03bc6da1","line":160,"range":{"start_line":160,"start_character":47,"end_line":160,"end_character":51},"in_reply_to":"af11c82d_7a78401a","updated":"2024-06-10 09:18:18.000000000","message":"Acknowledged","commit_id":"8105fd37983ac9ad166ab12475c83f1a023dc179"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"129a966d9f79597af2bc9f3ac306f44e89fc626b","unresolved":true,"context_lines":[{"line_number":15,"context_line":"from abc import ABC"},{"line_number":16,"context_line":"from abc import abstractmethod"},{"line_number":17,"context_line":"from ansible.module_utils.basic import AnsibleModule"},{"line_number":18,"context_line":"import traceback"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"DOCUMENTATION \u003d \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"1cc7047b_6fc35c34","line":18,"updated":"2024-08-07 13:10:43.000000000","message":"Do we need everything from traceback module?","commit_id":"1eab2173e94dd0f905dca9b353417ae6e90de1a0"},{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"549d9b1d4b8a6557598ba3d7cc3b6236a8748184","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from abc import ABC"},{"line_number":16,"context_line":"from abc import abstractmethod"},{"line_number":17,"context_line":"from ansible.module_utils.basic import AnsibleModule"},{"line_number":18,"context_line":"import traceback"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"DOCUMENTATION \u003d \u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"3caa81e9_6d6626e1","line":18,"in_reply_to":"1cc7047b_6fc35c34","updated":"2024-08-09 08:17:30.000000000","message":"Done","commit_id":"1eab2173e94dd0f905dca9b353417ae6e90de1a0"}]}
