Skip to content
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

Allow backward compatible changes in CRD #730

Closed
nicolaferraro opened this issue Jun 7, 2019 · 2 comments · Fixed by #867
Closed

Allow backward compatible changes in CRD #730

nicolaferraro opened this issue Jun 7, 2019 · 2 comments · Fixed by #867
Assignees
Labels
area/core Core features of the integration platform area/knative Related to Knative
Milestone

Comments

@nicolaferraro
Copy link
Member

Let's consider the following scenario.

I have a knative controller that reads and write camel K integrations. It imports the camel k apis, version 0.3.3.
After some point in time we release 0.4.0 with an additional field "version".

Technically the knative controller can ignore that field, but in practice it can't, because the kubernetes unmarshalling fails when mapping the integration json into the 0.3.3 structs (that miss the "version" field).

Everything would be easier if we ignore unknown properties by default, by sending them into a "unknownFields" map struct during unmarshalling.

This would make the handshake between a super controller and camel k integrations easier, because the super-controller can depend on camel k version 0.4.x+ and not a precise version.

Versioning the resources does not help.

@nicolaferraro nicolaferraro added area/knative Related to Knative area/core Core features of the integration platform labels Jun 7, 2019
@nicolaferraro nicolaferraro added this to the 1.0.0 milestone Jun 7, 2019
@nicolaferraro nicolaferraro added this to To do in Knative Camel Sources via automation Jun 7, 2019
@valdar
Copy link
Member

valdar commented Jun 7, 2019

From a different angle, doesn't this mean that changes in camle-k model/apis should be regarded as a breaking change not suitable for a minor release?

@nicolaferraro
Copy link
Member Author

Currently yes. If we consider that package is "public", meaning that other projects can build on top of that (and I currently count at least two opensource projects building on top of that: Knative and Syndesis), they should not be broken at every release.
I don't think we'll solve anything doing major vs. minor reasoning, because people often want to use latest Knative with latest Camel K and expect that to work. API is now v1alpha1, but we should solve that problem before v1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Core features of the integration platform area/knative Related to Knative
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants