Skip to content

refactor(io)!: replace erased callbacks with typed model events - #519

Merged
rapids-bot[bot] merged 2 commits into
rapidsai:mainfrom
johanpel:schema-based-event-import-iterator-callback
Aug 5, 2026
Merged

refactor(io)!: replace erased callbacks with typed model events#519
rapids-bot[bot] merged 2 commits into
rapidsai:mainfrom
johanpel:schema-based-event-import-iterator-callback

Conversation

@johanpel

@johanpel johanpel commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Description

Replace generated AnyEvent and type-erased callback records with typed exporter providers.

  • allow generated contexts to build exporters from any provider supporting each entity event type
  • use umbrella-event conversions when one callback consumes events across a model
  • make EventCallback<T> an exporter provider while preserving the full event envelope
  • add Noop as the runtime-free provider
  • migrate generated examples, legacy model contexts, query-engine tests, and NVTX consumers to the provider API

Written by Codex.

@johanpel
johanpel force-pushed the schema-based-event-import-iterator-callback branch 3 times, most recently from d5dcdce to 36d25b6 Compare August 4, 2026 14:42
Signed-off-by: Johan Peltenburg <johan.peltenburg+code@gmail.com>
@johanpel
johanpel force-pushed the schema-based-event-import-iterator-callback branch from 36d25b6 to 484292e Compare August 5, 2026 05:42
@johanpel
johanpel marked this pull request as ready for review August 5, 2026 06:30
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR replaces optional exporter configuration with generic context providers, adds Noop, changes callbacks from erased recorded events to typed events, removes AnyEvent, updates generated observers, and migrates examples, tests, bridges, and integrations.

Changes

Instrumentation provider flow

Layer / File(s) Summary
Provider-based context construction
crates/instrumentation/src/..., crates/model/src/lib.rs, crates/model-macros/src/model_macro.rs
Contexts now accept generic ContextExporter providers. Noop handles disabled instrumentation. Context preparation and observer construction use the provider directly.
Typed callback exporter contract
crates/io/callback/src/lib.rs, crates/io/src/..., crates/instrumentation/src/sidecar.rs, crates/instrumentation/Cargo.toml, crates/model/Cargo.toml
Callback exporters now use generic typed events and Into conversions. RecordedEvent and callback exporter options are removed.
Generated provider observers and umbrella events
crates/instrumentation-build/src/..., crates/instrumentation-build/example/...
Generated models build observers from providers. AnyEvent generation is removed, and umbrella event generation is tested and used by the example.
Call-site and observer ownership migration
crates/codegen/src/..., crates/instrumentation/tests/..., domains/query_engine/tests/fixed/..., examples/..., integrations/nvtx/example/...
Call sites pass providers or typed callbacks directly. Observer construction borrows shared exporter values instead of cloning or moving them.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested reviewers: mbrobbel, dhruv9vats, johallar

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: replacing erased callbacks with typed model events.
Description check ✅ Passed The description clearly explains the refactor and its objectives, but it omits testing details and related issue information.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]

This comment was marked as spam.

@johanpel

johanpel commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 3da06d1 into rapidsai:main Aug 5, 2026
22 checks passed
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.

2 participants