feat: expose YCQL port in devnet-info export#88
Conversation
There was a problem hiding this comment.
Pull request overview
Extends the exported devnet-info.json schema to include YugabyteDB’s YCQL (Cassandra-compatible) port so scenario tests (e.g., Cassandra indexstore cache checks) can discover and connect to the correct CQL endpoint.
Changes:
- Add
ycql_portto theYugabyteInfoschema. - Populate
ycql_portin the devnet-info exporter from theSetupContext(yugabyte_<id>_ycql_port).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/external_api/export.rs |
Reads yugabyte_<provider_id>_ycql_port from the setup context and includes it in exported YugabyteInfo. |
src/external_api/devnet_info.rs |
Extends the YugabyteInfo struct with a new ycql_port field and documentation. |
| /// YSQL port for Postgres-compatible connections | ||
| pub ysql_port: u16, | ||
| /// YCQL port for Cassandra-compatible connections | ||
| pub ycql_port: u16, |
There was a problem hiding this comment.
YugabyteInfo is a public struct (re-exported via crate::external_api) and the crate is versioned as 1.x. Adding a new non-optional field is a semver-breaking API change for Rust consumers (struct literals / exhaustive patterns) and also makes deserializing older devnet-info.json (without ycql_port) fail. To keep this extension backward/forward compatible within schema v1, consider making ycql_port an Option<u16> with #[serde(default)] (and populate it as Some(...) in the exporter), or alternatively bump the exported schema version and introduce a v2 struct.
| pub ycql_port: u16, | |
| #[serde(default)] | |
| pub ycql_port: Option<u16>, |
This is needed as part of scenario tests for checking cassandra indexstore caches.
This does not break DevnetInfoV1, merely extends it, so no major version updates is required.
Part of #72