Conversation
INTER-2457. Regenerated Event as a oneOf wrapper to show the runtime break. Do not merge.
|
Following files do not match corresponding templates: To fix this warning, make sure template files are up-to-date, and generate files by running the following command: pip install uv && uv sync --only-group dev && bash ./generate.sh |
pnpm exec changesetto create a changeset. |
Wrong commit message format detectedWe use Semantic Commit Messages in our project.
Run the next command in the project root to activate local hooks: sh ./install_hooks.shMore info you can find in job logs Commitlint ErrorsCommit: 0a83a8d `chore: SPIKE Event oneOf discriminated union INTER-2457. Regenerated Event as a oneOf wrapper to show the runtime break. Do not merge.`
|
|
This was a prototype done as part of a spike. Closing now, still usable as a reference during the production implementation. |
Eventstays a oneOf (EventDevice|EventEdge) onactual_instance.Event.from_jsonhydrates a missingsourcekey todeviceand deserializesEventDevice.source: edgestaysEventEdge. Edge is never rewritten.Discussion point: hydrate vs flatten
Option B keeps the generated union and patches the discriminator. Callers still use
event.actual_instance. Option C (#225) keeps a singleEventmodel (sourceoptional) and adds/edgeasEventEdgeseparately.Known issue: CI will fail
Existing tests and examples that read
event.identificationstill raiseAttributeError. That is the spike.