You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by xi...@apache.org on 2022/09/14 23:08:24 UTC

[tinkerpop] branch 3.6-dev updated (746d557249 -> 08cedce5bb)

This is an automated email from the ASF dual-hosted git repository.

xiazcy pushed a change to branch 3.6-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


    from 746d557249 Merge branch '3.5-dev' into 3.6-dev
     add 361e903a52 Dev Environments: Dockerize Testing for Python and Gremlin Console (Python-based tests only) (#1797)
     new f2ddf56d76 Merge branch '3.5-dev' into 3.6-dev
     new 08cedce5bb Update gremlin-test jar path in docker-entrypoint.sh to match with pom after merge CTR

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/build-test.yml                   |  11 +-
 .gitignore                                         |   1 +
 CHANGELOG.asciidoc                                 |   1 +
 docker/gremlin-server/docker-entrypoint.sh         |   2 +-
 docker/gremlin-test-server/Dockerfile              |   2 +-
 .../krb5.conf                                      |   4 +-
 .../dev/developer/development-environment.asciidoc |  77 ++++-
 gremlin-console/pom.xml                            |  94 +------
 .../src/test/python/docker/Dockerfile              |  11 +-
 gremlin-console/src/test/python/setup.cfg          |   2 +-
 gremlin-go/driver/README.md                        |   2 +-
 gremlin-go/pom.xml                                 |   2 +-
 gremlin-javascript/pom.xml                         |   2 +-
 gremlin-python/docker-compose.yml                  |  87 ++++++
 gremlin-python/pom.xml                             | 313 +++------------------
 gremlin-python/src/main/python/radish/terrain.py   |   6 +-
 gremlin-python/src/main/python/setup.cfg           |   2 +-
 gremlin-python/src/main/python/tests/conftest.py   |   9 +-
 .../src/main/python/tests/driver/test_client.py    |   4 +-
 .../tests/driver/test_driver_remote_connection.py  |   5 +-
 .../test_driver_remote_connection_threaded.py      |   8 +-
 .../main/python/tests/process/test_traversal.py    |   2 +-
 pom.xml                                            |   1 +
 23 files changed, 246 insertions(+), 402 deletions(-)
 copy docker/{gremlin-server => gremlin-test-server}/krb5.conf (90%)
 copy docker/hadoop/Dockerfile.template => gremlin-console/src/test/python/docker/Dockerfile (68%)
 create mode 100644 gremlin-python/docker-compose.yml


[tinkerpop] 01/02: Merge branch '3.5-dev' into 3.6-dev

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiazcy pushed a commit to branch 3.6-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit f2ddf56d76cb061bd466770f2840bc7dd538f44a
Merge: 746d557249 361e903a52
Author: Yang Xia <55...@users.noreply.github.com>
AuthorDate: Wed Sep 14 14:21:39 2022 -0700

    Merge branch '3.5-dev' into 3.6-dev

 .github/workflows/build-test.yml                   |  11 +-
 .gitignore                                         |   1 +
 CHANGELOG.asciidoc                                 |   1 +
 docker/gremlin-test-server/Dockerfile              |   2 +-
 docker/gremlin-test-server/krb5.conf               |  31 ++
 .../dev/developer/development-environment.asciidoc |  77 ++++-
 gremlin-console/pom.xml                            |  94 +------
 .../src/test/python/docker/Dockerfile              |  17 +-
 gremlin-console/src/test/python/setup.cfg          |   2 +-
 gremlin-go/driver/README.md                        |   2 +-
 gremlin-go/pom.xml                                 |   2 +-
 gremlin-javascript/pom.xml                         |   2 +-
 gremlin-python/docker-compose.yml                  |  87 ++++++
 gremlin-python/pom.xml                             | 313 +++------------------
 gremlin-python/src/main/python/radish/terrain.py   |   6 +-
 gremlin-python/src/main/python/setup.cfg           |   2 +-
 gremlin-python/src/main/python/tests/conftest.py   |   9 +-
 .../src/main/python/tests/driver/test_client.py    |   4 +-
 .../tests/driver/test_driver_remote_connection.py  |   5 +-
 .../test_driver_remote_connection_threaded.py      |   8 +-
 .../main/python/tests/process/test_traversal.py    |   2 +-
 pom.xml                                            |   1 +
 22 files changed, 276 insertions(+), 403 deletions(-)

diff --cc docs/src/dev/developer/development-environment.asciidoc
index c6c2140312,3ac74dbd4d..65fa58ba11
--- a/docs/src/dev/developer/development-environment.asciidoc
+++ b/docs/src/dev/developer/development-environment.asciidoc
@@@ -293,13 -257,13 +304,18 @@@ other existing Node.js runtime instance
  To run the development and build scripts of `gremlint` and its corresponding web page `docs/gremlint`, Node.js and npm
  have to be installed. When generating or publishing the TinkerPop website, the `docs/gremlint` web page has to be
  built. Consequently, the scripts `bin/generate-home.sh` and `bin/publish-home.sh` require that Node.js and npm are
 -installed. Version 6.x or newer of npm is required. This is covered in more detail in the <<site,Site>> section.
 +installed. Version 8.x or newer of npm is required. This is covered in more detail in the <<site,Site>> section.
  
+ As of TinkerPop 3.5.5, `gremlin-javascript` uses Docker for all tests inside of Maven. Please make sure Docker is
+ installed and running on your system.
+ 
 -IMPORTANT: Beware of unexpected or unwanted changes on `package-lock.json` files when committing and merging. 
 +IMPORTANT: Beware of unexpected or unwanted changes on `package-lock.json` files when committing and merging. Changes
 +should not change SHA1 hashes to SHA512 and the `lockfileVersion` should be "2" for `3.6-dev` and "1" for `3.5-dev`.
 +If the `lockfileVersion` has changed somehow then it likely means that you've used the wrong version of npm as part of
 +the build. Ensure the correct version is in use for the correct branch.
 +
++IMPORTANT: Beware of unexpected or unwanted changes on `package-lock.json` files when committing and merging.
+ 
  TIP: For those who do not have a full Maven environment, please see <<docker-integration,this section>> for how Docker
  can be used to help run tests.
  
@@@ -337,16 -308,9 +360,19 @@@ mvn clean install -pl gremlin-server,gr
  
  which enables the "docker-images" Maven profile.
  
 +If confronted with "Permission denied" errors on Linux, it may be necessary to do the following:
 +
 +[source,text]
 +----
 +sudo groupadd docker
 +sudo usermod -aG docker $USER
 +newgrp docker
 +sudo chmod 666 /var/run/docker.sock
 +----
 +
+ As of TinkerPop 3.5.5, a docker image of the Gremlin Server will be built automatically with `mvn clean install`, which
+ is use for GLV tests inside of Docker. To skip building this image, append the `-DskipImageBuild` flag to Maven commands.
+ 
  [[release-environment]]
  === Release Environment
  
@@@ -557,6 -521,45 +583,45 @@@ docker/gremlin-server.sh 3.4.
  To be a bit more clear, the version can not be a Docker tag like "latest" because there is no such TinkerPop artifact
  that has been published with that version number.
  
+ [[docker-testing]]
+ == Testing Sub-Modules with Docker
+ 
+ Currently the modules gremlin-go, gremlin-javascript, gremlin-dotnet, gremlin-python and gremlin-console can be tested
+ through Docker.
+ 
+ Please make sure Docker is installed and running on your system. You will need to install both
+ link:https://docs.docker.com/engine/install/[Docker Engine] and link:https://docs.docker.com/compose/install/[Docker Compose],
+ which are included in link:https://docs.docker.com/desktop/[Docker Desktop].
+ 
+ The following environment variables used by Docker Compose will automatically be set when running through Maven.
+ 
+ The docker compose environment variable `GREMLIN_SERVER` specifies the Gremlin server docker image to use, i.e. an
 -image with the tag `tinkerpop/gremlin-server:$GREMLIN_SERVER`, and is a required environment variable. This also 
++image with the tag `tinkerpop/gremlin-server:$GREMLIN_SERVER`, and is a required environment variable. This also
+ requires the specified docker image to exist, either locally or in link:https://hub.docker.com/r/tinkerpop/gremlin-server[Docker Hub].
+ 
 -Running `mvn clean install -pl gremlin-server -DskipTests -DskipIntegrationTests=true -Dci -am` in the main `tinkerpop` 
 -directory will automatically build a local SNAPSHOT Gremlin server image. If your OS Platform cannot build a local 
++Running `mvn clean install -pl gremlin-server -DskipTests -DskipIntegrationTests=true -Dci -am` in the main `tinkerpop`
++directory will automatically build a local SNAPSHOT Gremlin server image. If your OS Platform cannot build a local
+ SNAPSHOT Gremlin server through `maven`, it is recommended to use the latest released server version from
+ link:https://hub.docker.com/r/tinkerpop/gremlin-server[Docker Hub] (do not use `GREMLIN_SERVER=latest`, use actual
+ version number, e.g. `GREMLIN_SERVER=3.5.x` or `GREMLIN_SERVER=3.6.x`).
+ 
 -The docker compose environment variable `HOME` specifies the user home directory for mounting volumes during test image 
 -set up. This variable is set by default in Unix/Linux, but will need to be set for Windows, for example, run 
