oam-dev / spec

Open Application Model (OAM).
https://oam.dev
Other
3.03k stars 246 forks source link

Semantic versioning for definitions #483

Open morigs opened 1 year ago

morigs commented 1 year ago

Currently, a new revision created on every definition update. Revision numbers are simple increasing integers (v1, v2, v3...). User can specify specific revision when using definition in component, trait, etc...

There are two practical problems with this approach:

Avoiding Breaking Changes

As a user I want to pin used version to the major. So that it will be automatically updated, but won't cause any breaking changes.

For example, I specify mycomponent@^1.2.0. When operator updates mycomponent to version 1.3.0, I will automatically get the new version. However, if the operator publishes a new version with breaking changes (2.0.0) I won't get it until explicitly update component to mycomponent@^2.0.0 with new properties.

Reproducible Deployments

Suppose I have Application manifest which uses mycomponent@v3 and mycomponent definition. Now I want to share my Application with third-party so that they can deploy it on their infrastructure. They apply mycomponent definition, but now they have mycomponent-v1 revision only and they have to update all applications and replace v3 with v1.


Should this be addressed by the spec? Or this is KubeVela specific issue? Are there known workarounds?

wonderflow commented 1 year ago

Good point, this should be addressed in the spec, we can fix it in the kubevela implementation first.

morigs commented 1 year ago

Thx for response. What's the process? Should I create an issue in kubevela?

wonderflow commented 1 year ago

@morigs It's already has an issue, I've updated. https://github.com/kubevela/kubevela/issues/3573