Skip to content

python: Fix generated Kafka types and MQTT topic arguments - #712

Open
clemensv wants to merge 2 commits into
xregistry:mainfrom
clemensv:fix/generated-test-identities-711
Open

clemensv wants to merge 2 commits into
xregistry:mainfrom
clemensv:fix/generated-test-identities-711

Conversation

@clemensv

@clemensv clemensv commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #711 and #701. Addresses the generated MQTT test failure tracked in #637. #713 is closed as a duplicate.

Generated Kafka cross-event tests filter resolved CloudEvents wire types rather than transport-variant message IDs. MQTT integration tests and clients share URI-template variable collection, including topic-only variables and deduplication across the topic and envelope.

Structured Kafka JSON embeds the JSON value as data. Non-JSON bytes retain data_base64; generated-runtime tests check raw Avro preservation as well as JSON embedding.

Validation:

  • python -m pytest test\codegen\test_codegen.py -k 'mqtt_tests_cover_topic_and_envelope_variables or kafka_cross_event_test_uses_inherited_wire_types or generated_dataschema_overrides' -q: passed, 14 tests.
  • Regression generation compiled every emitted Python module.
  • python -m py_compile test\codegen\test_codegen.py: passed.
  • git diff --check: passed.

After regenerating Pegelonline's six producer/data packages, the source, shared-tooling, generated and upstream-fix regression suite passed 335 tests and 25 subtests. All transport imports and repository-wide mypy passed (1,306 files).

Docker Kafka and MQTT flows passed. AMQP JSON and raw Avro flows both passed on retry after a transient Docker daemon lease failure. All three images rebuilt with their runtime import checks. Builds used an external, hash-verified source copy with the machine's HTTPS package mirror configured; repository Dockerfiles, TLS verification and wire/schema assertions were unchanged. The upstream full language suite was not run.

clemensv and others added 2 commits November 24, 2026 21:31
Use inherited CloudEvents types in cross-event tests and share deduplicated MQTT URI-template collection. Fixes xregistry#711; addresses xregistry#637.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve data_base64 for non-JSON payloads. Generated-runtime regressions check both JSON and raw Avro encodings. Fixes xregistry#713.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
clemensv added a commit to clemensv/real-time-sources that referenced this pull request Nov 24, 2026
Qualify notebook encoding before startup, preserve optional zero values,
and normalize missing measurement classifications across transports.
Install analytics against discovered Eventstream-owned tables without
legacy dispatch ingestion or routing update policies.

Regenerate producers from the fixes in xregistry/codegen#712 and
clemensv/avrotize#592. Preserve canonical contracts and legacy deployment
artifacts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@clemensv

Copy link
Copy Markdown
Collaborator Author

Downstream verification in clemensv/real-time-sources#1747 passed after regeneration: 335 tests and 25 subtests, all four Docker flows (Kafka, MQTT, AMQP JSON and raw Avro), and repository-wide mypy over 1,306 files. Fresh Fabric acceptance matched 1,517 independently decoded raw Avro events with typed history (787 Station, 730 CurrentMeasurement). Zero/falsy roundtrip regressions passed for JSON and Avro. All owned test assets were deleted and absence verified. This verifies the pinned fix; it does not claim a new published generator release.

clemensv added a commit to clemensv/real-time-sources that referenced this pull request Nov 25, 2026
* Add Pegelonline schematized Fabric notebook pilot

Project JSON-compatible Avro schema variants and discover registered
schema-version URI overrides at notebook startup. Regenerate all three
transport clients and preserve legacy container contracts.

Document isolated hosting, approved authentication limitations, and the
local generator prerequisite tracked in xregistry/codegen#701.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Clemens Vasters (via Copilot CLI) <clemensv@users.noreply.github.com>

* Remove local Fabric projection converter and provenance sidecar

Validate retained schema artifacts and notebook bindings directly.
Track native Event Schema Set generation in clemensv/avrotize#581
and document that regeneration awaits upstream support.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Clemens Vasters (via Copilot CLI) <clemensv@users.noreply.github.com>

* Add shared xRegistry to Fabric schema-set authoring CLI

Keep registry selection, inherited Avro variants and Fabric definition assembly in this repository. Delegate schema conversion and named-record inlining to Avrotize without source-specific datatype patches.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Clemens Vasters (via Copilot CLI) <clemensv@users.noreply.github.com>

* Use Avrotize 3.9.6 portable logical-type projection

Pass the upstream s2a suppression option for Fabric JSON-wire schema generation. Verify canonical Pegelonline schemas reproduce retained schema strings exactly without local patches or changed fingerprints.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Clemens Vasters (via Copilot CLI) <clemensv@users.noreply.github.com>

* Bind Fabric notebook schema URLs during deployment

Inject verified schema URI mappings into an external notebook copy and
reject an unbound template before connection lookup. Keep deployment
coordinates outside the checkout.

Validate the replacement notebook through manual and scheduled runs with
fresh output/history matches for both event families.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Clemens Vasters (via Copilot CLI) <clemensv@users.noreply.github.com>

* Add notebook JSON and Avro payload encoding selection

Generate both AMQP payload encoders from the selected projected Avro
records with Avrotize 3.9.7. Expose encoding independently of CloudEvents
content mode, retain deployment-bound schema URLs, and test both event
families over the broker.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Declare Avro decoder dependency for Docker E2E tests

The new Avro binary assertion runs on the CI host, so its decoder must be installed alongside the Docker test dependencies.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix Pegelonline schematized ingestion and analytics

Qualify notebook encoding before startup, preserve optional zero values,
and normalize missing measurement classifications across transports.
Install analytics against discovered Eventstream-owned tables without
legacy dispatch ingestion or routing update policies.

Regenerate producers from the fixes in xregistry/codegen#712 and
clemensv/avrotize#592. Preserve canonical contracts and legacy deployment
artifacts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Signed-off-by: Clemens Vasters (via Copilot CLI) <clemensv@users.noreply.github.com>
Co-authored-by: Clemens Vasters (via Copilot CLI) <clemensv@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
clemensv added a commit that referenced this pull request Nov 29, 2026
Restore structured JSON values in data while preserving non-JSON base64
and binary-mode bytes. Keep receiver object-data assertions unchanged.

All eight CI suites and DCO passed on the qualified PR head.
The remaining changes in #712 are outside this repair.

Closes #701.
Refs #712 and clemensv/real-time-sources#1743.

Signed-off-by: Clemens Vasters <clemens@vasters.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

Generated Kafka cross-event key test filters variant message IDs instead of wire types

1 participant