-
Notifications
You must be signed in to change notification settings - Fork 104
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
Implement KEP-19 by distinguishing between app and operator version #1257
Conversation
The app version of an operator package is taken into account using operations that apply to packages. E.g., when installing a package, a user is able to provide a specific app version to install. To further distinguish app version and operator version, the 'version' field in operator packages and the package index has been renamed to 'operatorVersion'. Package version resolution has been updated to take the app version into account; operator packages are first sorted by app version, then sorted by operator version. Furthermore, the app version is added to the package tarball name to avoid conflicts.
The part of the E2E test that tests the current operators repository is expected to fail because the repository needs to be updated to reflect that |
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.
Aside from a few nits, my only point would be using _
vs. -
in url/tarbal names. Though not strictly necessary, we should make our lives easier and use _
since -
can be part of SemVer.
Co-Authored-By: Aleksey Dukhovniy <adukhovniy@mesosphere.io>
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.
Lgtm!
________
< Ship it! >
--------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
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.
we have to fix the issue with -
vs _
before it this can be merged
return versionX.LessThan(versionY) | ||
} | ||
|
||
return appVersionX.LessThan(appVersionY) |
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 feel we should have a number of tests around this. This is more complex than it was originally.
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 still feel this is true... but approving with the assumption that it will happen or will have an issue created to do it.
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 added some additional test cases to TestParseIndexFile
in index_test.go
. But looking at it again, it doesn't test this particular code path. I'll add more entries to the test index to make sure that every case is covered. Looked at it again, all cases are covered, this particular line it tested by
assert.Equal(t, "2.3.0", index.Entries["kafka"][0].AppVersion, "kafka app version")
assert.Equal(t, "0.2.0", index.Entries["kafka"][0].OperatorVersion, "kafka operator version")
assert.Equal(t, "2.2.1", index.Entries["kafka"][1].AppVersion, "kafka app version")
assert.Equal(t, "0.2.0", index.Entries["kafka"][1].OperatorVersion, "kafka operator version")
in TestParseIndexFile
.
locally |
this resulted in a package named |
it's the operators fault! on it. |
Signed-off-by: Ken Sipe <kensipe@gmail.com>
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.
looks good in general.. nice work!
I would love to see more tests around packageversion equality.
Created new 0.10.0
repo... not all the operators serialize. We need to talk about what will be in the repo. It is understandable that older versions with older formats remain (in that long term that is what we want). however the older kudo can't read the newer index and the new kudo can read the older operator formats. They need to be pruned.
List of what didn't make it:
- flink 0.1.0
- flink-demo 0.1.1
- kafka 0.1.0, 0.1.2, 0.2.0
- zookeeper 0.1.0
What is there needs to have the operator version incremented... but as mentioned, the older version doesn't make sense to continue to include IMO. We can talk about it.
new repo: https://kudo-repository.storage.googleapis.com/0.10.0
Thanks @kensipe for taking care of providing a new repository! |
13f496f
to
494dbc6
Compare
e2e test failing due to out of sync operator repo. fixed with kudobuilder/operators#184 rerunning tests after merge |
…1257) The app version of an operator package is taken into account using operations that apply to packages. E.g., when installing a package, a user is able to provide a specific app version to install. To further distinguish app version and operator version, the 'version' field in operator packages and the package index has been renamed to 'operatorVersion'. Package version resolution has been updated to take the app version into account; operator packages are first sorted by app version, then sorted by operator version. Furthermore, the app version is added to the package tarball name to avoid conflicts. Co-authored-by: Aleksey Dukhovniy <adukhovniy@mesosphere.io> Co-authored-by: Ken Sipe <kensipe@gmail.com> Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
What this PR does / why we need it:
The app version of an operator package is taken into account using operations that apply to packages. E.g., when installing a package, a user is able to provide a specific app version to install. To further distinguish app version and operator version, the 'version' field in operator packages and the package index has been renamed to 'operatorVersion'.
Package version resolution has been updated to take the app version into account; operator packages are first sorted by app version, then sorted by operator version. Furthermore, the app version is added to the package tarball name to avoid conflicts.
Notes for reviewers:
Most of the changes update the existing tests and their test data. Functional changes are:
app-version
andoperator-version
flagsPackageVersions
struct to be sorted first by app version, then by operator version