Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 58 additions & 16 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,65 @@ jobs:
run: |
mvn clean install -pl -:gremlin-javascript,-gremlin-dotnet,-:gremlin-dotnet-source,-:gremlin-dotnet-tests,-:gremlint -q -DskipTests -Dci
mvn verify -pl gremlin-driver -DskipIntegrationTests=false
javascript:
name: javascript
javascript-node20:
name: javascript-all-node20
timeout-minutes: 15
needs: cache-gremlin-server-docker-image
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Windows Disabled until Linux containers are supported on Windows runners: https://github.com/actions/virtual-environments/issues/252
# os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up JDK 11
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'temurin'
- name: Get Cached Server Base Image
uses: actions/cache@v5
id: gremlin-server-test-docker-image
with:
path: |
./gremlin-server/*
~/.m2/repository/org/apache/tinkerpop/*
key: ${{ github.sha }}
- name: Load Docker Image
working-directory: ./gremlin-server
run: docker load --input gremlin-server.tar
- name: Build with Maven
run: |
mvn clean install -pl -:gremlin-python,-gremlin-dotnet,-:gremlin-dotnet-source,-:gremlin-dotnet-tests -q -DskipTests -Dci
mvn verify -pl :gremlin-javascript,:gremlint -Dnode.test.version=20
javascript-node22:
name: javascript-glv-node22
timeout-minutes: 15
needs: cache-gremlin-server-docker-image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up JDK 11
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'temurin'
- name: Get Cached Server Base Image
uses: actions/cache@v5
id: gremlin-server-test-docker-image
with:
path: |
./gremlin-server/*
~/.m2/repository/org/apache/tinkerpop/*
key: ${{ github.sha }}
- name: Load Docker Image
working-directory: ./gremlin-server
run: docker load --input gremlin-server.tar
- name: Build with Maven
run: |
mvn clean install -pl -:gremlin-python,-gremlin-dotnet,-:gremlin-dotnet-source,-:gremlin-dotnet-tests -q -DskipTests -Dci
mvn verify -pl :gremlin-javascript -Dnode.test.version=22
javascript-node24:
name: javascript-glv-node24
timeout-minutes: 15
needs: cache-gremlin-server-docker-image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up JDK 11
Expand All @@ -256,27 +305,20 @@ jobs:
java-version: '11'
distribution: 'temurin'
- name: Get Cached Server Base Image
if: matrix.os == 'ubuntu-latest'
uses: actions/cache@v5
id: gremlin-server-test-docker-image
with:
path: |
./gremlin-server/*
~/.m2/repository/org/apache/tinkerpop/*
key: ${{ github.sha }}
# - name: Download Server Base Image
# if: matrix.os == 'windows-latest'
# uses: actions/download-artifact@v3
# with:
# name: ${{ github.sha }}
# path: ./gremlin-server
- name: Load Docker Image
working-directory: ./gremlin-server
run: docker load --input gremlin-server.tar
- name: Build with Maven
run: |
mvn clean install -pl -:gremlin-python,-gremlin-dotnet,-:gremlin-dotnet-source,-:gremlin-dotnet-tests -q -DskipTests -Dci
mvn verify -pl :gremlin-javascript,:gremlint
mvn verify -pl :gremlin-javascript -Dnode.test.version=24
python:
name: python
timeout-minutes: 20
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
* Added `closeSessionPostGraphOp` to the Gremlin Server settings to indicate that the `Session` should be closed on either a successful commit or rollback.
* Added `SessionedChildClient` that borrows connections from a different `Client` for use with `Sessions`.
* Added `reuseConnectionsForSessions` to Java GLV settings to decide whether to use `SessionedChildClient` for remote transactions.
* Added support for Node 22 and 24 alongside Node 20.

[[release-3-7-5]]
=== TinkerPop 3.7.5 (Release Date: November 12, 2025)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/reference/gremlin-variants.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ java -cp target/run-examples-shaded.jar examples.ModernTraversals
== Gremlin-JavaScript

image:gremlin-js.png[width=130,float=right] Apache TinkerPop's Gremlin-JavaScript implements Gremlin within the
JavaScript language. It targets Node.js runtime and can be used on different operating systems on any Node.js 6 or
JavaScript language. It targets Node.js runtime and can be used on different operating systems on any Node.js 20 or
above. Since the JavaScript naming conventions are very similar to that of Java, it should be very easy to switch
between Gremlin-Java and Gremlin-JavaScript.

Expand Down
1 change: 1 addition & 0 deletions gremlin-javascript/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ limitations under the License.
<ABS_PROJECT_HOME>${project.basedir}/../</ABS_PROJECT_HOME>
<!-- setting this env variable is needed to be cross-platform compatible -->
<HOME>${user.home}</HOME>
<NODE_VERSION>${node.test.version}</NODE_VERSION>
</environmentVariables>
<executable>docker</executable>
<arguments>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:

gremlin-js-integration-tests:
container_name: gremlin-js-integration-tests
image: node:20
image: node:${NODE_VERSION:-20}
volumes:
- .:/js_app
- ../../../../../gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features:/gremlin-test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,12 @@ class Connection extends EventEmitter {
'perMessageDeflate',
]);
// Check if any `ws` specific options are provided and are non-null / non-undefined
const hasWsSpecificOptions = Object.entries(this.options).some(
([key, value]) => wsSpecificOptions.has(key) && ![null, undefined].includes(value),
);
const hasWsSpecificOptions =
Object.entries(this.options).some(
([key, value]) => wsSpecificOptions.has(key) && ![null, undefined].includes(value),
) ||
this._enableCompression || // we need to check the presence of this variable and pass this into ws
this._enableUserAgentOnConnect; // global websocket will send "node" as user agent by default which doesn't comply with Gremlin
// Only use the global websocket if we don't have any unsupported options
const useGlobalWebSocket = !hasWsSpecificOptions && globalThis.WebSocket;
const WebSocket = useGlobalWebSocket || (await import('ws')).default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('Client', function () {
let result = await noUserAgentClient.submit('1', null,
{requestId: settings.USER_AGENT_REQUEST_ID});

assert.strictEqual(result.first(), "");
assert.ok(result.first() === "" || result.first() === "node"); // The default node websocket library may use a default user-agent of "node" if none is specified

await noUserAgentClient.close();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ describe('Connection', function () {
globalThis.WebSocket = function () {
globalWebsocketCalls++;
};
const connection = helper.getDriverRemoteConnection(`ws://localhost:${testServerPort}/401`);
const connection = helper.getDriverRemoteConnection(`ws://localhost:${testServerPort}/401`,
{enableCompression: false, enableUserAgentOnConnect: false}); // Global WebSocket is not compatible with customized compression and user agent headers
return connection
.open()
.catch(() => {})
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ limitations under the License.
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
</jdk17JvmArgs>

<node.test.version>20</node.test.version>
</properties>
<build>
<directory>${basedir}/target</directory>
Expand Down
Loading