Skip to content

Commit 36d7948

Browse files
dolfinusyabel
andcommitted
Add warning to S3 and SparkS3 if region is not set.
Co-authored-by: yabel <iabelogl10@mts.ru>
1 parent cb34080 commit 36d7948

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

onetl/connection/file_connection/s3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def _validate_port(cls, values):
137137
values["port"] = 443 if values["protocol"] == "https" else 80
138138
return values
139139

140-
@validator("region")
140+
@validator("region", always=True)
141141
def _region_is_recommended(cls, value):
142142
if not value:
143143
warnings.warn(

onetl/connection/file_df_connection/spark_s3/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def _check_java_class_imported(cls, spark: SparkSession) -> SparkSession:
408408

409409
return spark
410410

411-
@validator("region")
411+
@validator("region", always=True)
412412
def _region_is_recommended(cls, value):
413413
if not value:
414414
warnings.warn(

0 commit comments

Comments
 (0)