Description of problem: If a package has some issues, the opm alpha serve doesn't load any packages. 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 & 4. grpcurl --plaintext localhost:50053 api.Registry/ListBundles -> no output is returned.
./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 registry shouldn't be serving at all with an invalid config, so erroring out should be what we expect. How was this run?
Hi Ankita, I still have the same issue in the last build version, here are my detailed steps. go version go version go1.14.7 linux/amd64 GOFLAGS="-mod=vendor" go build -tags=json1 -o bin/configmap-server ./cmd/configmap-server # github.com/mattn/go-sqlite3 sqlite3-binding.c: In function ‘sqlite3SelectNew’: sqlite3-binding.c:123303:10: warning: function may return address of local variable [-Wreturn-local-addr] 123303 | return pNew; | ^~~~ sqlite3-binding.c:123263:10: note: declared here 123263 | Select standin; | ^~~~~~~ GOFLAGS="-mod=vendor" go build -tags=json1 -o bin/initializer ./cmd/initializer # github.com/mattn/go-sqlite3 sqlite3-binding.c: In function ‘sqlite3SelectNew’: sqlite3-binding.c:123303:10: warning: function may return address of local variable [-Wreturn-local-addr] 123303 | return pNew; | ^~~~ sqlite3-binding.c:123263:10: note: declared here 123263 | Select standin; | ^~~~~~~ GOFLAGS="-mod=vendor" go build -tags=json1 -o bin/registry-server ./cmd/registry-server # github.com/mattn/go-sqlite3 sqlite3-binding.c: In function ‘sqlite3SelectNew’: sqlite3-binding.c:123303:10: warning: function may return address of local variable [-Wreturn-local-addr] 123303 | return pNew; | ^~~~ sqlite3-binding.c:123263:10: note: declared here 123263 | Select standin; | ^~~~~~~ GOFLAGS="-mod=vendor" go build -ldflags "-X 'github.com/operator-framework/operator-registry/cmd/opm/version.gitCommit=e29651f8' -X 'github.com/operator-framework/operator-registry/cmd/opm/version.opmVersion=v1.17.0-28-ge29651f8' -X 'github.com/operator-framework/operator-registry/cmd/opm/version.buildDate=2021-05-04T15:17:43Z'" -tags=json1 -o bin/opm ./cmd/opm # github.com/mattn/go-sqlite3 sqlite3-binding.c: In function ‘sqlite3SelectNew’: sqlite3-binding.c:123303:10: warning: function may return address of local variable [-Wreturn-local-addr] 123303 | return pNew; | ^~~~ sqlite3-binding.c:123263:10: note: declared here 123263 | Select standin; | ^~~~~~~ ./bin/opm version Version: version.Version{OpmVersion:"v1.17.0-28-ge29651f8", GitCommit:"e29651f8", BuildDate:"2021-05-04T15:17:43Z", GoOs:"linux", GoArch:"amd64"} ./bin/opm alpha serve pkg/registry/testdata/validDeclCfg -p 50053 --debug -t test.log INFO[0000] serving registry configs=pkg/registry/testdata/validDeclCfg port=50053 Please let me know if I'm doing something wrong. Thanks.
What you're passing is likely an invalid json file, which opm validate ignores currently. This is something we're going to track in Jira as an improvement on the opm validate command. 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.