chore(ci): add Gremlin Console smoke test#3040
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a lightweight CI smoke test to validate the HugeGraph server distribution’s bin/gremlin-console.sh entrypoint (non-interactive) on Linux and macOS, addressing the coverage gap called out in #3015.
Changes:
- Introduce a new Travis/CI helper script that runs Gremlin Console with a tiny Groovy script and asserts an expected marker in output.
- Run the smoke test in Linux Server CI only for the
rocksdbmatrix entry. - Run the same smoke test in the macOS RocksDB CI job (both Intel and Apple Silicon runners).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
hugegraph-server/hugegraph-dist/src/assembly/travis/run-gremlin-console-smoke-test.sh |
New portable bash smoke test that executes bin/gremlin-console.sh with a generated Groovy script and validates output. |
.github/workflows/server-ci.yml |
Adds CI steps to invoke the new Gremlin Console smoke test in Linux (rocksdb only) and macOS RocksDB jobs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Review summary
- Blocking: yes
- Summary: The new smoke-test script is not portable to the macOS CI jobs added by this PR.
- Evidence:
git diff --check origin/master...HEADcleanbash -n .../run-gremlin-console-smoke-test.shclean- static review of changed workflow/script
VGalaxies
left a comment
There was a problem hiding this comment.
Review summary
- Blocking: no
- Summary: The new Gremlin Console smoke test only validates local console startup, not connectivity to HugeGraph.
- Evidence:
- Reviewed
git diff origin/master...HEAD git diff --check origin/master...HEADpassedrgfound noremote.yaml,:remote, or remote traversal usage in the new script
- Reviewed
| } | ||
| trap cleanup EXIT | ||
|
|
||
| cat > "$SMOKE_SCRIPT" <<EOF |
There was a problem hiding this comment.
Medium: Smoke test does not exercise HugeGraph integration
hugegraph-server/hugegraph-dist/src/assembly/travis/run-gremlin-console-smoke-test.sh:43
Evidence
- The generated script only evaluates
1 + 1, printsgremlin-console-smoke-ok, and runs it withbin/gremlin-console.sh -- -e "$SMOKE_SCRIPT". It never connects throughconf/remote.yamlor executes a remote traversal; in the Linux job it is also invoked afterrun-api-test.sh, which stops the server.
Impact
- CI can pass even if the packaged Gremlin Console cannot connect to HugeGraph, the remote config is broken, or Gremlin Server auth/traversal compatibility regresses.
Requested fix
- Run the smoke while HugeGraph is running and execute a harmless remote operation through the packaged config, for example
:remote connect tinkerpop.server conf/remote.yamlwith the CI auth settings and an assertion ong.V().count()or an equivalent remote expression.
There was a problem hiding this comment.
Thanks, updated the smoke test to run while HugeGraph is still running inside run-api-test.sh. It now copies the packaged conf/remote.yaml, appends the CI admin credentials, connects with :remote connect tinkerpop.server, and submits a harmless remote g.V().count().next() check before validating the smoke marker. The separate post-API-test smoke step has been removed.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3040 +/- ##
=============================================
+ Coverage 35.94% 93.25% +57.30%
+ Complexity 338 65 -273
=============================================
Files 803 9 -794
Lines 68053 267 -67786
Branches 8907 22 -8885
=============================================
- Hits 24465 249 -24216
+ Misses 40967 8 -40959
+ Partials 2621 10 -2611 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Purpose of the PR
Add a focused Gremlin Console smoke test for the server distribution entry point.
This follows up on #3015 and the review note from #3010. The existing macOS RocksDB CI covers server compile, core tests, startup, and API tests, but it does not directly exercise
bin/gremlin-console.sh. This PR adds a lightweight non-interactive smoke test for that path on macOS and Linux.Related context: #3006 reported user-facing build/startup issues and mentioned Gremlin Console behavior on Apple Silicon, but this PR only adds CI validation and does not assume a specific Jansi or Java compatibility root cause.
Main Changes
run-gremlin-console-smoke-test.shbin/gremlin-console.sh -- -e <script>gremlin-console-smoke-okmarkertrapVerifying these changes
bash -n hugegraph-server/hugegraph-dist/src/assembly/travis/run-gremlin-console-smoke-test.shgit diff --checkDoes this PR potentially affect the following parts?
Documentation Status
Doc - TODODoc - DoneDoc - No Need