-
Notifications
You must be signed in to change notification settings - Fork 489
Show container image manifest for pods #2695
Conversation
The green looks much better in the dark mode. Thanks for taking a look at it! |
I'm worried about the dependencies here, specifically with building for Windows and in our CI pipeline. I don't have any answers. We can probably get this building under ubuntu by adding a call to Unsure about Mac and Windows. |
9d7ac68
to
289e8a6
Compare
After adding additional tags to all go build commands ( Additionally, windows tests were failing due to inability to locate windows alpine and nginx images. Temporarily fixed that by always overriding OS to |
If we want to use thing library, we are going to have to do some work upstream to support Windows. As mentioned in the issue, currently Windows just has stubs for the methods. |
I think at this point we may want to see if there are any library alternatives that get us what we need across platforms or look in to how much of a lift it is to get this working correctly on Windows. |
We many also be able to abstract the docker manifest code directly and leverage it as a library. https://github.com/docker/cli/blob/a32cd16160f1b41c1c4ae7bee4dac929d1484e59/cli/command/manifest/inspect.go#L94 |
Did some more investigating after @mklanjsek pointed out the issue in question, that code path wasn't being called with his use of the the library and so this should all be working under Windows. Found that configuring mingw64 and the appropriate deps using MSYS resulting in a successful compilation under Windows. I think for our windows build, we can add https://github.com/marketplace/actions/install-mingw We will want to configure the Windows job with on of the extra actions below |
Let's roll back the always use Linux commit and then we can start tweaking the Windows workflow to get it passing. |
For the verify generated code, add Should fix that up. |
Signed-off-by: Milan Klanjsek <mklanjsek@pivotal.io> Signed-off-by: Milan Klanjsek <mklanjsek@pivotal.io>
Signed-off-by: Milan Klanjsek <mklanjsek@pivotal.io>
Signed-off-by: Milan Klanjsek <mklanjsek@pivotal.io>
Signed-off-by: Milan Klanjsek <mklanjsek@pivotal.io>
e288498
to
a6a54ee
Compare
Signed-off-by: Milan Klanjsek <mklanjsek@pivotal.io>
Signed-off-by: Milan Klanjsek <mklanjsek@pivotal.io>
sections.Add("Image Manifest", component.NewJSONEditor(manifest, true)) | ||
sections.Add("Image Configuration", component.NewJSONEditor(configuration, true)) | ||
} else { | ||
sections.Add("Image Manifest", component.NewText(fmt.Sprintf("Unable to load image manifest %s", err))) |
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 error shown in the UI is hard to read when all the errors from the error chain are concatenated together.
An easy way to reproduce this is to kill the internet before caching and see the error in the pod summary.
It shows something like:
Unable to load image manifest error creating image source for image docker://nginx:1.14.2: pinging container registry registry-1.docker.io: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io: no such host
.
The error from https://github.com/vmware-tanzu/octant/pull/2695/files#diff-85fedc5e144e89139dc0296c0fb2574d2576d493b8bad648bd79c31d32dbd73bR63 and others in the manifest.go and any subsequent errors can be formatted a little better with some delimiters.
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.
This change is not a huge blocker and can be made afterwards.
Added two new fields to Pod Container section:
Image Manifest
andImage Configuration
as shown here in partially expanded state:The output for these two fields is generated by
containers\image
go library, same library used forcontainers\skopeo
tool. Image Manifest corresponds to output of following skopeo command:skopeo inspect --raw docker://nginx:1.16.1
Image configuration is showing image configuration based on current OS, similar to output of:
skopeo inspect --config --override-os linux docker://alpine:3.14.0
Note that for Mac library only supports
linux
OS setting, so it has to be set manually to override the OS value.Tested only on Mac, need help testing it on other operating systems.
Signed-off-by: Milan Klanjsek mklanjsek@pivotal.io