You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChronoKVS: connect to remote visors via a config file (#470) (#628) (#652)
* feat(chronokvs): support config file path in constructors (#470)
ChronoKVS was hardcoded to the ChronoLog client defaults (localhost:5555),
limiting it to local deployments. Add an optional config_path parameter to
ChronoKVS, ChronoKVSMapper and ChronoKVSClientAdapter constructors so callers
can point at a ChronoLog client JSON configuration and connect to remote
deployments. Default-constructed instances keep their previous behavior.
The adapter loads the file via ClientConfiguration::load_from_file() before
connecting and throws std::runtime_error if loading fails, matching the
acceptance criteria in the issue.
The writer/reader examples accept --config/-c (parse_conf_path_arg) so the
plumbing can be exercised end-to-end. Adds a unit test that verifies the
constructor throws on missing or section-less config files without requiring
a running ChronoLog deployment.
* ci(local-pipeline): sanitize branch name for artifact uploads
actions/upload-artifact rejects names containing '/'. Branch names like
'feature/470-...' caused the ctest-results upload step to fail. Compute
a slugified branch name (slashes replaced with dashes) once and reuse it
for both artifact uploads and the job summary references.
* refactor(chronokvs): rename confManager to client_config
Per review feedback on PR #628: confManager is a remnant of the old
ConfigurationManager class. Use a clearer client-facing name.
* refactor(chronokvs): replace throwing constructors with noexcept Create() factory
Per review feedback on PR #628 (Inna): throwing exceptions across a
client-library boundary forces callers to wrap construction in try/catch
without an obvious set of exception types to catch. Convert the public
ChronoKVS API to a factory pattern instead:
- Make ChronoKVS constructors private.
- Add static std::unique_ptr<ChronoKVS> Create(...) noexcept overloads
that catch any construction-path exception, log it via the configured
log level, and return nullptr to signal failure.
- Update examples, integration test, and unit tests to use the factory
and check for nullptr instead of catching std::runtime_error.
Internal layers (ChronoKVSMapper, ChronoKVSClientAdapter) keep using
exceptions for clarity; they are now caught at the library boundary
inside Create() rather than escaping to user code.
0 commit comments