Skip to content

Commit 2a453b1

Browse files
committed
[SPARK-47111][SQL][TESTS][3.4] Upgrade PostgreSQL JDBC driver to 42.7.2 and docker image to 16.2
### What changes were proposed in this pull request? This is a backport of #45191 . This PR aims to upgrade `PostgreSQL` JDBC driver and docker images. - JDBC Driver: `org.postgresql:postgresql` to 42.7.2 - Docker Image: `postgres` from `15.1-alpine` to `16.2-alpine` ### Why are the changes needed? To use the latest PostgreSQL combination in the following integration tests. - PostgresIntegrationSuite - PostgresKrbIntegrationSuite - v2/PostgresIntegrationSuite - v2/PostgresNamespaceSuite ### Does this PR introduce _any_ user-facing change? No. This is a pure test-environment update. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #45900 from dongjoon-hyun/SPARK-47111-3.4. Authored-by: Dongjoon Hyun <dhyun@apple.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
1 parent 5f8a00b commit 2a453b1

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/PostgresIntegrationSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ import org.apache.spark.sql.types.{ArrayType, DecimalType, FloatType, ShortType}
2929
import org.apache.spark.tags.DockerTest
3030

3131
/**
32-
* To run this test suite for a specific version (e.g., postgres:15.1):
32+
* To run this test suite for a specific version (e.g., postgres:16.2):
3333
* {{{
34-
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:15.1
34+
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:16.2
3535
* ./build/sbt -Pdocker-integration-tests
3636
* "testOnly org.apache.spark.sql.jdbc.PostgresIntegrationSuite"
3737
* }}}
3838
*/
3939
@DockerTest
4040
class PostgresIntegrationSuite extends DockerJDBCIntegrationSuite {
4141
override val db = new DatabaseOnDocker {
42-
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:15.1-alpine")
42+
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:16.2-alpine")
4343
override val env = Map(
4444
"POSTGRES_PASSWORD" -> "rootpass"
4545
)

connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/PostgresKrbIntegrationSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import org.apache.spark.sql.execution.datasources.jdbc.connection.SecureConnecti
2525
import org.apache.spark.tags.DockerTest
2626

2727
/**
28-
* To run this test suite for a specific version (e.g., postgres:15.1):
28+
* To run this test suite for a specific version (e.g., postgres:16.2):
2929
* {{{
30-
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:15.1
30+
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:16.2
3131
* ./build/sbt -Pdocker-integration-tests "testOnly *PostgresKrbIntegrationSuite"
3232
* }}}
3333
*/
@@ -37,7 +37,7 @@ class PostgresKrbIntegrationSuite extends DockerKrbJDBCIntegrationSuite {
3737
override protected val keytabFileName = "postgres.keytab"
3838

3939
override val db = new DatabaseOnDocker {
40-
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:15.1")
40+
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:16.2")
4141
override val env = Map(
4242
"POSTGRES_PASSWORD" -> "rootpass"
4343
)

connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/PostgresIntegrationSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ import org.apache.spark.sql.types._
2727
import org.apache.spark.tags.DockerTest
2828

2929
/**
30-
* To run this test suite for a specific version (e.g., postgres:15.1):
30+
* To run this test suite for a specific version (e.g., postgres:16.2)
3131
* {{{
32-
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:15.1
32+
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:16.2
3333
* ./build/sbt -Pdocker-integration-tests "testOnly *v2.PostgresIntegrationSuite"
3434
* }}}
3535
*/
3636
@DockerTest
3737
class PostgresIntegrationSuite extends DockerJDBCIntegrationV2Suite with V2JDBCTest {
3838
override val catalogName: String = "postgresql"
3939
override val db = new DatabaseOnDocker {
40-
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:15.1-alpine")
40+
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:16.2-alpine")
4141
override val env = Map(
4242
"POSTGRES_PASSWORD" -> "rootpass"
4343
)

connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/PostgresNamespaceSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ import org.apache.spark.sql.util.CaseInsensitiveStringMap
2626
import org.apache.spark.tags.DockerTest
2727

2828
/**
29-
* To run this test suite for a specific version (e.g., postgres:15.1):
29+
* To run this test suite for a specific version (e.g., postgres:16.2):
3030
* {{{
31-
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:15.1
31+
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:16.2
3232
* ./build/sbt -Pdocker-integration-tests "testOnly *v2.PostgresNamespaceSuite"
3333
* }}}
3434
*/
3535
@DockerTest
3636
class PostgresNamespaceSuite extends DockerJDBCIntegrationSuite with V2JDBCNamespaceTest {
3737
override val db = new DatabaseOnDocker {
38-
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:15.1-alpine")
38+
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:16.2-alpine")
3939
override val env = Map(
4040
"POSTGRES_PASSWORD" -> "rootpass"
4141
)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@
12391239
<dependency>
12401240
<groupId>org.postgresql</groupId>
12411241
<artifactId>postgresql</artifactId>
1242-
<version>42.5.1</version>
1242+
<version>42.7.2</version>
12431243
<scope>test</scope>
12441244
</dependency>
12451245
<dependency>

0 commit comments

Comments
 (0)