Skip to content

Commit

Permalink
[SPARK-50402][SQL][TESTS] Upgrade PostgreSQL docker image to 17.2
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

This PR aims to upgrade `PostgreSQL` docker image to 17.2.

### Why are the changes needed?

To test against the latest PostgreSQL images
- https://hub.docker.com/layers/library/postgres/17.2-alpine

```
$ docker images postgres
REPOSITORY   TAG           IMAGE ID       CREATED      SIZE
postgres     17.2-alpine   03844845c1d8   2 days ago   261MB
postgres     17.1-alpine   685d732c5876   9 days ago   261MB
```

### Does this PR introduce _any_ user-facing change?

No, this is a test-only change.

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #48946 from dongjoon-hyun/SPARK-50402.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
  • Loading branch information
dongjoon-hyun committed Nov 24, 2024
1 parent 8887d53 commit d9757b5
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ import org.apache.spark.sql.types._
import org.apache.spark.tags.DockerTest

/**
* To run this test suite for a specific version (e.g., postgres:17.1-alpine):
* To run this test suite for a specific version (e.g., postgres:17.2-alpine):
* {{{
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:17.1-alpine
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:17.2-alpine
* ./build/sbt -Pdocker-integration-tests
* "docker-integration-tests/testOnly org.apache.spark.sql.jdbc.PostgresIntegrationSuite"
* }}}
*/
@DockerTest
class PostgresIntegrationSuite extends DockerJDBCIntegrationSuite {
override val db = new DatabaseOnDocker {
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:17.1-alpine")
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:17.2-alpine")
override val env = Map(
"POSTGRES_PASSWORD" -> "rootpass"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import org.apache.spark.sql.execution.datasources.jdbc.connection.SecureConnecti
import org.apache.spark.tags.DockerTest

/**
* To run this test suite for a specific version (e.g., postgres:17.1-alpine):
* To run this test suite for a specific version (e.g., postgres:17.2-alpine):
* {{{
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:17.1-alpine
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:17.2-alpine
* ./build/sbt -Pdocker-integration-tests
* "docker-integration-tests/testOnly *PostgresKrbIntegrationSuite"
* }}}
Expand All @@ -38,7 +38,7 @@ class PostgresKrbIntegrationSuite extends DockerKrbJDBCIntegrationSuite {
override protected val keytabFileName = "postgres.keytab"

override val db = new DatabaseOnDocker {
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:17.1-alpine")
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:17.2-alpine")
override val env = Map(
"POSTGRES_PASSWORD" -> "rootpass"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import org.apache.spark.tags.DockerTest

/**
* This suite is used to generate subqueries, and test Spark against Postgres.
* To run this test suite for a specific version (e.g., postgres:17.1-alpine):
* To run this test suite for a specific version (e.g., postgres:17.2-alpine):
* {{{
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:17.1-alpine
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:17.2-alpine
* ./build/sbt -Pdocker-integration-tests
* "docker-integration-tests/testOnly org.apache.spark.sql.jdbc.GeneratedSubquerySuite"
* }}}
Expand All @@ -39,7 +39,7 @@ import org.apache.spark.tags.DockerTest
class GeneratedSubquerySuite extends DockerJDBCIntegrationSuite with QueryGeneratorHelper {

override val db = new DatabaseOnDocker {
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:17.1-alpine")
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:17.2-alpine")
override val env = Map(
"POSTGRES_PASSWORD" -> "rootpass"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import org.apache.spark.tags.DockerTest
* confidence, and you won't have to manually verify the golden files generated with your test.
* 2. Add this line to your .sql file: --ONLY_IF spark
*
* Note: To run this test suite for a specific version (e.g., postgres:17.1-alpine):
* Note: To run this test suite for a specific version (e.g., postgres:17.2-alpine):
* {{{
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:17.1-alpine
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:17.2-alpine
* ./build/sbt -Pdocker-integration-tests
* "testOnly org.apache.spark.sql.jdbc.PostgreSQLQueryTestSuite"
* }}}
Expand All @@ -45,7 +45,7 @@ class PostgreSQLQueryTestSuite extends CrossDbmsQueryTestSuite {
protected val customInputFilePath: String = new File(inputFilePath, "subquery").getAbsolutePath

override val db = new DatabaseOnDocker {
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:17.1-alpine")
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:17.2-alpine")
override val env = Map(
"POSTGRES_PASSWORD" -> "rootpass"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ import org.apache.spark.sql.types._
import org.apache.spark.tags.DockerTest

/**
* To run this test suite for a specific version (e.g., postgres:17.1-alpine)
* To run this test suite for a specific version (e.g., postgres:17.2-alpine)
* {{{
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:17.1-alpine
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:17.2-alpine
* ./build/sbt -Pdocker-integration-tests "testOnly *v2.PostgresIntegrationSuite"
* }}}
*/
@DockerTest
class PostgresIntegrationSuite extends DockerJDBCIntegrationV2Suite with V2JDBCTest {
override val catalogName: String = "postgresql"
override val db = new DatabaseOnDocker {
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:17.1-alpine")
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:17.2-alpine")
override val env = Map(
"POSTGRES_PASSWORD" -> "rootpass"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ import org.apache.spark.sql.util.CaseInsensitiveStringMap
import org.apache.spark.tags.DockerTest

/**
* To run this test suite for a specific version (e.g., postgres:17.1-alpine):
* To run this test suite for a specific version (e.g., postgres:17.2-alpine):
* {{{
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:17.1-alpine
* ENABLE_DOCKER_INTEGRATION_TESTS=1 POSTGRES_DOCKER_IMAGE_NAME=postgres:17.2-alpine
* ./build/sbt -Pdocker-integration-tests "testOnly *v2.PostgresNamespaceSuite"
* }}}
*/
@DockerTest
class PostgresNamespaceSuite extends DockerJDBCIntegrationSuite with V2JDBCNamespaceTest {
override val db = new DatabaseOnDocker {
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:17.1-alpine")
override val imageName = sys.env.getOrElse("POSTGRES_DOCKER_IMAGE_NAME", "postgres:17.2-alpine")
override val env = Map(
"POSTGRES_PASSWORD" -> "rootpass"
)
Expand Down

0 comments on commit d9757b5

Please sign in to comment.