feat(avro-to-json): add wireFormat configuration parameter#357
Merged
WilliamBerryiii merged 3 commits intomainfrom Apr 7, 2026
Merged
feat(avro-to-json): add wireFormat configuration parameter#357WilliamBerryiii merged 3 commits intomainfrom
WilliamBerryiii merged 3 commits intomainfrom
Conversation
Add optional wireFormat parameter with values auto, confluent, raw to enable deterministic Avro parsing. Extract parse_with_schema_inner for testability. Update graph YAML, blueprint tfvars example, and README documentation. Bump version to 1.1.0.
📚 Documentation Health ReportGenerated on: 2026-04-07 14:31:54 UTC 📈 Documentation Statistics
🏗️ Three-Tree Architecture Status
🔍 Quality Metrics
This report is automatically generated by the Documentation Automation workflow. |
- Add commit 9d49582 to .gitleaks.toml commit allowlist - SECRETLINT_FAILED=true shell variable flagged as generic-api-key 🔒 - Generated by Copilot
📚 Documentation Health ReportGenerated on: 2026-04-07 15:14:41 UTC 📈 Documentation Statistics
🏗️ Three-Tree Architecture Status
🔍 Quality Metrics
This report is automatically generated by the Documentation Automation workflow. |
WilliamBerryiii
approved these changes
Apr 7, 2026
📚 Documentation Health ReportGenerated on: 2026-04-07 15:41:56 UTC 📈 Documentation Statistics
🏗️ Three-Tree Architecture Status
🔍 Quality Metrics
This report is automatically generated by the Documentation Automation workflow. |
nguyena2
approved these changes
Apr 7, 2026
auyidi1
approved these changes
Apr 7, 2026
auyidi1
reviewed
Apr 7, 2026
Member
|
Filed #359 to track the missing |
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.
Description
Added an optional wireFormat configuration parameter to the avro-to-json WASM operator, enabling deterministic Avro parsing when the wire format of incoming messages is known. The parameter accepts three values —
auto,confluent, andraw— and defaults toauto, which preserves the existing try-raw-then-retry behavior for full backward compatibility.Rust Wasm Operator
The core change introduced a
WireFormatenum and aWIRE_FORMATOnceLockstatic in lib.rs. The existingparse_with_schemafunction was refactored: a newparse_with_schema_innerfunction accepts the wire format explicitly and dispatches to the correct parsing path. The originalparse_with_schemanow delegates to the inner function using the configured format, keeping the public API unchanged.Configuration parsing in
avro_initreads thewireFormatproperty with case-insensitive matching, logs a warning for unknown values (defaulting toAuto), and logs the selected format atInfolevel for observability.Seven unit tests cover all three variants — raw success/failure, confluent success/failure, auto success on both raw and confluent data, and a short-payload edge case for confluent mode.
Graph YAML and Blueprint
The graph-avro-to-json.yaml gained a
wireFormatparameter declaration inmoduleConfigurations. The blueprint dataflow-graphs-avro-json.tfvars.example added awireFormatkey-value entry with inline documentation of all three options, demonstrating the Confluent use case.Version
Package version bumped from 1.0.0 to 1.1.0 in both Cargo.toml and Cargo.lock.
Related Issue
Fixes #337
Type of Change
Implementation Details
WireFormatenum (Auto,Confluent,Raw) withOnceLock-based static initializationparse_with_schema_inner(data, schema, wire_format)fromparse_with_schemafor testable, format-specific dispatchavro_initparses thewireFormatconfiguration property with case-insensitive matching and defaults toAutofor unknown or missing valuesTesting Performed
Validation Steps
WireFormatenum andparse_with_schema_innerdispatch logic in lib.rscargo testinsrc/500-application/512-avro-to-json/operators/avro-to-json/— all 7 new wireFormat tests should passwireFormatinmoduleConfigurationswireFormatkey-value entryChecklist
terraform fmton all Terraform codeterraform validateon all Terraform codeaz bicep formaton all Bicep codeaz bicep buildto validate all Bicep codeSecurity Review
Additional Notes
This is a non-breaking, additive change. The default
autobehavior matches the current implementation exactly. Existing deployments require no configuration changes.