Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic scorecard test not working #5232

Open
siyer-123 opened this issue Sep 21, 2021 · 4 comments
Open

Basic scorecard test not working #5232

siyer-123 opened this issue Sep 21, 2021 · 4 comments
Assignees
Labels
language/go Issue is related to a Go operator project lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/support Indicates an issue that is a support question.
Milestone

Comments

@siyer-123
Copy link

Bug Report

What did you do?

I am trying to implement the basic-spec-check test for operator-sdk scorecard on v0.18.2. Please note that for my use case, operator-sdk version v0.18.2 is a requirement; I am unable to use a newer version at this time.

I am testing my scorecard implementation on the following cluster specs:

[root@my-oc-cluster]# operator-sdk version
operator-sdk version: "v0.18.2", commit: "f059b5e17447b0bbcef50846859519340c17ffad", kubernetes version: "v1.18.2", go version: "go1.13.10 linux/amd64"

In order to run scorecard, I created .osdk-scorecard.yaml in the root with the following info:

scorecard:
  output: text
  bundle: deploy/olm-catalog/<my>-orchestrator
  plugins:
    - basic:
        cr-manifest:
          -  "deploy/crds/<my-orchestrator>.com_v1alpha1_installation_cr.yaml"          

Then, in order to run the scorecard test, I installed operator-sdk v0.18.2 and ran the scorecard test. Note this is a fresh cluster, so no CRDs exists on the cluster at the moment.

operator-sdk scorecard -o text --selector=test=basic-check-spec-test

After running the above, however, the following error is returned:

[root@my-oc-cluster]# operator-sdk scorecard -o text --selector=test=basic-check-spec-test
INFO[0000] Using config file: /root/<my-bundle>/.osdk-scorecard.yaml 
ERRO[0061] Plugin `Basic Tests` failed with error (failed to create namespaced resources: failed to get proxyPod: timed out waiting for the condition) 
	Basic Tests                         
	CR: 
	Labels: 
	Errors: 
		plugin error
	Log:
		failed to create namespaced resources: failed to get proxyPod: timed out waiting for the condition:
		Logs: 



I figured maybe this might be happening because I was using the old osdk-scorecard.yaml method to run scorecard, instead of the newer config.yaml method. To attempt all possibilities, I tried the newer config.yaml method as well, but ran into a separate (different) panic error.

I ran the below command:

operator-sdk scorecard --config=tests/scorecard/config.yaml -o text --selector=test=basic-check-spec-test 

and got the following panic error:

[root@my-oc-cluster]# operator-sdk scorecard --config=tests/scorecard/config.yaml -o text --selector=test=basic-check-spec-test 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xe0 pc=0xb5bb87]

goroutine 1 [running]:
github.com/spf13/viper.(*Viper).realKey(0x0, 0x223c555, 0x6, 0x6, 0x7fea060fed98)
	pkg/mod/github.com/spf13/[email protected]/viper.go:1166 +0x37
github.com/spf13/viper.(*Viper).Set(0x0, 0x223c555, 0x6, 0x1e87fa0, 0xc0003a1ad0)
	pkg/mod/github.com/spf13/[email protected]/viper.go:1208 +0x72
github.com/operator-framework/operator-sdk/cmd/operator-sdk/scorecard.initConfig(0x1f0, 0xc0006fba18, 0x40c1c4)
	src/github.com/operator-framework/operator-sdk/cmd/operator-sdk/scorecard/cmd.go:138 +0x2d1
github.com/operator-framework/operator-sdk/cmd/operator-sdk/scorecard.buildScorecardConfig(0xc0006d52c0)
	src/github.com/operator-framework/operator-sdk/cmd/operator-sdk/scorecard/cmd.go:174 +0x37
github.com/operator-framework/operator-sdk/cmd/operator-sdk/scorecard.NewCmd.func1(0xc0006d1080, 0xc0003b3600, 0x0, 0x4, 0x0, 0x0)
	src/github.com/operator-framework/operator-sdk/cmd/operator-sdk/scorecard/cmd.go:62 +0x56
github.com/spf13/cobra.(*Command).execute(0xc0006d1080, 0xc0003b35c0, 0x4, 0x4, 0xc0006d1080, 0xc0003b35c0)
	pkg/mod/github.com/spf13/[email protected]/command.go:842 +0x460
github.com/spf13/cobra.(*Command).ExecuteC(0xc0006bedc0, 0x2603f60, 0xc0006d2c00, 0x0)
	pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
	pkg/mod/github.com/spf13/[email protected]/command.go:887
github.com/operator-framework/operator-sdk/cmd/operator-sdk/cli.RunLegacy(0xc0000ae000, 0x0)
	src/github.com/operator-framework/operator-sdk/cmd/operator-sdk/cli/legacy.go:49 +0x11b
main.main()
	src/github.com/operator-framework/operator-sdk/cmd/operator-sdk/main.go:43 +0x92

As you can see, neither method worked properly.

What did you expect to see?

I expect to see the scorecard basic-spec-check test run successfully.

What did you see instead? Under which circumstances?

Unfortunately, as described above, neither of the two possible methods to invoke the scorecard test worked properly.

Environment

Operator type:

/language go

Kubernetes cluster type:

Openshift

$ operator-sdk version

operator-sdk version: "v0.18.2", commit: "f059b5e17447b0bbcef50846859519340c17ffad", kubernetes version: "v1.18.2", go version: "go1.13.10 linux/amd64"

$ go version (if language is Go)

go version go1.15.14 linux/amd64

$ kubectl version

Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.1-5-g76a04fc", GitCommit:"c66c03f3012a10f16eb86fdce6330433adf6c9ee", GitTreeState:"clean", BuildDate:"2021-02-13T03:54:59Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.0+bd9e442", GitCommit:"bd9e4421804c212e6ac7ee074050096f08dda543", GitTreeState:"clean", BuildDate:"2021-02-11T23:05:38Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}

Possible Solution

N/A

Additional context

N/A

@openshift-ci openshift-ci bot added the language/go Issue is related to a Go operator project label Sep 21, 2021
@varshaprasad96 varshaprasad96 added this to the Backlog milestone Sep 27, 2021
@varshaprasad96 varshaprasad96 added the triage/support Indicates an issue that is a support question. label Sep 27, 2021
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 26, 2022
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 28, 2022
@camilamacedo86
Copy link
Contributor

/lifecycle frozen

@openshift-ci openshift-ci bot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Mar 28, 2022
@porridge
Copy link
Member

porridge commented Mar 30, 2023

I think the "timed out waiting for the condition" part might be a duplicate of #5452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/go Issue is related to a Go operator project lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/support Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

6 participants