++The docker compose environment variable `HOME` specifies the user home directory for mounting volumes during test image
++set up. This variable is set by default in Unix/Linux, but will need to be set for Windows, for example, run
+ `$env:HOME=$env:USERPROFILE` in PowerShell.
+ 
 -There are different ways to launch the test suite and set the `GREMLIN_SERVER` environment variable depending on 
++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 project folder e.g. `tinkerpop/gremlin-go`, or `mvn clean install -pl gremlin-go` 
++* 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.
+ 
 -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.
+ 
  [[intellij]]
  == Intellij Usage
  
diff --cc gremlin-python/src/main/python/radish/terrain.py
index c3a4d1da77,5dcaa3e0a1..9707210f66
--- a/gremlin-python/src/main/python/radish/terrain.py
+++ b/gremlin-python/src/main/python/radish/terrain.py
@@@ -23,12 -24,13 +24,13 @@@ from gremlin_python.driver import seria
  from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
  from radish import before, after, world
  
 -outV = __.outV
 +outV = __.out_v
  label = __.label
 -inV = __.inV
 +inV = __.in_v
  project = __.project
  tail = __.tail
- 
+ gremlin_server_url = os.environ.get('GREMLIN_SERVER_URL', 'ws://localhost:{}/gremlin')
+ test_no_auth_url = gremlin_server_url.format(45940)
  
  @before.all
  def prepare_static_traversal_source(features, marker):
