Bug 1889716

Summary: opm index export doesn't properly recreate graph using semver mode
Product: OpenShift Container Platform Reporter: Kevin Rizza <krizza>
Component: OLMAssignee: Evan Cordell <ecordell>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED DUPLICATE Docs Contact:
Severity: high    
Priority: high    
Version: 4.6   
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-20 18:27:30 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:

Description Kevin Rizza 2020-10-20 12:55:07 UTC
Description of problem:

Currently, when using `opm index export` to backfill the index image back to the appregistry nested directory format, opm generates the set of bundles included in a package and pulls the csvs for each bundle into the directory. Since those bundles become the source of truth for all graph information, any mode that takes that source of truth away from the replaces chain in the set of csvs is lost. Instead, opm should respect the changes made to the graph defined in the index image and modify the exported manifests to generate a replaces graph that properly encapsulates the information generated by index add commands using semver and semver-skippatch modes.

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


How reproducible:


Steps to Reproduce:
1. Add a set of bundles that do not have `replaces` set in their csvs using `opm index add` to an index image
2. `opm index export` that index image

Actual results:

The csvs do not have replaces set, the graphs those bundles represent will not link all of the bundles down from latest version to oldest version.

Expected results:

Exported csvs have replaces set properly so that the eventual app-registry blob can be unpacked by a cluster at runtime with the correct graph as defined in the index image.

Comment 1 Kevin Rizza 2020-10-20 18:27:30 UTC

*** This bug has been marked as a duplicate of bug 1889714 ***