-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
testing: Fix VerifyKubernetesImages on Kubernetes versions before v1.24 with docker cruntime #17647
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What do you think about using
minikube image list --format=json
instead? We're kind of hacking behind the scenes when this functionality is already built into minikube. The command will use the cruntime to get the image list and will prevent a lot of this complication.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.
@spowelljr thanks for the review and comment!
my thinking was:
i wanted to make a minimal change in the hope that we'll deprecate dockershim at some point soon and then just delete this "workaround" block (as part of a bigger refactor/pruning of related code)
i'd also want to avoid testing a minikube functionality by using another minikube functionality (the "image list" subcommand in this case) as if a test fails, it would not be so obvious what failed specifically and potentially make debugging a bit harder
then i thought about using
docker images
(being the cruntime in this case) directly, but that would require output processing similar to what we do in theminikube image list
, effectively duplicating that, which made little senseso, initially, i opted to just keep the
crictl images
that we use in this test...but, at the end of the day, these are integration tests, so it wouldn't harm much i guess (as long as we keep in mind the above), so i amended the pr using
minikube image list
instead :)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.
local test results:
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.
Not relying on another minikube command is valid, I'm fine with either solution. Once we bump the minimum minikube version I'm fine reverting this PR as well. But if you're happy with it in its current state I'm happy to merge 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.
sure - both would work
i think we can stick with the
minikube image list
for now and switch back to thecrictl images
once we bump the minimum supported k8s version of 1.24+i've added a TODO comment there, so we don't forget - i think we're good to go with this one ;)