-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Upgrade kuttl testing image to 0.9.0 version #4557
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
Conversation
Unfortunately this kuttl version contains a breaking change ( My suggestion is to start versioning the scorecard-test-kuttl image with kuttl version thrown into the matrix, ex:
In the above scheme, a kuttl version can be upgraded to the next version that doesn't have a breaking change; once a break occurs, that kuttl version will be fixed and a new matrix entry created for the breaking kuttl version. |
As far as I can see, the change would impact XX-assert.yaml and kuttl-test.yaml that can be managed by a simple replace in the files with filenames following that patter. In my opinion is simple enough to include it in the migration guide to the next of operator sdk docs, rather than creating a matrix of versions, specially taking into account that they don't have planned to have an 0.8.1 and a 0.9.1, so it won't be two independent versions with support. Also I'd like to point out that docs are referring tag image :dev which hasn't been updated since few months ago and make the test fail, so in my opinion correcting that tag and the namespace of the yaml for the new operator sdk version makes sense rather than having a matrix of versions (which won't have a long live). Users that don't want to upgrade can use an older version of the tag of operator sdk kuttl test. |
The change is semantically broader than that: kuttl has deprecated an entire group, which is a pretty big breaking change. While I agree the fix is simple, operator-sdk has committed to no breaking changes within the 1.0 major version. Anyone should be able to upgrade between two minor versions, including upgrading image versions, without changing their project. Two alternatives to the approach I suggested:
This is a docs "bug", |
@estroz I've been doing some testing with sed, unfortunately the path in which operator-sdk is mouting the yamls is read only. If you think it'd be appropriate I can move them to /tmp and run kuttl over there. The option mentioned here:
Does not seem viable for me, as there is operator-sdk code (to convert the output of kuttle to scorecard), that gets injected into the container too, so if we would use kuttl version only, we would have no way to reflect changes in the binary we are using or any changes in the script for that matter. Not certain what would be your preferred course. |
While breakage is technically possible, the only things the operator-sdk wrapper does is run kuttl with some flags needed to generate a JSON report, decode that report, then encoding it in a scorecard output format. If a bug needs to be fixed/change made in the wrapper, new images can be built for existing kuttl version tags, such that This solution isn't foolproof, and can cause some confusion because images tagged with a version are being refreshed in the background. You could use image sha256 tags to overcome these challenges. I am open to other suggestions and so will post this issue in the working group meeting happening on wednesday (03/03/2021). |
@estroz I've added a new commit that solves the issue by copying the test files to a temp folder in case you want to pursue that route, for me seems like an acceptable compromise. I tested it with our project and it worked just fine, as well as the tests here are passing. In any case I'd update the docs to have the default with the new version so in the future the workaround can me removed. |
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
The CI for ansible failed, I am assuming that it's not related to my change. But I can't find a way to re-run it without pushing more changes (I don't want to wipe the review). |
/ok-to-test |
@jlpedrosa you can run |
@estroz thanks! |
/retest |
@kensipe Sorry, my commit wasn't signed and I had to push force, could you re approve this PR? Thanks |
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.
copying the test files to a temp folder in case you want to pursue that route
While this may resolve this particular breakage, it (1) hides complexity from users and isn't foolproof and (2) doesn't solve the general problem of resolving future breaking changes (pre kuttl 1.0).
A compromise that was brought up in the community meeting this morning: tag scorecard-test-kuttl images with an operator-sdk commit or a combination of kuttl version and operator-sdk commit, i.e. do not use operator-sdk versions in tags. This scheme gives you all version information within the image tag without exploding the build matrix.
Another, brought up afterwards, is to start versioning the scorecard-test-kuttl image independently of operator-sdk version entirely, so breaking changes between kuttl versions can be captured as major version bumps. The first, including this change, would be scorecard-test-kuttl:v2.0.0
.
The second is probably the better solution, but I figured I'd field both. Do either of those fit your needs/sound better @jlpedrosa?
Either way, string substitution isn't the right solution.
New version contains the capability to run assertion based on commands/scripts, that enable more complete testing of the objects being managed Signed-off-by: Jose Luis Pedrosa <jlpedrosa@gmail.com>
@estroz Any of both approaches meets my reqs, I only need to have >= 0.9 Kuttl version to be able to execute assertions. |
Nothing on your end yet. I'll need to set up a separate release job for scorecard-test-kuttl and get that merged first. Then you can rebase this PR onto master, and once merged I can build a v2.0.0 release. |
/retest |
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.
Now that #4633 has merged, this is unblocked. After this merges I'll cut a v2.0.0 release! Thanks for the contribution @jlpedrosa
/lgtm
@jlpedrosa |
Thanks @estroz awesome! |
Description of the change:
Upgrade kuttl to version 0.9.0
Motivation for the change:
New version contains the capability to run assertion based on commands/scripts, that enable more complete testing of the objects being managed