diff --cc gremlin-python/src/main/python/tests/driver/test_driver_remote_connection.py
index 5825f63989,360ea7c5c2..5e82c490cd
--- a/gremlin-python/src/main/python/tests/driver/test_driver_remote_connection.py
+++ b/gremlin-python/src/main/python/tests/driver/test_driver_remote_connection.py
@@@ -109,14 -111,14 +112,14 @@@ class TestDriverRemoteConnection(object
  
      def test_lambda_traversals(self, remote_connection):
          statics.load_statics(globals())
-         assert "remoteconnection[ws://localhost:45940/gremlin,gmodern]" == str(remote_connection)
+         assert "remoteconnection[{},gmodern]".format(test_no_auth_url) == str(remote_connection)
          g = traversal().withRemote(remote_connection)
  
 -        assert 24.0 == g.withSack(1.0, lambda: ("x -> x + 1", "gremlin-groovy")).V().both().sack().sum().next()
 -        assert 24.0 == g.withSack(lambda: ("{1.0d}", "gremlin-groovy"), lambda: ("x -> x + 1", "gremlin-groovy")).V().both().sack().sum().next()
 +        assert 24.0 == g.withSack(1.0, lambda: ("x -> x + 1", "gremlin-groovy")).V().both().sack().sum_().next()
 +        assert 24.0 == g.withSack(lambda: ("{1.0d}", "gremlin-groovy"), lambda: ("x -> x + 1", "gremlin-groovy")).V().both().sack().sum_().next()
  
 -        assert 48.0 == g.withSack(1.0, lambda: ("x, y ->  x + y + 1", "gremlin-groovy")).V().both().sack().sum().next()
 -        assert 48.0 == g.withSack(lambda: ("{1.0d}", "gremlin-groovy"), lambda: ("x, y ->  x + y + 1", "gremlin-groovy")).V().both().sack().sum().next()
 +        assert 48.0 == g.withSack(1.0, lambda: ("x, y ->  x + y + 1", "gremlin-groovy")).V().both().sack().sum_().next()
 +        assert 48.0 == g.withSack(lambda: ("{1.0d}", "gremlin-groovy"), lambda: ("x, y ->  x + y + 1", "gremlin-groovy")).V().both().sack().sum_().next()
  
      def test_iteration(self, remote_connection):
          statics.load_statics(globals())
diff --cc gremlin-python/src/main/python/tests/driver/test_driver_remote_connection_threaded.py
index 665690ad75,0234ad8dd7..68ea290df4
--- a/gremlin-python/src/main/python/tests/driver/test_driver_remote_connection_threaded.py
+++ b/gremlin-python/src/main/python/tests/driver/test_driver_remote_connection_threaded.py
@@@ -17,9 -17,10 +17,10 @@@
  # under the License.
  #
  import concurrent.futures
+ import os
  import sys
 +import queue
  from threading import Thread
 -from six.moves import queue
  
  from gremlin_python.driver.driver_remote_connection import (
      DriverRemoteConnection)


[tinkerpop] 02/02: Update gremlin-test jar path in docker-entrypoint.sh to match with pom after merge CTR

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiazcy pushed a commit to branch 3.6-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 08cedce5bb3601102f1ab6c2b77ba185a0a0f299
Author: Yang Xia <55...@users.noreply.github.com>
AuthorDate: Wed Sep 14 16:08:10 2022 -0700

    Update gremlin-test jar path in docker-entrypoint.sh to match with pom after merge CTR
---
 docker/gremlin-server/docker-entrypoint.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docker/gremlin-server/docker-entrypoint.sh b/docker/gremlin-server/docker-entrypoint.sh
index 3662af20f3..f11348ec4f 100644
--- a/docker/gremlin-server/docker-entrypoint.sh
+++ b/docker/gremlin-server/docker-entrypoint.sh
@@ -78,7 +78,7 @@ fi
 
 /opt/gremlin-server/bin/gremlin-server.sh ${TINKERPOP_HOME}/conf/gremlin-server-integration-secure.yaml &
 
-java -cp /opt/gremlin-test/gremlin-test-${GREMLIN_SERVER_VERSION}-jar-with-dependencies.jar \
+java -cp /opt/gremlin-test/apache-tinkerpop-gremlin-test-${GREMLIN_SERVER_VERSION}-jar-with-dependencies.jar \
      -Dlogback.configurationFile="file:/opt/gremlin-server/conf/logback.xml" \
      org.apache.tinkerpop.gremlin.server.KdcFixture /opt/gremlin-server &