From fc19ad078c64618dd7174e9b4488f0a120a12657 Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Tue, 11 Feb 2025 16:09:52 +0200 Subject: [PATCH 01/15] Fix CaseLayouts --- demisto_sdk/commands/content_graph/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demisto_sdk/commands/content_graph/common.py b/demisto_sdk/commands/content_graph/common.py index aa0c3d23e4..13154f1f6b 100644 --- a/demisto_sdk/commands/content_graph/common.py +++ b/demisto_sdk/commands/content_graph/common.py @@ -304,6 +304,8 @@ def as_rn_header(self) -> str: return "Objects" elif self == ContentType.GENERIC_MODULE: return "Modules" + elif self == ContentType.LAYOUT: + return "Case Layouts" separated_str = pascalToSpace(self) return f"{separated_str}s" From bdc9f0fee76ed0c3a6d863c72ec541036c293b17 Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Tue, 11 Feb 2025 16:24:04 +0200 Subject: [PATCH 02/15] prints for test --- .../RN_validators/RN107_missing_release_notes_entry.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py index 8a5d34a552..3d3ae88d85 100644 --- a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py +++ b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py @@ -85,6 +85,11 @@ def get_pack_to_rn_headers( return pack_to_rn_headers def is_missing_rn(self, c: ContentItem) -> bool: + print("HERE") + print(c.display_name) + print(self.pack_to_rn_headers[c.pack_id].get( + c.content_type.as_rn_header, [] + )) return c.display_name not in self.pack_to_rn_headers[c.pack_id].get( c.content_type.as_rn_header, [] ) From 108659c79de0dcaeeac56477aa6e1bfe80cd1d34 Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Tue, 11 Feb 2025 16:50:31 +0200 Subject: [PATCH 03/15] prints for test --- demisto_sdk/commands/content_graph/common.py | 2 +- .../RN_validators/RN107_missing_release_notes_entry.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/demisto_sdk/commands/content_graph/common.py b/demisto_sdk/commands/content_graph/common.py index 13154f1f6b..d8b5fe4f21 100644 --- a/demisto_sdk/commands/content_graph/common.py +++ b/demisto_sdk/commands/content_graph/common.py @@ -305,7 +305,7 @@ def as_rn_header(self) -> str: elif self == ContentType.GENERIC_MODULE: return "Modules" elif self == ContentType.LAYOUT: - return "Case Layouts" + return "CaseLayouts" separated_str = pascalToSpace(self) return f"{separated_str}s" diff --git a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py index 3d3ae88d85..8a5d34a552 100644 --- a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py +++ b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py @@ -85,11 +85,6 @@ def get_pack_to_rn_headers( return pack_to_rn_headers def is_missing_rn(self, c: ContentItem) -> bool: - print("HERE") - print(c.display_name) - print(self.pack_to_rn_headers[c.pack_id].get( - c.content_type.as_rn_header, [] - )) return c.display_name not in self.pack_to_rn_headers[c.pack_id].get( c.content_type.as_rn_header, [] ) From cf53426210f3dabfd9bfc07ce2c61c1181bcf15e Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Wed, 12 Feb 2025 10:19:56 +0200 Subject: [PATCH 04/15] case_layouts as_rn_header --- demisto_sdk/commands/content_graph/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demisto_sdk/commands/content_graph/common.py b/demisto_sdk/commands/content_graph/common.py index d8b5fe4f21..91407262a2 100644 --- a/demisto_sdk/commands/content_graph/common.py +++ b/demisto_sdk/commands/content_graph/common.py @@ -304,8 +304,8 @@ def as_rn_header(self) -> str: return "Objects" elif self == ContentType.GENERIC_MODULE: return "Modules" - elif self == ContentType.LAYOUT: - return "CaseLayouts" + elif self == ContentType.CASE_LAYOUT: + return "Layouts" separated_str = pascalToSpace(self) return f"{separated_str}s" From 317255bb9872d9fd4c71bb68299ca13eb219744e Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Wed, 12 Feb 2025 10:26:34 +0200 Subject: [PATCH 05/15] fix From 75310e5afacf86efbeb84736c1603a70e43df1cc Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Wed, 12 Feb 2025 10:33:49 +0200 Subject: [PATCH 06/15] print --- .../RN_validators/RN107_missing_release_notes_entry.py | 1 + 1 file changed, 1 insertion(+) diff --git a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py index 8a5d34a552..80a80a4c61 100644 --- a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py +++ b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py @@ -82,6 +82,7 @@ def get_pack_to_rn_headers( for p in content_items if isinstance(p, Pack) and was_rn_added(p) } + print(pack_to_rn_headers) return pack_to_rn_headers def is_missing_rn(self, c: ContentItem) -> bool: From fac5901e3a382d2b9c104d29b883f71eec9279fd Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Wed, 12 Feb 2025 10:56:51 +0200 Subject: [PATCH 07/15] info --- .../RN_validators/RN107_missing_release_notes_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py index 80a80a4c61..31bb944d1e 100644 --- a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py +++ b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py @@ -82,7 +82,7 @@ def get_pack_to_rn_headers( for p in content_items if isinstance(p, Pack) and was_rn_added(p) } - print(pack_to_rn_headers) + logger.info(pack_to_rn_headers) return pack_to_rn_headers def is_missing_rn(self, c: ContentItem) -> bool: From c3d41a534f1a900c3dc55dbae7e65b9b358d85f9 Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Wed, 12 Feb 2025 11:07:43 +0200 Subject: [PATCH 08/15] check sync --- .../RN_validators/RN107_missing_release_notes_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py index 31bb944d1e..f66053f334 100644 --- a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py +++ b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py @@ -32,7 +32,7 @@ class IsMissingReleaseNoteEntries(BaseValidator[ContentTypes]): 'No release note entry was found for the {file_type} "{entity_name}" in the ' "{pack_name} pack. Please rerun the update-release-notes command without -u to " "generate an updated template. If you are trying to exclude an item from the release " - "notes, please refer to the documentation found here - " + "notes, please refer to the documentation found here - TODELETEEEEEE!!!!!!!!!!!!!!!" "https://xsoar.pan.dev/docs/integrations/changelog#excluding-items" ) related_field = "release notes" From 117c615ea3928df98ebddd866505c28c92a33752 Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Wed, 12 Feb 2025 12:14:49 +0200 Subject: [PATCH 09/15] fix --- .../RN_validators/RN107_missing_release_notes_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py index f66053f334..31bb944d1e 100644 --- a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py +++ b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py @@ -32,7 +32,7 @@ class IsMissingReleaseNoteEntries(BaseValidator[ContentTypes]): 'No release note entry was found for the {file_type} "{entity_name}" in the ' "{pack_name} pack. Please rerun the update-release-notes command without -u to " "generate an updated template. If you are trying to exclude an item from the release " - "notes, please refer to the documentation found here - TODELETEEEEEE!!!!!!!!!!!!!!!" + "notes, please refer to the documentation found here - " "https://xsoar.pan.dev/docs/integrations/changelog#excluding-items" ) related_field = "release notes" From 4b49938324871c0839b929d8f03cb5f12679803b Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Wed, 12 Feb 2025 12:16:29 +0200 Subject: [PATCH 10/15] fix --- .../RN_validators/RN107_missing_release_notes_entry.py | 1 - 1 file changed, 1 deletion(-) diff --git a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py index 31bb944d1e..8a5d34a552 100644 --- a/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py +++ b/demisto_sdk/commands/validate/validators/RN_validators/RN107_missing_release_notes_entry.py @@ -82,7 +82,6 @@ def get_pack_to_rn_headers( for p in content_items if isinstance(p, Pack) and was_rn_added(p) } - logger.info(pack_to_rn_headers) return pack_to_rn_headers def is_missing_rn(self, c: ContentItem) -> bool: From 8cd7ebd47fd13e4c522c5c3da8ebfef2341aab47 Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Wed, 12 Feb 2025 14:49:12 +0200 Subject: [PATCH 11/15] fix unittest --- .../commands/content_graph/tests/parsers_and_models_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/demisto_sdk/commands/content_graph/tests/parsers_and_models_test.py b/demisto_sdk/commands/content_graph/tests/parsers_and_models_test.py index 6c9004fcaf..79d2c5bdde 100644 --- a/demisto_sdk/commands/content_graph/tests/parsers_and_models_test.py +++ b/demisto_sdk/commands/content_graph/tests/parsers_and_models_test.py @@ -3033,6 +3033,9 @@ def test_convert_content_type_to_rn_header_and_from_release_note_header(): ContentType.COMMAND, ): continue + if content_type == ContentType.CASE_LAYOUT: + assert ContentType.LAYOUT == ContentType.convert_header_to_content_type(content_type.as_rn_header) + continue assert content_type == ContentType.convert_header_to_content_type( content_type.as_rn_header ) From ae3fc08d5d57c8be56e0ad17f7b2c5f1250873bc Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Wed, 12 Feb 2025 14:53:37 +0200 Subject: [PATCH 12/15] fix unittest --- .../commands/content_graph/tests/parsers_and_models_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demisto_sdk/commands/content_graph/tests/parsers_and_models_test.py b/demisto_sdk/commands/content_graph/tests/parsers_and_models_test.py index 79d2c5bdde..b08a1183c2 100644 --- a/demisto_sdk/commands/content_graph/tests/parsers_and_models_test.py +++ b/demisto_sdk/commands/content_graph/tests/parsers_and_models_test.py @@ -3033,9 +3033,11 @@ def test_convert_content_type_to_rn_header_and_from_release_note_header(): ContentType.COMMAND, ): continue + if content_type == ContentType.CASE_LAYOUT: assert ContentType.LAYOUT == ContentType.convert_header_to_content_type(content_type.as_rn_header) continue + assert content_type == ContentType.convert_header_to_content_type( content_type.as_rn_header ) From f67c37b30c8eb3ad9dee1f5a48f8e4b5e771ae5c Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Wed, 12 Feb 2025 15:40:38 +0200 Subject: [PATCH 13/15] changelog --- .changelog/4814.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .changelog/4814.yml diff --git a/.changelog/4814.yml b/.changelog/4814.yml new file mode 100644 index 0000000000..6c3017ff29 --- /dev/null +++ b/.changelog/4814.yml @@ -0,0 +1,4 @@ +changes: +- description: Fixed RN107 implementation for CaseLayout content type. + type: fix +pr_number: 4814 From 55b38436fc0810817707741366a93623e14040ff Mon Sep 17 00:00:00 2001 From: "iapt@paloaltonetworks.com" Date: Wed, 12 Feb 2025 15:42:22 +0200 Subject: [PATCH 14/15] pre-commit fix --- .../commands/content_graph/tests/parsers_and_models_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/demisto_sdk/commands/content_graph/tests/parsers_and_models_test.py b/demisto_sdk/commands/content_graph/tests/parsers_and_models_test.py index b08a1183c2..228749ee06 100644 --- a/demisto_sdk/commands/content_graph/tests/parsers_and_models_test.py +++ b/demisto_sdk/commands/content_graph/tests/parsers_and_models_test.py @@ -3035,7 +3035,9 @@ def test_convert_content_type_to_rn_header_and_from_release_note_header(): continue if content_type == ContentType.CASE_LAYOUT: - assert ContentType.LAYOUT == ContentType.convert_header_to_content_type(content_type.as_rn_header) + assert ContentType.LAYOUT == ContentType.convert_header_to_content_type( + content_type.as_rn_header + ) continue assert content_type == ContentType.convert_header_to_content_type( From 8e87815eed380529d64c965ec17e645b99ce95c0 Mon Sep 17 00:00:00 2001 From: inbalapt1 <164751454+inbalapt1@users.noreply.github.com> Date: Thu, 13 Feb 2025 09:05:53 +0200 Subject: [PATCH 15/15] Update .changelog/4814.yml Co-authored-by: Dan Tavori <38749041+dantavori@users.noreply.github.com> --- .changelog/4814.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changelog/4814.yml b/.changelog/4814.yml index 6c3017ff29..fea07d5d4a 100644 --- a/.changelog/4814.yml +++ b/.changelog/4814.yml @@ -1,4 +1,4 @@ changes: -- description: Fixed RN107 implementation for CaseLayout content type. +- description: Fixed an issue where the *RN107* validation failed when releasing an update on case layouts. type: fix pr_number: 4814