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

Test harness tool does not wait for CRDs to be processed #1282

Closed
porridge opened this issue Jan 16, 2020 · 1 comment · Fixed by #1284
Closed

Test harness tool does not wait for CRDs to be processed #1282

porridge opened this issue Jan 16, 2020 · 1 comment · Fixed by #1284

Comments

@porridge
Copy link
Member

What happened:

https://circleci.com/gh/kudobuilder/kudo/9541 flaked with:

=== RUN   kudo
2020/01/14 14:24:53 CustomResourceDefinition:/instances.kudo.dev created
2020/01/14 14:24:53 CustomResourceDefinition:/operators.kudo.dev created
2020/01/14 14:24:53 CustomResourceDefinition:/operatorversions.kudo.dev created
--- FAIL: kudo (6.48s)
    harness.go:215: Running tests with a mocked control plane (kube-apiserver and etcd).
    harness.go:196: started test environment (kube-apiserver and etcd) in 6.345799792s
    harness.go:412: error creating resource Operator:default/configmap-operator: no matches for kind "Operator" in version "kudo.dev/v1beta1"
    harness.go:461: tearing down mock control plane
FAIL

A retry succeeded.

What you expected to happen:

No failure! The tool should wait for all CRDs to reach usable status before trying to create objects of the newly defined types.

How to reproduce it (as minimally and precisely as possible):

go run ./cmd/kubectl-kudo test many times

@porridge
Copy link
Member Author

porridge commented Jan 16, 2020

Turns out that the tool does wait for CRDs but it does it using a discovery client.

However that's effectively a no-op, since (at least in that particular case) all passed CRD objects fail this type assertion causing this loop to be empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant