-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect and handle breaking changes in schemas #1195
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder whether there's a good way to unit-test this?!
I've added a unit test as a separate commit. It isn't beautiful, but it works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic looks sounds to me. Just small stuff now before merging.
3cf4080
to
55a0649
Compare
Addressed and outdated; further feedback discussed via Slack.
This should be reviewed by @tobim after our Slack call yesterday on the matter. The last commit is the most important one here. |
When changing schemas such that types are no longer a superset of previous versions of the same type, VAST may end up in a state where it cannot import events of that type. This change makes the type registry forget about incompatible versions of types automatically when a new and incompatible type is registered.
The previous commit made this one really obvious.
Co-authored-by: Matthias Vallentin <matthias@tenzir.com>
Now it's truly recursive and unit-tested on its own.
Co-authored-by: Matthias Vallentin <matthias@tenzir.com>
Instead of erasing incompatible versions, move the most recent version to the front so it is correctly used by all the readers.
699b8d5
to
14b2758
Compare
📔 Description
When changing schemas such that types are no longer a superset of previous versions of the same type, VAST may end up in a state where it cannot import events of that type.
This change makes the type registry
forget about incompatible versions of types automatically when a new and incompatible type is registered.warn when this happens and ensures that newly registered types get priority over older types when importing data.📝 Checklist
🎯 Review Instructions
Commit-by-commit.