Description of problem: oc-mirror does not error when invalid metadata is passed to the describe command Version-Release number of selected component (if applicable): Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.2.0-alpha.1-36-g7bde4c7", GitCommit:"7bde4c7b", GitTreeState:"clean", BuildDate:"2022-05-17T00:40:46Z", GoVersion:"go1.17.1", Compiler:"gc", Platform:"linux/amd64"} How reproducible: 100% Steps to Reproduce: 1. Generate an imageset with the latest 4.10 release of oc-mirror. Any configuration 2. Compile the this version of oc-mirror for 4.11 release. 3. Run oc-mirror oc-mirror describe out/mirror_seq1_000000.tar Actual results: { "kind": "Metadata", "apiVersion": "mirror.openshift.io/v1alpha2", "uid": "00000000-0000-0000-0000-000000000000", "singleUse": false, "pastMirror": { "timestamp": 0, "sequence": 0, "mirror": { "platform": {}, "helm": {} } } } Expected results: The API version is not valid so error expected: error: error retrieving metadata from "out/mirror_seq1_000000.tar": config GVK not recognized: mirror.openshift.io/v1alpha1, Kind=Metadata Additional info:
waiting for newer version
can't reproduce the issue now : oc-mirror describe mirror_seq1_000000.tar error: error retrieving metadata from "mirror_seq1_000000.tar": config GVK not recognized: mirror.openshift.io/v1alpha1, Kind=Metadata oc-mirror version Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.11.0-202206030929.p0.gb22233e.assembly.stream-b22233e", GitCommit:"b22233e611ab4692748ffc992a235abd9c231ecf", GitTreeState:"clean", BuildDate:"2022-06-03T10:12:00Z", GoVersion:"go1.18", Compiler:"gc", Platform:"linux/amd64"}
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069