Skip to content

fix(#47): stop rendering -Darcadedb.gremlin.port; refuse a Gremlin port other than 8182 - #53

Merged
robfrank merged 1 commit into
mainfrom
fix/47-gremlin-port-not-read-by-server
Oct 22, 2026
Merged

robfrank merged 1 commit into
mainfrom
fix/47-gremlin-port-not-read-by-server

Conversation

@robfrank

@robfrank robfrank commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Closes #47

With arcadedb.plugins.gremlin.enabled: true the chart rendered -Darcadedb.gremlin.port=<port>, which the server never reads: GremlinServerPlugin takes its port from gremlin-server.yaml (the image's sets none, so TinkerPop's default 8182) and from gremlin.* context keys, and no -D becomes a context key. server-configuration.json is no way in either, since ContextConfiguration.fromJSON drops keys that are not GlobalConfiguration settings. So the chart cannot move the port. This PR stops rendering the flag, fails the render when arcadedb.plugins.gremlin.port is anything other than 8182 (so the Services and NetworkPolicy can no longer point at a port nothing listens on), documents the constraint in values.yaml and the README, and removes arcadedb.gremlin.port from ci/config-keys-allowlist.txt. Making the port configurable is tracked in #52.

Test plan

  • helm unittest charts/arcadedb: 22 suites, 348 tests pass (new tests/gremlin_port_test.yaml; helpers_test.yaml now asserts the flag is absent)
  • helm lint charts/arcadedb
  • bash ci/check-config-keys.sh against arcadedata/arcadedb:26.10.2 with the allowlist entry removed: OK: every rendered -Darcadedb.* key is a setting of arcadedata/arcadedb:26.10.2.
  • Confirmed the image's /home/arcadedb/config/gremlin-server.yaml has no port: line (only host: 0.0.0.0), so 8182 is TinkerPop's default
  • kind integration test not run (no Gremlin phase in it; the change is render-time only)

Coverage

Invariant: the chart never advertises a Gremlin port (Service, NetworkPolicy) other than the one the server listens on, and renders no -Darcadedb.* key the server does not read.

Every consumer of arcadedb.plugins.gremlin.port goes through _arcadedb.plugin.ports:

$ grep -n '_arcadedb.plugin.ports' charts/arcadedb/templates/*
_helpers.tpl:  define "_arcadedb.plugin.ports"
_helpers.tpl:  include "_arcadedb.plugin.ports"   (arcadedb.plugin.parameters -> statefulset.yaml)
_helpers.tpl:  include "_arcadedb.plugin.ports"   (arcadedb.plugin.service -> service.yaml headless + external)
_helpers.tpl:  include "_arcadedb.plugin.ports"   (arcadedb.plugin.networkPolicy -> networkpolicy.yaml)
Entry point Covered by fix? Covered by a test?
StatefulSet command (arcadedb.plugin.parameters) yes, flag dropped, non-8182 fails yes (gremlin_port_test, helpers_test)
Headless/external Service (arcadedb.plugin.service) yes, the same helper fails; default stays 8182 yes (unset -> 8182; failure with service.external.enabled)
NetworkPolicy (arcadedb.plugin.networkPolicy) yes, the same helper fails; default stays 8182 yes (unset -> 8182; failure with networkPolicy.enabled)
Port given as a string ("7777") yes, compared with int yes
Disabled gremlin entry with another port not refused (it renders nothing) yes

Siblings: the other plugin -D port keys (arcadedb.bolt.port, arcadedb.postgres.port, arcadedb.mongo.port, arcadedb.redis.port) are GlobalConfiguration settings, which ci/check-config-keys.sh confirms against 26.10.2 (0 unknown keys, empty allowlist).

A note on the tests: Helm renders every template of a release and statefulset.yaml is always one of them, so the fail shows up at statefulset.yaml even under helm template -s templates/service.yaml. The failure tests therefore assert on the StatefulSet, with the Service and NetworkPolicy variants enabled.

Known gaps

  • A Gremlin port other than 8182 is no longer possible. That includes a user-edited gremlin-server.yaml on the config volume with a different port, which used to work when arcadedb.plugins.gremlin.port was set to match. Tracked in Allow a Gremlin port other than 8182 (follow-up to #47) #52 (core setting, chart-managed gremlin-server.yaml, or an opt-out).

Adversarial pass

Not run: this agent session had no Task/subagent tool, so the independent Phase 1.5 reviewer could not be spawned. I checked the edge cases myself instead: port: 0/false/unset all resolve to 8182 through default; a string port is compared by value; a disabled entry is ignored.

Review cycles

Deferred items

None (no review feedback received).

Final state

timeout: no bot reviewer is configured on this repo, so this needs a human review.

🤖 Generated with Claude Code

… port other than 8182

The Gremlin plugin reads its port from gremlin-server.yaml and gremlin.* context
keys, never from a -D system property, so the flag was a no-op while the Service
and NetworkPolicy followed arcadedb.plugins.gremlin.port. Drop the flag, fail the
render on any other port, and remove the key from the drift-guard allowlist.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@robfrank
robfrank merged commit 72b55b5 into main Oct 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

arcadedb.plugins.gremlin.port renders -Darcadedb.gremlin.port, which the server never reads

1 participant