Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ jobs:
HIVE_PROFILE: hive2.3
GITHUB_PREV_SHA: ${{ github.event.before }}
SPARK_LOCAL_IP: localhost
ORACLE_DOCKER_IMAGE_NAME: gvenzl/oracle-xe:21.3.0
ORACLE_DOCKER_IMAGE_NAME: gvenzl/oracle-free:23.3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we backport this patch to branch-3.x? Otherwise, their daily tests will use gvenzl/oracle-free:23.3, but the test code in branch-3.x still uses gvenzl/oracle-xe:21.3.0.

It seems that the OracleIntegrationSuite in the Docker integration tests task of the daily tests for branch-3.x has failed recently.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or can we use a solution similar to #43306?

For example, for branch-3.x, explicitly add the environment variable ORACLE_DOCKER_IMAGE_NAME like

envs: >-
        {
          "SCALA_PROFILE": "scala2.13",
          "PYTHON_TO_TEST": "",
          "ORACLE_DOCKER_IMAGE_NAME": "gvenzl/oracle-xe:21.3.0"
        }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backporting would be better for all downstream, @LuciferYang . Feel free to backport.

Copy link
Contributor

@LuciferYang LuciferYang Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or can we use a solution similar to #43306?

For example, for branch-3.x, explicitly add the environment variable ORACLE_DOCKER_IMAGE_NAME like

envs: >-
        {
          "SCALA_PROFILE": "scala2.13",
          "PYTHON_TO_TEST": "",
          "ORACLE_DOCKER_IMAGE_NAME": "gvenzl/oracle-xe:21.3.0"
        }

Hmm... Are we sure that this method can't override this environment variable? If possible, this solution would be relatively simple ... Can you help to confirm this? @HyukjinKwon Thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or can we use a solution similar to #43306?

For example, for branch-3.x, explicitly add the environment variable ORACLE_DOCKER_IMAGE_NAME like

envs: >-
        {
          "SCALA_PROFILE": "scala2.13",
          "PYTHON_TO_TEST": "",
          "ORACLE_DOCKER_IMAGE_NAME": "gvenzl/oracle-xe:21.3.0"
        }

Let me see if I can test this in my local repository.

