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

Allow for tests to run in pre-created NS #192

Open
mgencur opened this issue Apr 29, 2021 · 9 comments
Open

Allow for tests to run in pre-created NS #192

mgencur opened this issue Apr 29, 2021 · 9 comments
Labels
triage/accepted Issues which should be fixed (post-triage)

Comments

@mgencur
Copy link
Contributor

mgencur commented Apr 29, 2021

Problem:

In some environments it won't be possible for the testing infrastructure to easily create new namespaces at will, so it would be nice if there was a way to run the e2e tests all within a single, pre-created, namespace.

A similar issue was created for knative/eventing a long time ago: knative/eventing#2776. This comment includes possible solutions. I'm listing them below for completeness:

  • Having namespace names generated based on the test name (without random suffix) - this was problematic because tests often have sub-tests and these subtests would share the same namespace unless the individual objects have random suffixes.
  • Having just one common namespace and generate every object name for the tests with random suffixes so that all objects are unique even if they exist in the same namespace. This is a lot of work, and requires big changes in the test suite. Another problem is that some individual tests might require label knative-eventing-injection": "enabled" and some require "disabled" which makes it hard to run those in parallel in the same namespace.
  • Have a numeric suffix in namespaces names.
    This solution is used in knative/client:
    https://github.com/knative/client/blob/main/lib/test/integration.go#L47
    It is pretty simple, each test has a unique namespace but the name of the namespace is predictable. Each test gets a namespace with a numeric suffix that is increasing. The suffix is a simple number so it's possible to pre-create them, apply some additional logic or/and create additional objects in them. In a specific environment, this can be done by a user with increased privileges (admin). The limitation is that individual tests should not require specific settings that would have to be done by admin user because it is not known in advance which NS the test will run in.

Persona:
Contributors/Devs

Exit Criteria
Ability to run e2e tests against a pre-created cluster and namespaces.

@mgencur
Copy link
Contributor Author

mgencur commented Apr 29, 2021

I can work on that if we agree on a solution.

@lionelvillard
Copy link
Contributor

+1. We currently cannot run any Knative tests in our environment for the exact same reason.

@matzew
Copy link
Contributor

matzew commented Apr 29, 2021

+1
and thanks for bringing this up @mgencur

@github-actions
Copy link

github-actions bot commented Aug 3, 2021

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 3, 2021
@github-actions github-actions bot closed this as completed Sep 3, 2021
@mgencur
Copy link
Contributor Author

mgencur commented Sep 3, 2021

/reopen

@knative-prow-robot
Copy link

@mgencur: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 4, 2021
@github-actions
Copy link

github-actions bot commented Dec 3, 2021

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 3, 2021
@github-actions github-actions bot closed this as completed Jan 2, 2022
@pierDipi
Copy link
Member

pierDipi commented Jan 3, 2022

/reopen
/triage accepted
/remove-lifecycle stale

@knative-prow-robot knative-prow-robot added the triage/accepted Issues which should be fixed (post-triage) label Jan 3, 2022
@knative-prow-robot
Copy link

@pierDipi: Reopened this issue.

In response to this:

/reopen
/triage accepted
/remove-lifecycle stale

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/accepted Issues which should be fixed (post-triage)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants