Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip core pack installation in XSIAM #27692

Merged
merged 10 commits into from
Jun 26, 2023
8 changes: 5 additions & 3 deletions Tests/Marketplace/search_and_uninstall_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from Tests.Marketplace.search_and_install_packs import install_packs
from time import sleep

UNREMOVABLE_PACKS = ['Base', 'CoreAlertFields', 'Core']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there mandatory dependencies for these packs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, for Core:
image
and for CoreAlertFields:
image


def get_all_installed_packs(client: demisto_client):
"""
Expand All @@ -35,8 +36,9 @@ def get_all_installed_packs(client: demisto_client):
installed_packs_ids_str = ', '.join(installed_packs_ids)
logging.debug(
f'The following packs are currently installed from a previous build run:\n{installed_packs_ids_str}')
if 'Base' in installed_packs_ids:
installed_packs_ids.remove('Base')
for pack in UNREMOVABLE_PACKS:
if pack in installed_packs_ids:
installed_packs_ids.remove('Base')
adi88d marked this conversation as resolved.
Show resolved Hide resolved
return installed_packs_ids
else:
result_object = ast.literal_eval(response_data)
Expand Down Expand Up @@ -153,7 +155,7 @@ def wait_for_uninstallation_to_complete(client: demisto_client):
installed_packs_amount_history, failed_uninstall_attempt_count = len(installed_packs), 0
# new calculation for num of retries
retries = math.ceil(len(installed_packs) / 2)
while len(installed_packs) > 1:
while len(installed_packs) > len(UNREMOVABLE_PACKS):
if retry > retries:
raise Exception('Waiting time for packs to be uninstalled has passed, there are still installed '
'packs. Aborting.')
Expand Down