-
Notifications
You must be signed in to change notification settings - Fork 55
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
validated bad container image URL #4283
base: main
Are you sure you want to change the base?
validated bad container image URL #4283
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4283 +/- ##
===========================================
+ Coverage 32.37% 43.88% +11.50%
===========================================
Files 85 95 +10
Lines 6505 7716 +1211
Branches 1349 1634 +285
===========================================
+ Hits 2106 3386 +1280
+ Misses 4399 4330 -69 ☔ View full report in Codecov by Sentry. |
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 should change the way we validate it. See the in line comment
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 to me.
After moving the image info validation to onDidAccept
it works really well!
Also it doesn't make any excessive 'oc' binary invocations, which is also good, imho.
@@ -675,6 +675,13 @@ export class Oc { | |||
.catch((error) => namespaces); | |||
} | |||
|
|||
public async hasImageInfo(url: string): Promise<boolean> { | |||
const result = await CliChannel.getInstance().executeTool( |
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.
Try this with docker.io/library/mongo
. For me at least, it fails, so I can't deploy mongodb
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.
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 version of the mongo DB image do you have? I have a31b196b207d
which should be the latest image, since I recently deleted all my container images to free some space. Maybe this affects 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'll double check on windows
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.
Can I check it with OS Tools somehow?
Docker says the mongo:latest
is a31b196b207d
...
$ docker images --no-trunc
REPOSITORY TAG IMAGE ID CREATED SIZE
mongo latest sha256:a31b196b207d768e78f2af331869e91d13443f691080d3b93e8009a53391eeaa 2 weeks ago 796MB
However, the Pod's config says:
...
"containerStatuses": [
{
"containerID": "cri-o://4080a87a588b22b75135f996350ffe331dc13b6a4423d07f550450bb9d929f43",
"image": "docker.io/library/mongo:latest",
"imageID": "docker.io/library/mongo@sha256:1cd3951000020c1cb1757868e6cfd82667f57d80bb31fed8b585e26a8a1d960f",
...
which actually doesn't look like the same image... Does 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 was able to reproduce the same error on Windows. I guess you can check the status of running the command that's listed here. I don't really know what's going on
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.
The command result is an error for me, since it detects windows and linux versions of the docker image
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.
The command result is an error for me, since it detects windows and linux versions of the docker image
I didn't get this... So, you have the same error result while deploying the same image on Windows and *nix?
And what does it give to us?
... And yes, I think if you hit the docker pull rate limit, you'll probably won't be able to deploy any image till the counter is dropped. Not 100% sure though.
It would be nice to have some sort of indication that a verification is going on; I don't know yet how this would be implemented though. |
@datho7561 added progress to show the info |
The progress indicator on the image check looks great! I'd like to figure out what's going on with the mongodb image before merging. |
I just hit my pull rate limit for docker. Maybe this is related? |
If I execute
None of these images has neither So, I'm not actually sure if we can really check what's getting installed with |
@vrubezhny @msivasubramaniaan I think this will work, however I have exceeded the rate limit and need to wait before I can try it again:
changes I made:
|
Do you suggest adding If so, we should take care if user has NOT already added any tags to the URL (like |
No description provided.