From efe229a7680c3973a41cc9e839a6b10816ff2fe8 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 2 Feb 2025 22:54:34 +0100 Subject: [PATCH] fix: docker_compose_v2_run: don't need sanitize labels (#1034) (#1038) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit ea3ac5f195cbd3fb352a914d46a374571973d93a) Co-authored-by: Alexandre Díaz --- changelogs/fragments/1034-do-not-sanitize-labels.yaml | 2 ++ plugins/modules/docker_compose_v2_run.py | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/1034-do-not-sanitize-labels.yaml diff --git a/changelogs/fragments/1034-do-not-sanitize-labels.yaml b/changelogs/fragments/1034-do-not-sanitize-labels.yaml new file mode 100644 index 00000000..c723afe3 --- /dev/null +++ b/changelogs/fragments/1034-do-not-sanitize-labels.yaml @@ -0,0 +1,2 @@ +bugfixes: + - docker_compose_v2_run - the module has a conflict between the type of parameter it expects and the one it tries to sanitize. Fix removes the label sanitization step because they are already validated by the parameter definition (https://github.com/ansible-collections/community.docker/pull/1034). diff --git a/plugins/modules/docker_compose_v2_run.py b/plugins/modules/docker_compose_v2_run.py index 6c8df8ed..886c7601 100644 --- a/plugins/modules/docker_compose_v2_run.py +++ b/plugins/modules/docker_compose_v2_run.py @@ -248,8 +248,6 @@ from ansible_collections.community.docker.plugins.module_utils.compose_v2 import common_compose_argspec_ex, ) -from ansible_collections.community.docker.plugins.module_utils.util import sanitize_labels - class ExecManager(BaseComposeManager): def __init__(self, client): @@ -419,7 +417,6 @@ def main(): needs_api_version=False, **argspec_ex ) - sanitize_labels(client.module.params['labels'], 'labels', client) try: manager = ExecManager(client)