Skip to content

[Config] Add --config=FILE argument#1058

Merged
ccgsnet merged 7 commits intomasterfrom
json-config
Mar 18, 2026
Merged

[Config] Add --config=FILE argument#1058
ccgsnet merged 7 commits intomasterfrom
json-config

Conversation

@ccgsnet
Copy link
Collaborator

@ccgsnet ccgsnet commented Mar 11, 2026

Summary

Introduces a JSON-based configuration file for DAS services and a --config=FILE CLI argument for bus_node and bus_client. Configuration is merged so that CLI-provided values override the config file.

Changes

  • JsonConfig – Wrapper over the parsed JSON with schema version and path-based access (at_path("atomdb.redis.port")), plus get_or<T>(default) for optional values.
  • JsonConfigParser – Loads and parses the config file (with optional validation).
  • config/example.json – Example config covering atomdb (Redis, MongoDB, MorkDB, remote peers), agents/endpoints, and ports.

CLI integration

  • bus_node and bus_client accept --config=FILE. If omitted, the default config path is used.
  • Config and CLI are merged: any option passed on the command line overrides the value from the config file.

Wiring

  • bus_node uses the config for service endpoints, ports, atomdb type, Redis/MongoDB/MorkDB settings, and remote AtomDB peers.
  • RemoteAtomDB and Properties are updated to consume the new config (including remote_peers and related fields).

Tests

  • config_parser_test – Unit tests for the JSON config parser (path lookup, get_or, schema, etc.).
  • remote_atomdb_test – Adjusted to work with the new config-based setup.

Notes

  • Existing behaviour is preserved when no config file is present or when using the default path with sensible defaults.
  • The Bazel/Docker permission workaround in MODULE.bazel (rules_kotlin archive_override) is out of scope for this PR and can be handled separately.

@ccgsnet ccgsnet requested a review from andre-senna March 11, 2026 17:43
@ccgsnet ccgsnet self-assigned this Mar 11, 2026
@ccgsnet ccgsnet changed the title [WIP][Config] Add --config=FILE argument [Config] Add --config=FILE argument Mar 17, 2026
@andre-senna andre-senna self-requested a review March 18, 2026 10:59
@ccgsnet ccgsnet merged commit 73149d4 into master Mar 18, 2026
2 checks passed
@ccgsnet ccgsnet deleted the json-config branch March 18, 2026 11:27
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.

2 participants