Skip to content

fix: gremlin-console.sh fails on Mac M/ARM CPU #3050#3050

Merged
imbajin merged 2 commits into
apache:masterfrom
vaijosh:3031-AppleSiliconFix
Jun 8, 2026
Merged

fix: gremlin-console.sh fails on Mac M/ARM CPU #3050#3050
imbajin merged 2 commits into
apache:masterfrom
vaijosh:3031-AppleSiliconFix

Conversation

@vaijosh

@vaijosh vaijosh commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

What I changed

  • Added runtime dependency org.fusesource.jansi:jansi:2.4.0 in hugegraph-server/hugegraph-dist/pom.xml.
  • Updated release docs:
    • install-dist/release-docs/LICENSE
    • install-dist/release-docs/NOTICE
    • install-dist/release-docs/licenses/LICENSE-jansi-2.4.0.txt

Validation performed

 ✘ vjoshi@DNWW7WJ4LJ  ~/SourceCode/HUGEGRAPH/hugegraph   3031-AppleSiliconFix  export RUNNER_TEMP="$(mktemp -d)"     
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
SERVER_DIR="hugegraph-server/apache-hugegraph-server-${VERSION}"
printf "println \"gremlin-console-smoke-ok\"\n" > "$RUNNER_TEMP/gremlin-console-smoke.groovy"
"${SERVER_DIR}/bin/gremlin-console.sh" -- -e "$RUNNER_TEMP/gremlin-console-smoke.groovy"

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/Users/vjoshi/SourceCode/HUGEGRAPH/hugegraph/hugegraph-server/apache-hugegraph-server-1.7.0/lib/groovy-2.5.14-indy.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
gremlin-console-smoke-ok

Manually checked if we can launch gremlin console.



Added org.fusesource.jansi:jansi:2.4.0 as a runtime dependency in
`hugegraph-server/hugegraph-dist/pom.xml` to prevent
NoClassDefFoundError: org/fusesource/jansi/AnsiConsole when launching gremlin-console.

Also update release docs:
- install-dist/release-docs/LICENSE
- install-dist/release-docs/NOTICE
- add install-dist/release-docs/licenses/LICENSE-jansi-2.4.0.txt
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Jun 4, 2026

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: yes. Summary: the new packaged dependency is missing required release/dependency inventory updates and a distro regression guard. Evidence: dependency-check reports +jansi-2.4.0.jar, dependency:tree shows the new runtime jar, and the added license file is only a short summary.


🔗 Please also check the latest failed dependency-check job: https://github.com/apache/hugegraph/actions/runs/26973199772/job/79593480638

Comment thread hugegraph-server/hugegraph-dist/pom.xml
@@ -0,0 +1,16 @@
Copyright (c) 2007-2021, the original author(s)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

‼️ Vendor the full license text

Evidence: this new file is a 16-line summary with URLs, but the surrounding install-dist/release-docs/licenses/LICENSE-*.txt files vendor complete upstream license texts. The new LICENSE entry also points readers here for license details, which this summary does not provide.

Impact: the release docs for the newly bundled jar are incomplete, which is an ASF release/legal risk even if the runtime dependency is correct.

Requested fix: replace this file with the full upstream license text for the license option HugeGraph is relying on for distribution, and align the LICENSE/NOTICE wording with that choice.


<!-- Added updated jar to avoid java.lang.NoClassDefFoundError: org/fusesource/jansi/AnsiConsole when launching
gremlin console on arm64 -->
<dependency>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Add a distro regression check

Evidence: the fix is purely in distro packaging, so the normal unit/core/api suites do not exercise the gremlin-console.sh classpath. I could not find an automated check that launches the packaged console or at least asserts the tarball contains lib/jansi-*.jar.

Impact: this exact classpath regression can silently return after a dependency or assembly change and only be caught by users starting the packaged console.

Requested fix: add a distro-level smoke check, for example launching bin/gremlin-console.sh -- -e <script> from the assembled server, or at minimum asserting the packaged archive contains the Jansi jar.

@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.08%. Comparing base (7f0a44a) to head (9098c3b).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3050      +/-   ##
============================================
+ Coverage     36.08%   39.08%   +2.99%     
- Complexity      338      622     +284     
============================================
  Files           803      814      +11     
  Lines         68227    69392    +1165     
  Branches       8963     9162     +199     
============================================
+ Hits          24617    27119    +2502     
+ Misses        40963    39432    -1531     
- Partials       2647     2841     +194     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The explicit Jansi runtime dependency is justified here because the bundled Gremlin Console path still relies on an older JLine/Jansi stack that lacks macOS arm64 native support. The PR keeps the fix scoped to the distribution package, updates the required release/dependency metadata, and the relevant CI checks are green. No separate user-facing documentation is needed since the behavior remains transparent to users: bin/gremlin-console.sh should simply work on Apple Silicon.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 8, 2026
@imbajin imbajin changed the title fix [Bug]: gremlin-console.sh fails on Mac M4 (Apple Silicon)#3031 fix: gremlin-console.sh fails on Mac M/ARM CPU #3050 Jun 8, 2026
@imbajin imbajin merged commit 39dfb2d into apache:master Jun 8, 2026
17 checks passed
@vaijosh

vaijosh commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Many thanks @imbajin for reviewing the PR.

@vaijosh vaijosh deleted the 3031-AppleSiliconFix branch June 8, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants