Bug 1798961

Summary: The `oc adm catalog build` help example is wrong
Product: OpenShift Container Platform Reporter: Jian Zhang <jiazha>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: Jian Zhang <jiazha>
Severity: low Docs Contact:
Priority: medium    
Version: 4.4CC: aos-bugs, bandrade, jokerman, kuiwang, mfojtik, scolange, tbuskey
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-13 21:56:25 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 Jian Zhang 2020-02-06 12:07:59 UTC
Description of problem:
The help example of the `oc adm catalog build` should NOT display the:

  oc adm catalog mirror --appregistry-org=redhat-operators --to=file://offline/redhat-operators:4.3
...

Version-Release number of selected component (if applicable):
[jzhang@dhcp-140-36 ~]$ oc version
Client Version: 4.4.0-0.nightly-2020-02-04-032141

How reproducible:
always

Steps to Reproduce:
1. Run command: `oc adm catalog build --help`

Actual results:

[jzhang@dhcp-140-36 ~]$ oc adm catalog build --help
Builds a catalog container image from a collection operator manifests.

 Extracts the contents of a collection of operator manifests to disk, and builds them into an operator registry catalog
image.

Usage:
  oc adm catalog build [flags]

Examples:
  # Build an operator catalog from an appregistry repo and store in a file
  oc adm catalog mirror --appregistry-org=redhat-operators --to=file://offline/redhat-operators:4.3
  
  # Build an operator catalog from an appregistry repo and mirror to a registry
  oc adm catalog mirror --appregistry-org=redhat-operators --to=quay.io/my/redhat-operators:4.3

Expected results:
Should be `build`, not the `mirror` in the example info:

  oc adm catalog mirror --appregistry-org=redhat-operators --to=file://offline/redhat-operators:4.3
  oc adm catalog mirror --appregistry-org=redhat-operators --to=quay.io/my/redhat-operators:4.3

Additional info:

Comment 1 Maciej Szulik 2020-02-11 08:50:29 UTC
*** Bug 1798958 has been marked as a duplicate of this bug. ***

Comment 3 Jian Zhang 2020-02-14 05:55:04 UTC
[jzhang@dhcp-140-36 ~]$ ./oc version -o yaml
clientVersion:
  buildDate: "2020-02-13T20:11:27Z"
  compiler: gc
  gitCommit: 5d7a12f03389b03b651f963cb5ee8ddfa9cff559
  gitTreeState: dirty
  gitVersion: openshift-clients-4.4-51-g5d7a12f0
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64
releaseClientVersion: 4.4.0-0.nightly-2020-02-13-212616
serverVersion:
  buildDate: "2019-05-02T11:52:09Z"
  compiler: gc
  gitCommit: d4cacc0
  gitTreeState: clean
  gitVersion: v1.11.0+d4cacc0
  goVersion: go1.10.8
  major: "1"
  minor: 11+
  platform: linux/amd64

[jzhang@dhcp-140-36 ~]$ ./oc adm catalog build --help
Builds a catalog container image from a collection operator manifests.

 Extracts the contents of a collection of operator manifests to disk, and builds them into an operator registry catalog
image.

Usage:
  oc adm catalog build [flags]

Examples:
  # Build an operator catalog from an appregistry repo and store in a file
  oc adm catalog build --appregistry-org=redhat-operators --to=file://offline/redhat-operators:4.3
  
  # Build an operator catalog from an appregistry repo and mirror to a registry
  oc adm catalog build --appregistry-org=redhat-operators --to=quay.io/my/redhat-operators:4.3
...

LGTM, verify it.

Comment 5 errata-xmlrpc 2020-05-13 21:56:25 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, 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/RHBA-2020:0581