diff --git a/.changelog/4714.yml b/.changelog/4714.yml new file mode 100644 index 00000000000..876dde3fa39 --- /dev/null +++ b/.changelog/4714.yml @@ -0,0 +1,4 @@ +changes: +- description: Fixed an issue where RN111 would fail when it should not when the docker entry message was missing. + type: fix +pr_number: 4714 diff --git a/demisto_sdk/commands/validate/validators/RN_validators/RN111_is_docker_entry_match_yml.py b/demisto_sdk/commands/validate/validators/RN_validators/RN111_is_docker_entry_match_yml.py index b809a9a65c1..10acf9a7b3e 100644 --- a/demisto_sdk/commands/validate/validators/RN_validators/RN111_is_docker_entry_match_yml.py +++ b/demisto_sdk/commands/validate/validators/RN_validators/RN111_is_docker_entry_match_yml.py @@ -39,10 +39,11 @@ def obtain_invalid_content_items( and content_item.docker_image != old_obj.docker_image # type:ignore[attr-defined] and ( docker_entry := self.get_docker_image_entry( - content_item.pack.release_note.file_content, content_item.name + content_item.pack.release_note.file_content, + content_item.display_name, ) ) - and content_item.docker_image != docker_entry + and content_item.docker_image not in docker_entry ] def get_docker_image_entry(self, rn: str, content_item_name: str) -> str: @@ -52,8 +53,11 @@ def get_docker_image_entry(self, rn: str, content_item_name: str) -> str: if item.startswith(content_item_name): for entry in item.split("- "): if entry.startswith("Updated the Docker image to: "): - docker = entry.replace("Updated the Docker image to: ", "")[ - 1:-2 + docker_entry = entry.replace( + "Updated the Docker image to: ", "" + ) + docker = docker_entry[ + docker_entry.find("*") + 1 : docker_entry.rfind("*") ] break return docker