Skip to content

Commit

Permalink
Fix cn aws url (#596)
Browse files Browse the repository at this point in the history
* Check for China region whenn determining the AWS URL

* Fix domain URL

* Update version number in preparation for release version tagging
  • Loading branch information
sfc-gh-ema authored Dec 3, 2024
1 parent 3c85815 commit 961dd0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ val testSparkVersion = sys.props.get("spark.testVersion").getOrElse("3.5.0")
* Tests/jenkins/BumpUpSparkConnectorVersion/run.sh
* in snowflake repository.
*/
val sparkConnectorVersion = "3.1.0"
val sparkConnectorVersion = "3.1.1"

lazy val ItTest = config("it") extend Test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,15 @@ object CloudStorageOperations {
s3ClientBuilder.withEndpointConfiguration(
new AwsClientBuilder.EndpointConfiguration(stageEndPoint.get, regionName.get))
} else if (useRegionUrl.get.toBoolean) {
val awsDomain: String =
if (regionName.get.toLowerCase().startsWith("cn-")) {
".amazonaws.com.cn"
} else {
".amazonaws.com"
}
s3ClientBuilder.withEndpointConfiguration(
new AwsClientBuilder.EndpointConfiguration(
"s3." + regionName.get + ".amazonaws.com", regionName.get))
"s3." + regionName.get + awsDomain, regionName.get))
} else {
s3ClientBuilder.withRegion(regionName.get)
}
Expand Down

0 comments on commit 961dd0c

Please sign in to comment.