-
Notifications
You must be signed in to change notification settings - Fork 167
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
Create values-schema mechanism to update values to conform to schema changes #259
Comments
Copied from |
Let's just refer to SemVer 2.0.0 then for clarity? https://semver.org |
Where is the REQ discussion for this @svatwork ? |
This is the first one: https://github.com/redkubes/otomi-core/discussions/344 |
thanks for all the hard work and congrats with the lessons learned, but this darling will be closed in favor of our simplifying efforts ;) |
Reopening as we need this to migrate values forward automatically. |
Parking this once more as this seems more complex seen the different files involved, and knowing we don't have much need for it yet. |
I have some new insights. I think we maybe should reconsider how we will approach this problem. I was reading Designing Data-Intensive Applications, and the problem domain is "schema evolution". Schema evolution has solutions in other serialisation/encoding formats. Thrift/Protobuf's solution is described like so:
Ie., keys can be referenced with tags and their meaning does not depend on their "nest" in the schema. The Apache Avro and Parquet projects have also rethought schema evolution but are specific to their problem domains. Draw your own conclusions, but it seems kinda hacky to move properties around by nest to retain their meaning. |
since we are only evolving forward I have no problem with our chosen approach...this is about automating a version to a newer one and never having to know what was the state before |
Can you do this after the KinD delivery @svatwork |
To be honest, I don't think this story is realistic and I hope we can have a chat whether this will really solve a problem. |
why wouldn't it be? I observe that we create, delete and move props, and transform values. Can we not cover those use cases in the approach we designed? |
User story
As a developer making breaking changes to the values-schema, I want to have a mechanism that will copy the corresponding values to their new locations.
Problem
We break the schema when:
otomi-core
should have a mechanism that migrates values to conform to the new spec.Proposed solution
A schema will get a
version
(semver, patches are additions, minors are breaking changes) and achanges
property holding information about breaking changes:Workflow:
Every time a developer changes the schema which includes these changes as DOD, the
otomi migrate-values
command should be performed that will massage the values to migrate to the new structure.Schema change:
Sample part:
Tasks:
core:
otomi migrate-values-rev
to show all history from previous versions from version control.otomi migrate-values
script that migrates otomi-values forward based on changes defined, and sets latest version in values.otomi-tasks
tobin/migrate-values.sh
andbin/otomi migrates-values
otomi-values
repository to a certain version so the modification can take placegetNewVersion()
mockgetNewVersion()
getOldVersion()
mockgetOldVersion()
otomi-values
modificationdisplacements ()
deletions ()
mutations ()
api:
Definition Of Done
adr/*.md
and appended to list inadr/_index.md
docs/lifecycle-management/versioning
)The text was updated successfully, but these errors were encountered: