mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
chore(integrations): remove unnecessary error alerts (#8453)
This commit is contained in:
committed by
GitHub
parent
58298706d4
commit
481a43f3f6
@@ -84,9 +84,11 @@ def upload_s3_integration(
|
||||
try:
|
||||
connected, s3 = get_s3_client_from_integration(integration)
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
logger.info(
|
||||
f"S3 connection failed for integration {integration.id}: {e}"
|
||||
)
|
||||
integration.connected = False
|
||||
integration.save()
|
||||
continue
|
||||
|
||||
if connected:
|
||||
@@ -138,7 +140,7 @@ def upload_s3_integration(
|
||||
integration.connected = False
|
||||
integration.save()
|
||||
logger.error(
|
||||
f"S3 upload failed for integration {integration.id}: {s3.error}"
|
||||
f"S3 upload failed, connection failed for integration {integration.id}: {s3.error}"
|
||||
)
|
||||
|
||||
result = integration_executions == len(integrations)
|
||||
@@ -147,7 +149,7 @@ def upload_s3_integration(
|
||||
f"All the S3 integrations completed successfully for provider {provider_id}"
|
||||
)
|
||||
else:
|
||||
logger.error(f"Some S3 integrations failed for provider {provider_id}")
|
||||
logger.info(f"Some S3 integrations failed for provider {provider_id}")
|
||||
return result
|
||||
except Exception as e:
|
||||
logger.error(f"S3 integrations failed for provider {provider_id}: {str(e)}")
|
||||
|
||||
@@ -161,7 +161,7 @@ class TestS3IntegrationUploads:
|
||||
integration.save.assert_called_once()
|
||||
assert integration.connected is False
|
||||
mock_logger.error.assert_any_call(
|
||||
"S3 upload failed for integration i-1: Connection failed"
|
||||
"S3 upload failed, connection failed for integration i-1: Connection failed"
|
||||
)
|
||||
|
||||
@patch("tasks.jobs.integrations.rls_transaction")
|
||||
@@ -204,7 +204,7 @@ class TestS3IntegrationUploads:
|
||||
result = upload_s3_integration(tenant_id, provider_id, output_directory)
|
||||
|
||||
assert result is False
|
||||
mock_logger.error.assert_any_call(
|
||||
mock_logger.info.assert_any_call(
|
||||
"S3 connection failed for integration i-1: failed"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user