Bug 1956745

Summary: opm alpha serve debug flag doesn't work as expected
Product: OpenShift Container Platform Reporter: Bruno Andrade <bandrade>
Component: OLMAssignee: Kevin Rizza <krizza>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED WONTFIX Docs Contact:
Severity: low    
Priority: low CC: ankithom
Version: 4.8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-04 16:08:45 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 Bruno Andrade 2021-05-04 10:45:40 UTC
Description of problem:

If a package has some issues, the opm alpha serve --debug doesn't show error messages from the related package.

Version-Release number of selected component (if applicable):
Version: version.Version{OpmVersion:"v1.17.0-26-g7102c558", GitCommit:"7102c558", BuildDate:"2021-05-03T19:49:28Z", GoOs:"linux", GoArch:"amd64"}

How reproducible:
Always


Steps to Reproduce:
1. Checkout operator-registry project and go pkg/registry/testdata
git clone https://github.com/operator-framework/operator-registry/
cd pkg/registry/testdata  
2. Comment "defaultChannel": "singlenamespace-alpha" line
3.Start the registry server with: 
opm alpha serve validDeclCfg -p 50053 --debug -t test.log -> no output is returned

Comment 1 Ankita Thomas 2021-05-04 13:58:32 UTC
Version: version.Version{OpmVersion:"v1.17.0-26-g7102c558", GitCommit:"7102c558", BuildDate:"2021-05-04T13:54:15Z", GoOs:"linux", GoArch:"amd64"}

$ ./bin/opm  alpha serve pkg/registry/testdata/validDeclCfg -p 50053 --debug -t test.log
Error: could not build index model from declarative config: 1 error occurred:
	* invalid package "etcd": 1 error occurred:
	* default channel must be set



I can't seem to reproduce this error, the built version of opm works as expected.

Comment 2 Ankita Thomas 2021-05-04 16:08:45 UTC
We discussed this among the team, looks like the validate command isn't at a state where it's ready for testing yet. We don't want to open bugs for the alpha sub-commands just yet, those are still being iterated on.

Closing this out.