Bug 1956552 - opm alpha validate debug flag not working as expected
Summary: opm alpha validate debug flag not working as expected
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.8
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: 4.8-premerge
Assignee: Kevin Rizza
QA Contact: Bruno Andrade
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-03 21:57 UTC by Bruno Andrade
Modified: 2021-05-04 16:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-04 16:09:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bruno Andrade 2021-05-03 21:57:37 UTC
Description of problem:

Given a valid declarative config, the validate command with debug flag(-d) does not show any messages 

validDeclCfg
├── cockroachdb.json
└── etcd.json
0 directories, 2 files

opm alpha validate validPackages -d


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

How reproducible:
Always

Comment 1 Ankita Thomas 2021-05-04 14:42:41 UTC
./bin/opm alpha validate ./pkg/registry/testdata/validDeclCfg/ -d
ERRO[0000] 1 error occurred:
	* invalid package "etcd": 1 error occurred:
	* default channel must be set

It shows an error in a declarative config field when it exists, but not errors when the directory isn't actually a valid declarative config or if there are issues with parsing the json.

Running the registry with adeclarative config file with json errors causes the file to be ignored silently. We should be failing when we don't parse the input directory correctly

Comment 2 Ankita Thomas 2021-05-04 16:09:17 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.


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