Repository navigation
feat(#58): let the chart set the Gremlin port via gremlin-server.yaml - #63
Merged
Merged
Conversation
arcadedb.plugins.gremlin.writePortToConfig: true has the config-seed init container set the top-level port: of gremlin-server.yaml on the config volume to arcadedb.plugins.gremlin.port on every start, so the server, the Services and the NetworkPolicy follow one value. Opt-in, since it edits a file config-seed otherwise never touches once it exists. The config-seed script moves to files/config-seed.sh, and ci/test-config-seed.sh (make test-config-seed, lint workflow) runs it against sample files. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #58
Summary
The Gremlin plugin reads its port only from
gremlin-server.yaml, and core still has no setting the chart can pass instead (checked on ArcadeData/arcadedbmainat 4ffa8ca240:GlobalConfigurationhasarcadedb.gremlin.client.portfor the remote client, nothing for the server). This takes option 2 of the issue: the new opt-inarcadedb.plugins.gremlin.writePortToConfig: truemakes theconfig-seedinit container set the top-levelport:key ofgremlin-server.yamlon the config volume toarcadedb.plugins.gremlin.porton every pod start (envGREMLIN_PORT). Every other line of the file is kept; the key is added when the file has none; a duplicate or quotedportkey collapses into one line. The server, the Services and the NetworkPolicy then follow one value, and ahelm upgradethat changes it rolls the pods because the init container's env changes.portManagedExternally(#52) stays for operators who own the file themselves; the two cannot be combined.The config-seed shell script moves from an inline block in
_helpers.tpltocharts/arcadedb/files/config-seed.sh(rendered with.Files.Get, same text plus the new block), soci/test-config-seed.shcan run the real script against sample files. It runs asmake test-config-seedand in the lint workflow.Test plan
make lintmake test-unit: 389 tests, new suitetests/gremlin_port_write_test.yaml(16 tests), refusal message of arcadedb.plugins.gremlin.port renders -Darcadedb.gremlin.port, which the server never reads #47 updated ingremlin_port_test.yaml/gremlin_port_external_test.yamlto point at the new settingmake test-config-seed: the script undershanddash: default seeding unchanged byte for byte, port appended on a fresh volume, nestedport:left alone, idempotent re-run, port replaced on change, operator file edited in place, untouched withoutGREMLIN_PORT, quoted/spaced/duplicate keys, missing trailing newline, file absent everywhere,portable:/ports:not mistaken forport:, no temp file left. Mutation check: breaking the replace logic fails 8 checks.helm packageincludesfiles/config-seed.shCoverage
Invariant: with
writePortToConfig: true, the port the server's Gremlin plugin binds equalsarcadedb.plugins.gremlin.port, which is also what every Service and the NetworkPolicy expose; and when the chart cannot guarantee that, the render fails.config-seedwritesport:(fresh volume, existing file, re-run, port change)ci/test-config-seed.shGREMLIN_PORT(set / unset / string / default 8182 / relocated config dir /--reuse-valueswithoutconfigSeedkey)gremlin_port_write_test.yamlgremlin_port_write_test.yamlportManagedExternallypaths pass noGREMLIN_PORT(operator file untouched)gremlin_port_write_test.yaml+ script case 5config-seeddisabledconfigDirectory(withreadOnlyRootFilesystem: false; with it on,configDirectory.validatealready refuses)gremlin-server.yamlmounted on its own from another volume (ConfigMapsubPath)writePortToConfig+portManagedExternallyshruns the script underreadOnlyRootFilesystem, plugin binds the portKnown gaps
GlobalConfigurationserver-port setting applied after the yaml) was not pursued: it lives in ArcadeData/arcadedb. If it lands, this setting and the 8182 check can go.Residual risk
port:whose value sits on the next, indented line (block scalar style) would leave that line behind. Nothing in the image or the TinkerPop docs writes it that way.writePortToConfigoff again leaves the last writtenport:in the file (documented in the README: set it back by hand, or keep the value withportManagedExternally).Adversarial pass
Phase 1.5 could not run: this session has no subagent tool, so no independent reviewer was spawned. The cases it would have probed were checked by hand and are in the table above (file mounted separately, seed disabled, no config volume, re-run, port change, quoting/prefix keys). The one finding from that self-check that could not be closed here is the missing real-pod test, filed as #62.
Review cycles
cccc3f0: initial change. Noclaudebot review arrived within 15 minutes (reviews, inline comments and PR comments polled). This repository has no Claude Code Review workflow (gh workflow list: Integration, Latest Image Guard, CI, Release, Dependabot, pages), and feat(#52): allow a Gremlin port other than 8182 when gremlin-server.yaml sets it #60/fix(#59): check failedTemplate messages exactly and guard against unchecked assertions #61 got no bot review either. CI oncccc3f0: lint, unittest, config-keys and the three integration jobs all pass.Deferred items
None (no review feedback received).
Final state
timeout: no automated reviewer is configured here, so a human review is needed before merge.🤖 Generated with Claude Code