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 runner: Couldn't initialize clients: unable to find available namespace #5700

Closed
pierDipi opened this issue Sep 2, 2021 · 12 comments · Fixed by #5706 or #5722
Closed

Test runner: Couldn't initialize clients: unable to find available namespace #5700

pierDipi opened this issue Sep 2, 2021 · 12 comments · Fixed by #5706 or #5722
Assignees
Labels
area/test-and-release Test infrastructure, tests or release kind/bug Categorizes issue or PR as related to a bug.

Comments

@pierDipi
Copy link
Member

pierDipi commented Sep 2, 2021

Describe the bug

Sometimes the integration testing pipeline in https://github.com/knative-sandbox/eventing-kafka-broker/ fails with:

test_runner.go:163: Couldn't initialize clients: unable to find available namespace

Expected behavior

No errors, just create a namespace if there isn't one.

To Reproduce

N/A

Knative release version
devel

Additional context

/area test-and-release

@pierDipi pierDipi added the kind/bug Categorizes issue or PR as related to a bug. label Sep 2, 2021
@knative-prow-robot knative-prow-robot added the area/test-and-release Test infrastructure, tests or release label Sep 2, 2021
@pierDipi
Copy link
Member Author

pierDipi commented Sep 3, 2021

Hi @mgencur,
I see this error was introduced in https://github.com/knative/eventing/pull/5337/files,
do you have a suggested fix for this error? Could increasing MaxNamespaceSkip fix this error?

@mgencur
Copy link
Contributor

mgencur commented Sep 3, 2021

hi @pierDipi , yes, increasing MaxNamespaceSkip should help. Basically increasing any of these three: https://github.com/knative/eventing/blob/main/test/lib/test_runner.go#L51-L53 . But I'd start with increasing MaxNamespaceSkip to 50.

@pierDipi
Copy link
Member Author

pierDipi commented Sep 3, 2021

Thanks Martin!

Would you make it configurable with an env var or is it hardcoded by design?

/assign

@mgencur
Copy link
Contributor

mgencur commented Sep 6, 2021

These are not parameters that would be changing with each test run or test environment. I believe we can figure out numbers that will be working well for a longer time. No need to introduce new params or env vars, IMO.

@pierDipi
Copy link
Member Author

pierDipi commented Sep 8, 2021

@pierDipi pierDipi reopened this Sep 8, 2021
@mgencur
Copy link
Contributor

mgencur commented Sep 8, 2021

@pierDipi can you tell me how you're running the tests? I can see Running go test with args: -tags=e2e -count=1 -race -timeout=30m ./test/e2e_new/... which doesn't seem to exist upstream.

Are you using the REKT framework? If yes, you might need these two?
knative-extensions/reconciler-test#233
knative-extensions/reconciler-test#234

More info would be appreciated.

@pierDipi
Copy link
Member Author

pierDipi commented Sep 8, 2021

Sure, this happens in knative-sandbox/eventing-kafka-broker for tests that are using the eventing testlib (no rekt).

This is how we run them https://github.com/knative-sandbox/eventing-kafka-broker/blob/f76d520f1759179c756f7a65b07d119444aacd79/test/e2e-tests.sh#L45

Test directory is https://github.com/knative-sandbox/eventing-kafka-broker/tree/main/test/e2e

@pierDipi
Copy link
Member Author

pierDipi commented Sep 8, 2021

The tests in ./test/e2e_new/ are tests based on REKT which run fine, failed tests are the ones based on eventing testlib which are in test/e2e.

@mgencur
Copy link
Contributor

mgencur commented Sep 8, 2021

OK. I'm trying something in knative-extensions/eventing-kafka#859 . Looking at the dump - there are no eventing-e2eX namespaces left after the run. The cleanup seems to work well. So, I believe it's just a matter of running many tests in parallel and the MaxNamespaceSkip number is still too low.

@mgencur
Copy link
Contributor

mgencur commented Sep 8, 2021

But, maybe I'm wrong and it will need another fix. Let's see.

@pierDipi
Copy link
Member Author

pierDipi commented Sep 8, 2021

Right, we run many tests in parallel but the repo where this manifests is https://github.com/knative-sandbox/eventing-kafka-broker (note the trailing -broker, I know it's confusing :))

@mgencur
Copy link
Contributor

mgencur commented Sep 8, 2021

Oh. Sorry, Wrong repo. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test-and-release Test infrastructure, tests or release kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
3 participants