-
Notifications
You must be signed in to change notification settings - Fork 337
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
[#3940] improvement(gradle): skip Docker dependent tests by default #3974
Conversation
docs/how-to-build.md
Outdated
+ Make sure you have installed Docker in your environment if you plan to run integration texts. Without it, some Docker-related tests may not run. | ||
+ Gravitino excludes all Docker-related tests by default. To run integration tests, make sure you have installed | ||
Docker in your environment and set `skipDockerDependentTests=false` in the `gradle.properties` file(or | ||
use `-PskipDockerDependentTests=false` in the command). Otherwise, some Docker-related tests may not execute. |
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.
What do we do with the configuration skipITs
? Do we need to remove 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.
I don't think we need to do anything with skipITs
. Because both UT and IT may use Docker, parameter skipITs
is used to control IT, while the new configuration skipDockerDependentTests
is used to control Docker.
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 understand what you mean. Do other people have any suggestions about 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.
I prefer to combine skipITs
and skipDockerDependentTests
, because it's too complicated. maybe we could use skipTestsWithDocker
and skipTestsWithoutDocker
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 prefer to combine
skipITs
andskipDockerDependentTests
, because it's too complicated. maybe we could useskipTestsWithDocker
andskipTestsWithoutDocker
This is the same with removing skipITs
, right?
build.gradle.kts
Outdated
@@ -676,7 +674,9 @@ fun printDockerCheckInfo() { | |||
val macDockerConnector = project.extra["macDockerConnector"] as? Boolean ?: false | |||
val isOrbStack = project.extra["isOrbStack"] as? Boolean ?: false | |||
|
|||
if (OperatingSystem.current().isMacOsX() && | |||
if (extra["skipDockerDependentTests"].toString().toBoolean()) { | |||
project.extra["docker_it_test"] = false |
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.
can you rename the "docker_it_test" to "docker_test"?
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.
Also for the tag name "gravitino-docker-it", can you please change to "gravitino-docker-test"?
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.
updated
I'm okay with the current changes. |
docs/how-to-build.md
Outdated
@@ -26,7 +26,9 @@ This software is licensed under the Apache License version 2." | |||
You don't have to preinstall the specified JDK environment, as Gradle detects the JDK version needed and downloads it automatically. | |||
+ Gravitino uses the Gradle Java Toolchain to detect and manage JDK versions, it checks the | |||
installed JDK by running the `./gradlew javaToolchains` command. See [Gradle Java Toolchain](https://docs.gradle.org/current/userguide/toolchains.html#sec:java_toolchain). | |||
+ Make sure you have installed Docker in your environment if you plan to run integration texts. Without it, some Docker-related tests may not run. | |||
+ Gravitino excludes all Docker-related tests by default. To run integration tests, make sure you have installed |
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.
To run integration tests and docker related unit test, or you can use 'to run docker related test'
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.
fixed
.github/workflows/build.yml
Outdated
@@ -66,7 +66,7 @@ jobs: | |||
cache: 'gradle' | |||
|
|||
- name: Build with Gradle | |||
run: ./gradlew build -x test -PjdkVersion=8 | |||
run: ./gradlew build -x test -PjdkVersion=8 -PskipDockerTests=false |
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'm a little confused, -x test
is used here to skip tests, so why do we need to set skipDockerTests=false?
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.
yeah, it's redundant, I will remove it
@@ -83,7 +83,7 @@ jobs: | |||
- name: Package Gravitino | |||
if : ${{ matrix.test-mode == 'deploy' }} | |||
run: | | |||
./gradlew compileDistribution -x test -PjdkVersion=${{ matrix.java-version }} | |||
./gradlew compileDistribution -x test -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false |
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.
Also here, it is meaningless to add -PskipDockerTests=false
here. Please recheck all the changes, don't blindly add the property.
docs/how-to-build.md
Outdated
@@ -26,7 +26,9 @@ This software is licensed under the Apache License version 2." | |||
You don't have to preinstall the specified JDK environment, as Gradle detects the JDK version needed and downloads it automatically. | |||
+ Gravitino uses the Gradle Java Toolchain to detect and manage JDK versions, it checks the | |||
installed JDK by running the `./gradlew javaToolchains` command. See [Gradle Java Toolchain](https://docs.gradle.org/current/userguide/toolchains.html#sec:java_toolchain). | |||
+ Make sure you have installed Docker in your environment if you plan to run integration texts. Without it, some Docker-related tests may not run. | |||
+ Gravitino excludes all Docker-related tests by default. To run Docker related tests, make sure you have installed | |||
Docker in your environment and set `skipDockerTests=false` in the `gradle.properties` file(or |
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.
Add the whitespace after file
.
docs/how-to-build.md
Outdated
+ Make sure you have installed Docker in your environment if you plan to run integration texts. Without it, some Docker-related tests may not run. | ||
+ Gravitino excludes all Docker-related tests by default. To run Docker related tests, make sure you have installed | ||
Docker in your environment and set `skipDockerTests=false` in the `gradle.properties` file(or | ||
use `-PskipDockerTests=false` in the command). Otherwise, some Docker-related tests may not execute. |
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.
"Otherwise, all Docker required tests will skip."
@@ -96,7 +96,7 @@ jobs: | |||
dev/ci/util_free_space.sh | |||
|
|||
- name: Build with Gradle | |||
run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -x :clients:client-python:build | |||
run: ./gradlew build -PskipITs -PjdkVersion=${{ matrix.java-version }} -PskipDockerTests=false -x :clients:client-python:build |
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 enable docker tests for build task?
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.
build task needs to run UTs, some UTs include docker tests(such as Doris catalog)
What changes were proposed in this pull request?
build
andtest
taskWhy are the changes needed?
Fix: #3940
Does this PR introduce any user-facing change?
no
How was this patch tested?
verified locally