-
Notifications
You must be signed in to change notification settings - Fork 407
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
[#639] feat(CI): Improvement Docker management for integration test #711
Conversation
Code Coverage Report
|
integration-test/build.gradle.kts
Outdated
} | ||
} catch (e: Exception) { | ||
println("isMacDockerConnectorRunning execution failed: ${e.message}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably be better change to “checkContainerRunning command execution failed: ...”
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
integration-test/build.gradle.kts
Outdated
if (exitCode == 0) { | ||
project.extra["dockerRunning"] = true | ||
} else { | ||
println("checkDockerRunning Command execution failed with exit code $exitCode") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Low case "c" for "Command"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
containerSuite.getHiveContainer().getContainerIpAddress(), | ||
HiveContainer.HDFS_DEFAULTFS_PORT)) | ||
.config( | ||
"spark.hadoop.fs.defaultFS", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to set this configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it.
try { | ||
closer.close(); | ||
} catch (Exception e) { | ||
LOG.error(e.getMessage(), e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.getMessage()
should be simlar to e
, I think we should add some more words for error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
@@ -446,7 +482,10 @@ public void testHiveTableProperties() throws TException, InterruptedException { | |||
TABLE_TYPE, | |||
"external_table", | |||
LOCATION, | |||
"/tmp", | |||
String.format( | |||
"hdfs://%s:%d/tmp", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to use a random path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the basic path of the Table, all tables have different table name. so they don't clash.
I think you should also update the integration test doc. |
...n-test/src/test/java/com/datastrato/gravitino/integration/test/container/TrinoContainer.java
Outdated
Show resolved
Hide resolved
@xunliu ![]() ![]() |
@yuqi1129 Please help me review this PR again. Thanks |
@jerryshao I'm running tests with different CPU architectures and if they all pass, I'll update this PR status. |
DONE |
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.TestInstance; | ||
import org.junit.jupiter.api.TestInstance.Lifecycle; | ||
import org.junit.jupiter.api.condition.EnabledIf; | ||
|
||
@TestInstance(Lifecycle.PER_CLASS) | ||
@Tag("gravitino-docker-it") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IcebergRESTServiceIT doesn't need @Tag("gravitino-docker-it")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @FANNG1 Because IcebergRESTServiceIT
extent IcebergRESTServiceBaseIT
class.
We need get Hive Docker container IP in IcebergRESTServiceBaseIT
class.
The relevant code is here
private static Map<String, String> getIcebergJdbcCatalogConfigs() {
...
configMap.put(
AuxiliaryServiceManager.GRAVITINO_AUX_SERVICE_PREFIX
+ IcebergRESTService.SERVICE_NAME
+ "."
+ IcebergConfig.CATALOG_WAREHOUSE.getKey(),
GravitinoITUtils.genRandomName(
String.format(
"hdfs://%s:%d/user/hive/warehouse-jdbc-sqlite",
containerSuite.getHiveContainer().getContainerIpAddress(),
HiveContainer.HDFS_DEFAULTFS_PORT)));
I think it better to add the registerIcebergCatalogConfig()
abstract interface in IcebergRESTServiceBaseIT.class
, That would solve this problem.
So I created issue #874 to trace this issue, Please fix it(#874) and wait until you have time.
I fixed this issue. |
@jerryshao I fixed all problems, Please help me review this PR, Thanks. |
Please rebase the code and test it on Linux environment. |
@jerryshao I rebased the code and the test passed in the |
### What changes were proposed in this pull request? 1. make getCatalogConfig abstract, Hive&Jdbc&Memory implement these interfaces. 2. remove `gravitino-docker-it` tag from IcebergRESTServiceIT. ### Why are the changes needed? After #711, It takes too much time to test IcebergRESTServiceIT, there's no need to start the docker container for the memory catalog Fix: #874 ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? existing UT
What changes were proposed in this pull request?
I'm considering referencing the
testcontaine
approach inTrinoConnectorIT
. It can be better to use containers for testing.Why are the changes needed?
Currently, the
HiveCatalogIT
andCatalogIcebergIT
integrated test environment launches thegravitino-ci-hive
Docker image via a script, This creates a situation where the startup container is in GitHub Action or local to the user, and the test container is in the IT code, which is not uniform.Fix: #639
Does this PR introduce any user-facing change?
N/A
How was this patch tested?
CI Pass