SKIP_MIMA: true
SKIP_PACKAGING: true
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,40 +41,42 @@ import org.apache.spark.tags.DockerTest
* - The documentation on how to build Oracle RDBMS in a container is at
* https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md
* - Official Oracle container images can be found at https://container-registry.oracle.com
* - A trustable and streamlined Oracle XE database image can be found on Docker Hub at
* https://hub.docker.com/r/gvenzl/oracle-xe see also https://github.com/gvenzl/oci-oracle-xe
* - Trustable and streamlined Oracle Database Free images can be found on Docker Hub at
* https://hub.docker.com/r/gvenzl/oracle-free
* see also https://github.com/gvenzl/oci-oracle-free
* 2. Run: export ORACLE_DOCKER_IMAGE_NAME=image_you_want_to_use_for_testing
* - Example: export ORACLE_DOCKER_IMAGE_NAME=gvenzl/oracle-xe:latest
* - Example: export ORACLE_DOCKER_IMAGE_NAME=gvenzl/oracle-free:latest
* 3. Run: export ENABLE_DOCKER_INTEGRATION_TESTS=1
* 4. Start docker: sudo service docker start
* - Optionally, docker pull $ORACLE_DOCKER_IMAGE_NAME
* 5. Run Spark integration tests for Oracle with: ./build/sbt -Pdocker-integration-tests
* "docker-integration-tests/testOnly org.apache.spark.sql.jdbc.OracleIntegrationSuite"
*
* A sequence of commands to build the Oracle XE database container image:
* A sequence of commands to build the Oracle Database Free container image:
* $ git clone https://github.com/oracle/docker-images.git
* $ cd docker-images/OracleDatabase/SingleInstance/dockerfiles
* $ ./buildContainerImage.sh -v 21.3.0 -x
* $ export ORACLE_DOCKER_IMAGE_NAME=oracle/database:21.3.0-xe
* $ ./buildContainerImage.sh -v 23.2.0 -f
* $ export ORACLE_DOCKER_IMAGE_NAME=oracle/database:23.2.0-free
*
* This procedure has been validated with Oracle 18.4.0 and 21.3.0 Express Edition.
* This procedure has been validated with Oracle Databae Free version 23.2.0,
* and with Oracle Express Edition versions 18.4.0 and 21.3.0
*/
@DockerTest
class OracleIntegrationSuite extends DockerJDBCIntegrationSuite with SharedSparkSession {
import testImplicits._

override val db = new DatabaseOnDocker {
lazy override val imageName =
sys.env.getOrElse("ORACLE_DOCKER_IMAGE_NAME", "gvenzl/oracle-xe:21.3.0")
sys.env.getOrElse("ORACLE_DOCKER_IMAGE_NAME", "gvenzl/oracle-free:23.3")
val oracle_password = "Th1s1sThe0racle#Pass"
override val env = Map(
"ORACLE_PWD" -> oracle_password, // oracle images uses this
"ORACLE_PASSWORD" -> oracle_password // gvenzl/oracle-xe uses this
"ORACLE_PASSWORD" -> oracle_password // gvenzl/oracle-free uses this
)
override val usesIpc = false
override val jdbcPort: Int = 1521
override def getJdbcUrl(ip: String, port: Int): String =
s"jdbc:oracle:thin:system/$oracle_password@//$ip:$port/xe"
s"jdbc:oracle:thin:system/$oracle_password@//$ip:$port/freepdb1"
}

override val connectionTimeout = timeout(7.minutes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,25 @@ import org.apache.spark.tags.DockerTest
* - The documentation on how to build Oracle RDBMS in a container is at
* https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md
* - Official Oracle container images can be found at https://container-registry.oracle.com
* - A trustable and streamlined Oracle XE database image can be found on Docker Hub at
* https://hub.docker.com/r/gvenzl/oracle-xe see also https://github.com/gvenzl/oci-oracle-xe
* - Trustable and streamlined Oracle Database Free images can be found on Docker Hub at
* https://hub.docker.com/r/gvenzl/oracle-free
* see also https://github.com/gvenzl/oci-oracle-free
* 2. Run: export ORACLE_DOCKER_IMAGE_NAME=image_you_want_to_use_for_testing
* - Example: export ORACLE_DOCKER_IMAGE_NAME=gvenzl/oracle-xe:latest
* - Example: export ORACLE_DOCKER_IMAGE_NAME=gvenzl/oracle-free:latest
* 3. Run: export ENABLE_DOCKER_INTEGRATION_TESTS=1
* 4. Start docker: sudo service docker start
* - Optionally, docker pull $ORACLE_DOCKER_IMAGE_NAME
* 5. Run Spark integration tests for Oracle with: ./build/sbt -Pdocker-integration-tests
* "testOnly org.apache.spark.sql.jdbc.v2.OracleIntegrationSuite"
*
* A sequence of commands to build the Oracle XE database container image:
* A sequence of commands to build the Oracle Database Free container image:
* $ git clone https://github.com/oracle/docker-images.git
* $ cd docker-images/OracleDatabase/SingleInstance/dockerfiles
* $ ./buildContainerImage.sh -v 21.3.0 -x
* $ export ORACLE_DOCKER_IMAGE_NAME=oracle/database:21.3.0-xe
* $ ./buildContainerImage.sh -v 23.2.0 -f
* $ export ORACLE_DOCKER_IMAGE_NAME=oracle/database:23.2.0-free
*
* This procedure has been validated with Oracle 18.4.0 and 21.3.0 Express Edition.
* This procedure has been validated with Oracle Databae Free version 23.2.0,
* and with Oracle Express Edition versions 18.4.0 and 21.3.0
*/
@DockerTest
class OracleIntegrationSuite extends DockerJDBCIntegrationV2Suite with V2JDBCTest {
Expand All @@ -74,16 +76,16 @@ class OracleIntegrationSuite extends DockerJDBCIntegrationV2Suite with V2JDBCTes
override val namespaceOpt: Option[String] = Some("SYSTEM")
override val db = new DatabaseOnDocker {
lazy override val imageName =
sys.env.getOrElse("ORACLE_DOCKER_IMAGE_NAME", "gvenzl/oracle-xe:21.3.0")
sys.env.getOrElse("ORACLE_DOCKER_IMAGE_NAME", "gvenzl/oracle-free:23.3")
val oracle_password = "Th1s1sThe0racle#Pass"
override val env = Map(
"ORACLE_PWD" -> oracle_password, // oracle images uses this
"ORACLE_PASSWORD" -> oracle_password // gvenzl/oracle-xe uses this
"ORACLE_PASSWORD" -> oracle_password // gvenzl/oracle-free uses this
)
override val usesIpc = false
override val jdbcPort: Int = 1521
override def getJdbcUrl(ip: String, port: Int): String =
s"jdbc:oracle:thin:system/$oracle_password@//$ip:$port/xe"
s"jdbc:oracle:thin:system/$oracle_password@//$ip:$port/freepdb1"
}

override def sparkConf: SparkConf = super.sparkConf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,25 @@ import org.apache.spark.tags.DockerTest
* - The documentation on how to build Oracle RDBMS in a container is at
* https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md
* - Official Oracle container images can be found at https://container-registry.oracle.com
* - A trustable and streamlined Oracle XE database image can be found on Docker Hub at
* https://hub.docker.com/r/gvenzl/oracle-xe see also https://github.com/gvenzl/oci-oracle-xe
* - Trustable and streamlined Oracle Database Free images can be found on Docker Hub at
* https://hub.docker.com/r/gvenzl/oracle-free
* see also https://github.com/gvenzl/oci-oracle-free
* 2. Run: export ORACLE_DOCKER_IMAGE_NAME=image_you_want_to_use_for_testing
* - Example: export ORACLE_DOCKER_IMAGE_NAME=gvenzl/oracle-xe:latest
* - Example: export ORACLE_DOCKER_IMAGE_NAME=gvenzl/oracle-free:latest
* 3. Run: export ENABLE_DOCKER_INTEGRATION_TESTS=1
* 4. Start docker: sudo service docker start
* - Optionally, docker pull $ORACLE_DOCKER_IMAGE_NAME
* 5. Run Spark integration tests for Oracle with: ./build/sbt -Pdocker-integration-tests
* "testOnly org.apache.spark.sql.jdbc.v2.OracleNamespaceSuite"
*
* A sequence of commands to build the Oracle XE database container image:
* A sequence of commands to build the Oracle Database Free container image:
* $ git clone https://github.com/oracle/docker-images.git
* $ cd docker-images/OracleDatabase/SingleInstance/dockerfiles
* $ ./buildContainerImage.sh -v 21.3.0 -x
* $ export ORACLE_DOCKER_IMAGE_NAME=oracle/database:21.3.0-xe
* $ ./buildContainerImage.sh -v 23.2.0 -f
* $ export ORACLE_DOCKER_IMAGE_NAME=oracle/database:23.2.0-free
*
* This procedure has been validated with Oracle 18.4.0 and 21.3.0 Express Edition.
* This procedure has been validated with Oracle Databae Free version 23.2.0,
* and with Oracle Express Edition versions 18.4.0 and 21.3.0
*/
@DockerTest
class OracleNamespaceSuite extends DockerJDBCIntegrationSuite with V2JDBCNamespaceTest {
Expand All @@ -57,16 +59,16 @@ class OracleNamespaceSuite extends DockerJDBCIntegrationSuite with V2JDBCNamespa

override val db = new DatabaseOnDocker {
lazy override val imageName =
sys.env.getOrElse("ORACLE_DOCKER_IMAGE_NAME", "gvenzl/oracle-xe:21.3.0")
sys.env.getOrElse("ORACLE_DOCKER_IMAGE_NAME", "gvenzl/oracle-free:23.3")
val oracle_password = "Th1s1sThe0racle#Pass"
override val env = Map(
"ORACLE_PWD" -> oracle_password, // oracle images uses this
"ORACLE_PASSWORD" -> oracle_password // gvenzl/oracle-xe uses this
"ORACLE_PASSWORD" -> oracle_password // gvenzl/oracle-free uses this
)
override val usesIpc = false
override val jdbcPort: Int = 1521
override def getJdbcUrl(ip: String, port: Int): String =
s"jdbc:oracle:thin:system/$oracle_password@//$ip:$port/xe"
s"jdbc:oracle:thin:system/$oracle_password@//$ip:$port/freepdb1"
}

val map = new CaseInsensitiveStringMap(
Expand Down