File tree 1 file changed +20
-4
lines changed
1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change 16
16
17
17
import pytest
18
18
import numpy as np
19
- from airflow import utils
20
- from airflow import DAG
21
- from airflow .providers .amazon .aws .operators .sagemaker import SageMakerTrainingOperator
22
- from airflow .providers .amazon .aws .operators .sagemaker_transform import SageMakerTransformOperator
19
+ from configparser import ParsingError
20
+ from sagemaker .utils import retries
21
+
22
+ for _ in retries (
23
+ max_retry_count = 10 , # 10*6 = 1min
24
+ exception_message_prefix = "airflow import " ,
25
+ seconds_to_sleep = 6 ,
26
+ ):
27
+ try :
28
+ from airflow import utils
29
+ from airflow import DAG
30
+ from airflow .providers .amazon .aws .operators .sagemaker import SageMakerTrainingOperator
31
+ from airflow .providers .amazon .aws .operators .sagemaker_transform import (
32
+ SageMakerTransformOperator ,
33
+ )
34
+
35
+ break
36
+ except ParsingError :
37
+ pass
38
+
23
39
from six .moves .urllib .parse import urlparse
24
40
25
41
import tests .integ
You can’t perform that action at this time.
0 commit comments