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-35226][SQL][FOLLOWUP] Fix test added in SPARK-35226 for DB2KrbIntegrationSuite #32632

Closed
wants to merge 2 commits into from

Conversation

sarutak
Copy link
Member

@sarutak sarutak commented May 22, 2021

What changes were proposed in this pull request?

This PR fixes an test added in SPARK-35226 (#32344).

Why are the changes needed?

SELECT 1 seems non-valid query for DB2.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

DB2KrbIntegrationSuite passes on my laptop.

I also confirmed all the KrbIntegrationSuites pass with the following command.

build/sbt -Phive -Phive-thriftserver -Pdocker-integration-tests "testOnly org.apache.spark.sql.jdbc.*KrbIntegrationSuite"

@github-actions github-actions bot added the SQL label May 22, 2021

// Set the authentic krb5.conf but doesn't refresh config
// so this assertion is expected to fail.
intercept[Exception] {
Copy link
Member Author

Choose a reason for hiding this comment

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

DB2IntegrationSuite doesn't throw exception here so I'll remove this assertion.

Copy link
Member

Choose a reason for hiding this comment

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

Why does db2 throw no exception in this test? cc: @gaborgsomogyi

Copy link
Member

Choose a reason for hiding this comment

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

Anyway, since the other krb tests (e.g., PostgresKrbIntegrationSuite) refer this test, I think we cannot remove it simply.

Copy link
Member Author

@sarutak sarutak May 22, 2021

Choose a reason for hiding this comment

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

If refreshKrb5Config is not set to true, whether krb5.conf is always read or not when a new connection is established can depend on the implementation for each JDBC driver.
We can remove the assertion because the remaining two assertions are important.
The second assertion ensures that refreshKrb5Config enforces to refresh.

Copy link
Member

Choose a reason for hiding this comment

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

You mean DB2KrbIntegrationSuite instead of DB2IntegrationSuite, right?

DB2IntegrationSuite doesn't throw exception here so I'll remove this assertion.

I also confirmed that DB2KrbIntegrationSuite fails

[info] - SPARK-35226: JDBCOption should accept refreshKrb5Config parameter *** FAILED *** (1 second, 147 milliseconds)
[info]   Expected exception java.lang.Exception to be thrown, but no exception was thrown (DockerKrbJDBCIntegrationSuite.scala:187)
[info]   org.scalatest.exceptions.TestFailedException:

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, Yes. I mean DB2KrbIntegrationSuite.

@sarutak
Copy link
Member Author

sarutak commented May 22, 2021

cc: @dongjoon-hyun

@@ -200,11 +188,11 @@ abstract class DockerKrbJDBCIntegrationSuite extends DockerJDBCIntegrationSuite
.option("keytab", keytabFullPath)
.option("principal", principal)
.option("refreshKrb5Config", "true")
.option("query", "SELECT 1")
.option("query", "SELECT c0 FROM bar")
Copy link
Member

Choose a reason for hiding this comment

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

could you use dbtable instead?

@SparkQA
Copy link

SparkQA commented May 22, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43347/

@SparkQA
Copy link

SparkQA commented May 22, 2021

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43347/

@SparkQA
Copy link

SparkQA commented May 22, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43349/

@SparkQA
Copy link

SparkQA commented May 22, 2021

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43349/

@SparkQA
Copy link

SparkQA commented May 22, 2021

Test build #138825 has finished for PR 32632 at commit 29031c2.

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

@SparkQA
Copy link

SparkQA commented May 22, 2021

Test build #138827 has finished for PR 32632 at commit 3f9b37f.

  • This patch fails SparkR unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@sarutak
Copy link
Member Author

sarutak commented May 22, 2021

retest this please.

@SparkQA
Copy link

SparkQA commented May 22, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43352/

@SparkQA
Copy link

SparkQA commented May 22, 2021

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43352/

@SparkQA
Copy link

SparkQA commented May 22, 2021

Test build #138830 has finished for PR 32632 at commit 3f9b37f.

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

@dongjoon-hyun
Copy link
Member

Although this is a newly added test case issue, do you think this is a release blocker, @sarutak ?

@sarutak
Copy link
Member Author

sarutak commented May 23, 2021

@dongjoon-hyun
DB2KrbIntegrationSuite always fails so It's better to fix this issue but I don't think it's a blocker because this issue doesn't break any feature.

@HyukjinKwon
Copy link
Member

Yeah, I think we don't have to block the release.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Thank you, @sarutak and @maropu .

For the removed test coverage, I filed SPARK-35491.

Since this PR is a recovery of failed test case, I'll merge this first.

dongjoon-hyun pushed a commit that referenced this pull request May 23, 2021
…IntegrationSuite

### What changes were proposed in this pull request?

This PR fixes an test added in SPARK-35226 (#32344).

### Why are the changes needed?

`SELECT 1` seems non-valid query for DB2.

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

No.

### How was this patch tested?

DB2KrbIntegrationSuite passes on my laptop.

I also confirmed all the KrbIntegrationSuites pass with the following command.
```
build/sbt -Phive -Phive-thriftserver -Pdocker-integration-tests "testOnly org.apache.spark.sql.jdbc.*KrbIntegrationSuite"
```

Closes #32632 from sarutak/followup-SPARK-35226.

Authored-by: Kousuke Saruta <sarutak@oss.nttdata.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
(cherry picked from commit 1a43415)
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
@dongjoon-hyun
Copy link
Member

Oh, thank you, @HyukjinKwon ! I missed your comments while writing a review comments.

@HyukjinKwon
Copy link
Member

Nono nothing to do with my comment. No worries 👍

flyrain pushed a commit to flyrain/spark that referenced this pull request Sep 21, 2021
…IntegrationSuite

### What changes were proposed in this pull request?

This PR fixes an test added in SPARK-35226 (apache#32344).

### Why are the changes needed?

`SELECT 1` seems non-valid query for DB2.

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

No.

### How was this patch tested?

DB2KrbIntegrationSuite passes on my laptop.

I also confirmed all the KrbIntegrationSuites pass with the following command.
```
build/sbt -Phive -Phive-thriftserver -Pdocker-integration-tests "testOnly org.apache.spark.sql.jdbc.*KrbIntegrationSuite"
```

Closes apache#32632 from sarutak/followup-SPARK-35226.

Authored-by: Kousuke Saruta <sarutak@oss.nttdata.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
(cherry picked from commit 1a43415)
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants