Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.7-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazcy committed Aug 21, 2024
2 parents 418d049 + 47513ac commit cd07120
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 41 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
* Fixed bug in Java driver where connection pool was not removing dead connections under certain error conditions.
* Raised handshake exceptions for Java driver for `NoHostAvailableException` situations.
* The default logging level for Gremlin Console in Windows is set to the same WARN level as for Linux.
* Updated to Docker Compose V2 with `docker-compose` changed to `docker compose` in pom and script files.
* Add command line option `-l` to change logging level for Gremlin Console in Windows.
[[release-3-6-7]]
Expand Down
12 changes: 6 additions & 6 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ EOF

function check_status {
status=$?
[ "$1" == "down" ] && docker-compose down
[ "$1" == "down" ] && docker compose down
popd > /dev/null
[ $status -ne 0 ] && exit $status
}
Expand All @@ -128,15 +128,15 @@ docker run -p 80:80 ${TINKERPOP_DOCKER_OPTS} ${REMOVE_CONTAINER} \
check_status

if [ -n "${RUN_TESTS}" ]; then
# If testing, then build base server which is required by the following docker-compose.
# If testing, then build base server which is required by the following docker compose.
pushd ${ABS_PROJECT_HOME}/gremlin-server > /dev/null
docker build -f ./Dockerfile --build-arg GREMLIN_SERVER_DIR=target/apache-tinkerpop-gremlin-server-${GREMLIN_SERVER}-standalone -t tinkerpop/gremlin-server:${GREMLIN_SERVER} .
check_status
fi

if [ -n "${INCLUDE_GO}" ] && [ -n "${RUN_TESTS}" ]; then
pushd ${ABS_PROJECT_HOME}/gremlin-go > /dev/null
docker-compose up --build --exit-code-from gremlin-go-integration-tests
docker compose up --build --exit-code-from gremlin-go-integration-tests
check_status "down"
fi

