Skip to content

Commit

Permalink
Adding retry option for glue and sagemaker as well
Browse files Browse the repository at this point in the history
  • Loading branch information
treff7es committed Aug 29, 2023
1 parent 08be9e6 commit 534f3ad
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions metadata-ingestion/src/datahub/ingestion/source/aws/aws_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,28 @@ def get_s3_resource(
return resource

def get_glue_client(self) -> "GlueClient":
return self.get_session().client("glue")
return self.get_session().client(
"glue",
config=Config(
proxies=self.aws_proxy,
retries={
"max_attempts": self.aws_retry_num,
"mode": self.aws_retry_mode,
},
),
)

def get_sagemaker_client(self) -> "SageMakerClient":
return self.get_session().client("sagemaker")
return self.get_session().client(
"sagemaker",
config=Config(
proxies=self.aws_proxy,
retries={
"max_attempts": self.aws_retry_num,
"mode": self.aws_retry_mode,
},
),
)


class AwsSourceConfig(EnvConfigMixin, AwsConnectionConfig):
Expand Down

0 comments on commit 534f3ad

Please sign in to comment.