You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/12/04 23:50:57 UTC

[airflow] branch main updated: Sagemaker system test: remove the log group associated to the test (#28012)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 7d760f39d5 Sagemaker system test: remove the log group associated to the test (#28012)
7d760f39d5 is described below

commit 7d760f39d542c302a85967708d5ec8c88335aa55
Author: Vincent <97...@users.noreply.github.com>
AuthorDate: Sun Dec 4 18:50:43 2022 -0500

    Sagemaker system test: remove the log group associated to the test (#28012)
---
 .../providers/amazon/aws/example_sagemaker_endpoint.py      | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/tests/system/providers/amazon/aws/example_sagemaker_endpoint.py b/tests/system/providers/amazon/aws/example_sagemaker_endpoint.py
index 1e2d43b83d..a8af714c94 100644
--- a/tests/system/providers/amazon/aws/example_sagemaker_endpoint.py
+++ b/tests/system/providers/amazon/aws/example_sagemaker_endpoint.py
@@ -90,13 +90,14 @@ def delete_endpoint(endpoint_name):
 
 @task(trigger_rule=TriggerRule.ALL_DONE)
 def delete_logs(env_id, endpoint_name):
-    generated_logs = [
-        # Format: ('log group name', 'log stream prefix')
-        ("/aws/sagemaker/TrainingJobs", env_id),
-        (f"/aws/sagemaker/Endpoints/{endpoint_name}", env_id),
-    ]
+    purge_logs(
+        [
+            # Format: ('log group name', 'log stream prefix')
+            ("/aws/sagemaker/TrainingJobs", env_id),
+        ]
+    )
 
-    purge_logs(generated_logs)
+    purge_logs(test_logs=[(f"/aws/sagemaker/Endpoints/{endpoint_name}", None)], force_delete=True)
 
 
 @task