Expand All @@ -145,19 +145,19 @@ if [ -n "${INCLUDE_PYTHON}" ] && [ -n "${RUN_TESTS}" ]; then
export BUILD_DIR=$(pwd)/target/python3/
mkdir -p ${BUILD_DIR}
cp -r ./src/main/python/* ${BUILD_DIR}
docker-compose up --build --abort-on-container-exit gremlin-server-test-python gremlin-python-integration-tests
docker compose up --build --abort-on-container-exit gremlin-server-test-python gremlin-python-integration-tests
check_status "down"
fi

if [ -n "${INCLUDE_DOTNET}" ] && [ -n "${RUN_TESTS}" ]; then
pushd ${ABS_PROJECT_HOME}/gremlin-dotnet/test > /dev/null
docker-compose up --build --exit-code-from gremlin-dotnet-integration-tests
docker compose up --build --exit-code-from gremlin-dotnet-integration-tests
check_status "down"
fi

if [ -n "${INCLUDE_JAVASCRIPT}" ] && [ -n "${RUN_TESTS}" ]; then
pushd ${ABS_PROJECT_HOME}/gremlin-javascript/src/main/javascript/gremlin-javascript > /dev/null
docker-compose up --build --exit-code-from gremlin-js-integration-tests
docker compose up --build --exit-code-from gremlin-js-integration-tests
check_status "down"
fi

Expand Down
12 changes: 6 additions & 6 deletions docs/src/dev/developer/development-environment.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ go build
Docker allows you to test the driver without installing any dependencies. The following command can be used to run docker:
[source,text]
docker-compose up --exit-code-from gremlin-go-integration-tests
docker compose up --exit-code-from gremlin-go-integration-tests
See the <<release-environment,Release Environment>> section for more information on release manager configurations.
Expand Down Expand Up @@ -635,12 +635,12 @@ your Platform:
* Run Maven commands, e.g. `mvn clean install` inside of project folder e.g. `tinkerpop/gremlin-go`, or `mvn clean install -pl gremlin-go`
inside of `tinkerpop` (platform-agnostic - recommended)
* Add `GREMLIN_SERVER=<server-image-version>` and `HOME=<user-home-directory>` to an `.env` file inside project folder and run `docker-compose up --exit-code-from gremlin-go-integration-tests` (Platform-agnostic).
* Run `GREMLIN_SERVER=<server-image-version> docker-compose up --exit-code-from gremlin-go-integration-tests` in Unix/Linux.
* Run `$env:GREMLIN_SERVER="<server-image-version>";$env:HOME=$env:USERPROFILE;docker-compose up --exit-code-from gremlin-go-integration-tests` in Windows PowerShell.
* Add `GREMLIN_SERVER=<server-image-version>` and `HOME=<user-home-directory>` to an `.env` file inside project folder and run `docker compose up --exit-code-from gremlin-go-integration-tests` (Platform-agnostic).
* Run `GREMLIN_SERVER=<server-image-version> docker compose up --exit-code-from gremlin-go-integration-tests` in Unix/Linux.
* Run `$env:GREMLIN_SERVER="<server-image-version>";$env:HOME=$env:USERPROFILE;docker compose up --exit-code-from gremlin-go-integration-tests` in Windows PowerShell.
You should see exit code 0 upon successful completion of the test suites. Run `docker-compose down` to remove the
service containers (not needed if you executed Maven commands or `run.sh`), or `docker-compose down --rmi all` to
You should see exit code 0 upon successful completion of the test suites. Run `docker compose down` to remove the
service containers (not needed if you executed Maven commands or `run.sh`), or `docker compose down --rmi all` to
remove the service containers while deleting all used images.
Note for running docker with MacOS on ARM processors: Docker's performance is extremely poor on ARM Mac's in its
Expand Down
2 changes: 0 additions & 2 deletions gremlin-dotnet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.

version: "3.8"

services:

gremlin-server-test-dotnet:
Expand Down
6 changes: 4 additions & 2 deletions gremlin-dotnet/test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ limitations under the License.
<!-- setting this env variable is needed to be cross-platform compatible -->
<HOME>${user.home}</HOME>
</environmentVariables>
<executable>docker-compose</executable>
<executable>docker</executable>
<arguments>
<argument>compose</argument>
<argument>up</argument>
<argument>--build</argument>
<argument>--exit-code-from</argument>
Expand All @@ -120,8 +121,9 @@ limitations under the License.
<configuration>
<skip>${skipTests}</skip>
<!-- don't need to set env variables for container tear down -->
<executable>docker-compose</executable>
<executable>docker</executable>
<arguments>
<argument>compose</argument>
<argument>down</argument>
</arguments>
</configuration>
Expand Down
2 changes: 0 additions & 2 deletions gremlin-go/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.

version: "3.8"

services:

gremlin-server-test:
Expand Down
8 changes: 4 additions & 4 deletions gremlin-go/driver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ The docker compose environment variable `HOME` specifies the user home directory
There are different ways to launch the test suite and set the `GREMLIN_SERVER` environment variable depending on your Platform:
- Run Maven commands, e.g. `mvn clean install` inside of `tinkerpop/gremlin-go`, or `mvn clean install -pl gremlin-go` inside of `tinkerpop` (platform-agnostic - recommended)
- Run the `run.sh` script, which sets `GREMLIN_SERVER` by default. Run `./run.sh -h` for usage information (Unix/Linux - recommended).
- Add `GREMLIN_SERVER=<server-image-version>` and `HOME=<user-home-directory>` to an `.env` file inside `gremlin-go` and run `docker-compose up --exit-code-from gremlin-go-integration-tests` (Platform-agnostic).
- Run `GREMLIN_SERVER=<server-image-version> docker-compose up --exit-code-from gremlin-go-integration-tests` in Unix/Linux.
- Run `$env:GREMLIN_SERVER="<server-image-version>";$env:HOME=$env:USERPROFILE;docker-compose up --exit-code-from gremlin-go-integration-tests` in Windows PowerShell.
- Add `GREMLIN_SERVER=<server-image-version>` and `HOME=<user-home-directory>` to an `.env` file inside `gremlin-go` and run `docker compose up --exit-code-from gremlin-go-integration-tests` (Platform-agnostic).
- Run `GREMLIN_SERVER=<server-image-version> docker compose up --exit-code-from gremlin-go-integration-tests` in Unix/Linux.
- Run `$env:GREMLIN_SERVER="<server-image-version>";$env:HOME=$env:USERPROFILE;docker compose up --exit-code-from gremlin-go-integration-tests` in Windows PowerShell.

You should see exit code 0 upon successful completion of the test suites. Run `docker-compose down` to remove the service containers (not needed if you executed Maven commands or `run.sh`), or `docker-compose down --rmi all` to remove the service containers while deleting all used images.
You should see exit code 0 upon successful completion of the test suites. Run `docker compose down` to remove the service containers (not needed if you executed Maven commands or `run.sh`), or `docker compose down --rmi all` to remove the service containers while deleting all used images.

[go]: https://go.dev/dl/
[gomods]: https://go.dev/blog/using-go-modules
Expand Down
6 changes: 4 additions & 2 deletions gremlin-go/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ limitations under the License.
<!-- setting this env variable is needed to be cross-platform compatible -->
<HOME>${user.home}</HOME>
</environmentVariables>
<executable>docker-compose</executable>
<executable>docker</executable>
<arguments>
<argument>compose</argument>
<argument>up</argument>
<argument>--build</argument>
<argument>--exit-code-from</argument>
Expand All @@ -131,8 +132,9 @@ limitations under the License.
<configuration>
<skip>${skipTests}</skip>
<!-- don't need to set env variables for container tear down -->
<executable>docker-compose</executable>
<executable>docker</executable>
<arguments>
<argument>compose</argument>
<argument>down</argument>
</arguments>
</configuration>
Expand Down
4 changes: 2 additions & 2 deletions gremlin-go/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ ABS_PROJECT_HOME=$(dirname $(realpath "$0"))/..
export ABS_PROJECT_HOME

# Passes current gremlin server version into docker compose as environment variable
docker-compose up --build --exit-code-from gremlin-go-integration-tests
docker compose up --build --exit-code-from gremlin-go-integration-tests
EXIT_CODE=$?
# Removes all service containers
docker-compose down
docker compose down
exit $EXIT_CODE
6 changes: 4 additions & 2 deletions gremlin-javascript/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ limitations under the License.
<!-- setting this env variable is needed to be cross-platform compatible -->
<HOME>${user.home}</HOME>
</environmentVariables>
<executable>docker-compose</executable>
<executable>docker</executable>
<arguments>
<argument>compose</argument>
<argument>up</argument>
<argument>--build</argument>
<argument>--exit-code-from</argument>
Expand All @@ -275,8 +276,9 @@ limitations under the License.
<configuration>
<skip>${skipTests}</skip>
<!-- don't need to set env variables for container tear down -->
<executable>docker-compose</executable>
<executable>docker</executable>
<arguments>
<argument>compose</argument>
<argument>down</argument>
</arguments>
<workingDirectory>./src/main/javascript/gremlin-javascript</workingDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.

version: "3.8"

services:

gremlin-server-test-js:
Expand Down
2 changes: 0 additions & 2 deletions gremlin-python/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.

version: "3.8"

services:

gremlin-server-test-python:
Expand Down
18 changes: 9 additions & 9 deletions gremlin-python/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,16 @@ limitations under the License.
</goals>
<configuration>
<target>
<exec executable="docker-compose" failonerror="true">
<exec executable="docker" failonerror="true">
<env key="PACKAGE_DIR" value="${project.build.directory}/python-packaged"/>
<env key="VERSION" value="${project.version}"/>
<env key="PYTHONPATH" value=""/>
<arg line="up --build --abort-on-container-exit gremlin-python-package"/>
<arg line="compose up --build --abort-on-container-exit gremlin-python-package"/>
</exec>
<exec executable="docker-compose" failonerror="true">
<exec executable="docker" failonerror="true">
<env key="PYTHONPATH" value=""/>
<env key="PACKAGE_DIR" value="${project.build.directory}/python-packaged"/>
<arg line="down"/>
<arg line="compose down"/>
</exec>
<exec executable="docker" failonerror="true">
<env key="PYTHONPATH" value=""/>
Expand All @@ -156,7 +156,7 @@ limitations under the License.
</execution>

<!--
use docker-compose to run unit tests, radish, and integration tests.
use docker compose to run unit tests, radish, and integration tests.
-->
<execution>
<id>python-tests</id>
Expand All @@ -167,18 +167,18 @@ limitations under the License.
<configuration>
<skip>${skipTests}</skip>
<target>
<exec executable="docker-compose" failonerror="true">
<exec executable="docker" failonerror="true">
<env key="VERSION" value="${project.version}"/>
<env key="PYTHONPATH" value=""/>
<env key="GREMLIN_SERVER" value="${project.version}"/>
<env key="ABS_PROJECT_HOME" value="${project.basedir}/../"/>
<env key="BUILD_DIR" value="${project.build.directory}/python3"/>
<arg line="up --build --abort-on-container-exit gremlin-server-test-python gremlin-python-integration-tests"/>
<arg line="compose up --build --abort-on-container-exit gremlin-server-test-python gremlin-python-integration-tests"/>
</exec>
<exec executable="docker-compose" failonerror="true">
<exec executable="docker" failonerror="true">
<env key="PYTHONPATH" value=""/>
<env key="BUILD_DIR" value="${project.build.directory}/python3"/>
<arg line="down"/>
<arg line="compose down"/>
</exec>
<exec executable="docker" failonerror="true">
<env key="PYTHONPATH" value=""/>
Expand Down

0 comments on commit cd07120

Please sign in to comment.