Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2086972

Summary: oc-mirror does not error invalid metadata is passed to the describe command
Product: OpenShift Container Platform Reporter: Jennifer Power <jpower>
Component: ocAssignee: Alex <aflom>
oc sub component: oc-mirror QA Contact: zhou ying <yinzhou>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: unspecified CC: jpower, vdinh
Version: 4.11   
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:12:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jennifer Power 2022-05-17 00:47:29 UTC
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:

Comment 2 zhou ying 2022-05-31 13:14:26 UTC
waiting for newer version

Comment 4 zhou ying 2022-06-06 05:17:09 UTC
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"}

Comment 6 errata-xmlrpc 2022-08-10 11:12:29 UTC
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