Bug 1873483 - Incorrect command description opm index deprecatetruncate
Summary: Incorrect command description opm index deprecatetruncate
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.6.0
Assignee: Evan Cordell
QA Contact: Jian Zhang
Depends On:
TreeView+ depends on / blocked
Reported: 2020-08-28 13:30 UTC by lgallett
Modified: 2020-08-31 02:57 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Github operator-framework operator-registry pull 421 None closed Bug 1873483: fixing typo in deprecatetruncate command 2020-09-17 14:22:56 UTC

Description lgallett 2020-08-28 13:30:51 UTC
Description of problem:

The command description incorrectly states to use "opm index deprecate" instead of "opm index deprecatetruncate"

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:
1. opm index deprecatetruncate -h

Actual results:

Expected results:

Additional info:

Comment 3 Jian Zhang 2020-08-31 02:57:51 UTC
mac:operator-registry jianzhang$ ./bin/opm  version
Version: version.Version{OpmVersion:"v1.6.1-249-gcde92c13", GitCommit:"cde92c13", BuildDate:"2020-08-31T02:14:12Z", GoOs:"darwin", GoArch:"amd64"}

mac:operator-registry jianzhang$ ./bin/opm index deprecatetruncate -h
Deprecate and truncate operator bundles from an index.

 Deprecated bundles will no longer be installable. Bundles that are replaced by deprecated bundles will be removed enirely from the index.

 For example:

  Given the update graph in quay.io/my/index:v1
  1.4.0 -- replaces -> 1.3.0 -- replaces -> 1.2.0 -- replaces -> 1.1.0
  Applying the command:
  opm index deprecatetruncate --bundles "quay.io/my/bundle:1.3.0" --from-index "quay.io/my/index:v1" --tag "quay.io/my/index:v2"
  Produces the following update graph in quay.io/my/index:v2
  1.4.0 -- replaces -> 1.3.0 [deprecated]
 Deprecating a bundle that removes the default channel is not allowed. Changing the default channel prior to deprecation is possible by publishing a new bundle to the index.

  opm index deprecatetruncate [flags]

  -i, --binary-image opm        container image for on-image opm command
  -u, --build-tool string       tool to build container images. One of: [docker, podman]. Defaults to podman. Overrides part of container-tool.
  -b, --bundles strings         comma separated list of bundles to add
  -c, --container-tool string   tool to interact with container images (save, build, etc.). One of: [docker, podman]
  -f, --from-index string       previous index to add to
      --generate                if enabled, just creates the dockerfile and saves it to local disk
  -h, --help                    help for deprecatetruncate
  -d, --out-dockerfile string   if generating the dockerfile, this flag is used to (optionally) specify a dockerfile name
      --permissive              allow registry load errors
  -p, --pull-tool string        tool to pull container images. One of: [none, docker, podman]. Defaults to none. Overrides part of container-tool.
  -t, --tag string              custom tag for container image being built

Global Flags:
      --skip-tls   skip TLS certificate verification for container image registries while pulling bundles or index

It looks good, but, as the end user, I couldn't find this "deprecatetruncate" subcommand in the output of the `opm index --help`.
mac:operator-registry jianzhang$ ./bin/opm index --help
generate operator index container images from preexisting operator bundles

  opm index [command]

Available Commands:
  add               Add operator bundles to an index.
  export            Export an operator from an index into the appregistry format
  prune             prune an index of all but specified packages
  prune-stranded    prune an index of stranded bundles
  rm                delete an entire operator from an index

  -h, --help   help for index

Global Flags:
      --skip-tls   skip TLS certificate verification for container image registries while pulling bundles or index

I guess it's time to show the "deprecatetruncate" subcommand. Create a bug 1873916 for this issue.
For this bug, LGTM, verify it.

Note You need to log in before you can comment on or make changes to this bug.