-
Notifications
You must be signed in to change notification settings - Fork 31
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
Improved logging for store copy / Updated store info to handle multi-arch images #146
Conversation
Signed-off-by: Adam Martin <[email protected]>
Signed-off-by: Adam Martin <[email protected]>
@@ -4,8 +4,9 @@ import ( | |||
"context" | |||
"encoding/json" | |||
"fmt" | |||
"strings" | |||
"text/tabwriter" | |||
"github.com/olekukonko/tablewriter" |
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.
MIT license, okay good.
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'm a fan of his tablewriter. I've used it in a few projects now.
if i != emptyItem { | ||
items = append(items, i) | ||
// handle multi-arch images | ||
if desc.MediaType == consts.OCIImageIndexSchema || desc.MediaType == consts.DockerManifestListSchema2 { |
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 imagine that these media type comparisons/checks will be with us for some years. I wonder if longer term than this particular change-set if it makes sense to unify them conceptually? i.e. for this one, possibly something like hauler.IsImageIndex()
/ hauler.IsImageShema()
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 like that idea.
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 idea isn't for saving characters/lines of code so much as conceptual concision.
Please check below, if the PR fulfills these requirements:
What kind of change does this PR introduce?
What is the current behavior?
hauler store copy
provides no incremental feedback.hauler store info
is missing data for the majority of images.What is the new behavior (if this is a feature change)?
hauler store copy
provides better logging.hauler store info
now handles multi-arch images.Does this PR introduce a breaking change?
Other information: