[All] Add avro record type to proto surface - #811
Conversation
70ce97a to
e0d6cc5
Compare
danilonajkov-db
left a comment
There was a problem hiding this comment.
LGTM, just check with Teodor about the CI
Signed-off-by: Irina Tomic <irina.tomic@databricks.com>
Signed-off-by: Irina Tomic <irina.tomic@databricks.com>
e0d6cc5 to
d1b4cee
Compare
| JSON = 2; | ||
| // 3 is ARROW_IPC on the Zerobus service. | ||
| reserved 3; | ||
| AVRO = 4; |
There was a problem hiding this comment.
Ah, this is a preexisting issue but has only now surfaced/come to my attention. Adding this is a potential breaking change for some clients. The code that would break is not useful in any way I think, but it's still breaking, for example:
use databricks_zerobus_ingest_sdk::databricks::zerobus::RecordType;
use databricks_zerobus_ingest_sdk::StreamConfigurationOptions;
fn describe(opts: &StreamConfigurationOptions) -> &'static str {
match opts.record_type {
RecordType::Proto => "proto",
RecordType::Json => "json",
RecordType::Unspecified => "unspecified",
}
}After this PR this match would break. This is true also for some interactions with other generated types from this file. Due to this you had to change wrapper SDKs in this change as well.
IMO we shouldn't treat this as a regular API breaking change that requires a major version bump, but instead just note it in NEXT_CHANGELOG.md and then handle it later the proper way during a major version bump so that we don't have to think about it anymore. I've created an issue for this long term fix: [Rust] Hide generated gRPC types so additive proto changes are not crate-breaking.
Let's discuss with other folks offline as well. cc: @davidtosovic-db
9657852 to
f55dd4c
Compare
reserved 3 (bare); map Avro in FFI (4) and TS (2) so the not-supported path is reachable; fix descriptor/batch doc comments; regenerate purego bindings; changelog note re #822. Signed-off-by: Irina Tomic <irina.tomic@databricks.com>
f55dd4c to
41b2d27
Compare
PR stack
What changes are proposed in this pull request?
Adds the Avro record type to the proto surface (wire contract only) so later PRs can build Avro ingestion on ephemeral streams. No public SDK API and no behavior change yet.
rust/sdk/zerobus_service.proto):AvroRecordBatch,CreateIngestStreamRequest.avro_schema_json,IngestRecordRequest.avro_encoded_record, andIngestRecordBatchRequest.avro_batch.internal/zerobuspbbindings from the schema. The commit also resyncs pre-existing drift (proto doc-comments + gofmt) and adds a generate CI job that fails if the committed bindings are stale = the gate purego was missing.avro_schema_json: None at the oneCreateIngestStreamRequestconstruction site so codegen compiles.How is this tested?
Code diff
Most of the code diff is generated (
purego/internalfiles): +1005 -87