Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-27155][TEST] Parameterize Oracle docker image name #24086

Closed
wants to merge 5 commits into from

Conversation

lipzhu
Copy link
Contributor

@lipzhu lipzhu commented Mar 14, 2019

What changes were proposed in this pull request?

Update Oracle docker image name.

How was this patch tested?

./build/mvn test -Pdocker-integration-tests -pl :spark-docker-integration-tests_2.12

@lipzhu lipzhu changed the title update oracle docker image name [SPARK-27155][Build]update oracle docker image name Mar 14, 2019
@@ -55,7 +56,7 @@ class OracleIntegrationSuite extends DockerJDBCIntegrationSuite with SharedSQLCo
import testImplicits._

override val db = new DatabaseOnDocker {
override val imageName = "wnameless/oracle-xe-11g:16.04"
override val imageName = "deepdiver/docker-oracle-xe-11g:2.0"
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need update this image?

Copy link
Member

Choose a reason for hiding this comment

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

hmm.. who owns/licenses these images...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do we need update this image?

image

Copy link
Member

Choose a reason for hiding this comment

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

I see, but is the new image 'legal' either? is there an official one? and if not, should we be using or testing against it?

Copy link
Member

Choose a reason for hiding this comment

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

I also have the same concerns on the legal stuff. If we don't have an official docker image, we had better remove OracleIntegrationSuite from our docker test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems there is no official Oracle docker image, can we Ignore this Test to pass the docker integration test?

Copy link
Member

Choose a reason for hiding this comment

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

I think it should be deleted if there is no legitimate way to test this

Copy link
Member

Choose a reason for hiding this comment

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

agreed there.. one possible approach is to leave the image name as a parameter and document that someone needs to build one..

Copy link
Member

Choose a reason for hiding this comment

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

Looks like this is how you build it:
https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md
but looks like indeed you have to supply the binaries as they're not freely available.
Yes at best I think we'd need to disable this test and parameterize it, as it's not going to work reliably anyway.

@lipzhu
Copy link
Contributor Author

lipzhu commented Mar 15, 2019

Add a parameter SPARK_ORACLE_DOCKER_IMAGE_NAME for Oracle tests.

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

Is there a way to disable this test also, if it's run automatically? or at least skip its execution if no image is specified?

@@ -55,7 +55,8 @@ class OracleIntegrationSuite extends DockerJDBCIntegrationSuite with SharedSQLCo
import testImplicits._

override val db = new DatabaseOnDocker {
override val imageName = "wnameless/oracle-xe-11g:16.04"
override val imageName = sys.env.getOrElse("SPARK_ORACLE_DOCKER_IMAGE_NAME",
"wnameless/oracle-xe-11g:16.04")
Copy link
Member

Choose a reason for hiding this comment

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

We can't even have a default; this default doesn't work

@srowen
Copy link
Member

srowen commented Mar 18, 2019

OK, is the point that this will never be run anyway unless someone runs it manually? Then I think this is OK if you remove the default (that doesn't exist anyway) and add a few more comments pointing to the oracle repo about how the image can be built.

@dilipbiswal
Copy link
Contributor

Should we update the PR description to reflect what its doing now in case some one refers to it later ?

@SparkQA
Copy link

SparkQA commented Mar 20, 2019

Test build #4646 has finished for PR 24086 at commit 32c1144.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

* 2. Start docker - sudo service docker start
* 3. Download oracle 11g driver jar and put it in maven local repo:
* 1. Build Oracle database in Docker, please refer below link about how to.
* @see https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md
Copy link
Member

Choose a reason for hiding this comment

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

The line is too long, and the @see tag doesn't work here I think. Put "See" on the previous line and unindent to see if that gets it to under 100 characters

@lipzhu
Copy link
Contributor Author

lipzhu commented Mar 21, 2019

reset this please.

@SparkQA
Copy link

SparkQA commented Mar 21, 2019

Test build #4651 has started for PR 24086 at commit 21369b9.

"""
|INSERT INTO ts_with_timezone VALUES (
|1, to_timestamp_tz('1999-12-01 11:00:00 UTC','YYYY-MM-DD HH:MI:SS TZR'))
""".stripMargin).executeUpdate()
Copy link
Member

Choose a reason for hiding this comment

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

indentation?

Copy link
Member

Choose a reason for hiding this comment

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

Or @lipzhu why did this part change? I may be missing it but it seems like just a formatting change. I don't think it's necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@srowen Yes, it is just a formatting change, I see these 2 codes' style is not consistent with the others in this suite. If you think it it not necessary, I will change them back.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-27155][Build]update oracle docker image name [SPARK-27155][TEST] Parameterize Oracle docker image name Mar 21, 2019
@SparkQA
Copy link

SparkQA commented Mar 25, 2019

Test build #4660 has finished for PR 24086 at commit e7bc15d.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Mar 25, 2019

Test build #4661 has finished for PR 24086 at commit e7bc15d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Mar 25, 2019

Merged to master

@srowen srowen closed this in 1f2564d Mar 25, 2019
@dilipbiswal
Copy link
Contributor

@dongjoon-hyun Hi, i was trying to follow the instructions in OracleIntegrationSuite to try and build an image to run the oracle tests. I was trying it on mac.. Haven't been able to. Were you able to run this successfully ? Please let me know .. I get the following error when i try to build the image.

Building image 'oracle/database:11.2.0.2-xe' ...
Sending build context to Docker daemon  2.351GB
Step 1/10 : FROM oraclelinux:7-slim
 ---> f7512ac13c1b
Step 2/10 : MAINTAINER Gerald Venzl <gerald.venzl@oracle.com>
 ---> Running in 626a011e37a1
Removing intermediate container 626a011e37a1
 ---> 3a1f198c974f
Step 3/10 : ENV ORACLE_BASE=/u01/app/oracle     ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe     ORACLE_SID=XE     INSTALL_FILE_1="oracle-xe-11.2.0-1.0.x86_64.rpm.zip"     INSTALL_DIR="$HOME/install"     CONFIG_RSP="xe.rsp"     RUN_FILE="runOracle.sh"     PWD_FILE="setPassword.sh"     CHECK_DB_FILE="checkDBStatus.sh"
 ---> Running in 969673e55df7
Removing intermediate container 969673e55df7
 ---> 441b63aabd8a
Step 4/10 : ENV PATH=$ORACLE_HOME/bin:$PATH
 ---> Running in 52469448bf1b
Removing intermediate container 52469448bf1b
 ---> b80dbfddd0a9
Step 5/10 : COPY $INSTALL_FILE_1 $CONFIG_RSP $RUN_FILE $PWD_FILE $CHECK_DB_FILE $INSTALL_DIR/
COPY failed: stat /var/lib/docker/tmp/docker-builder372031542/oracle-xe-11.2.0-1.0.x86_64.rpm.zip: no such file or directory

@dongjoon-hyun
Copy link
Member

Hi, @dilipbiswal .
This PR doesn't imply that oracle/database:11.2.0.2-xe works, does this?

@srowen
Copy link
Member

srowen commented May 2, 2019

Yeah, I'm not clear one would be able to use this at all without an Oracle license. I guess I'd be surprised if there's any free public Oracle DB image out there.

@dilipbiswal
Copy link
Contributor

@dongjoon-hyun Oh... actually i just needed a little help to get the oracle tests to run as i am trying to fix a defect that would require me to add a test in this suite. I just used this recent PR to ask the question :-)

@dilipbiswal
Copy link
Contributor

@dongjoon-hyun A quick update: I got hold of an un-official image and got the tests to pass. So i am not blocked at the moment :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants