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

[Bug][kubectl-plugin] E2e test DeferCleanup in BeforeEach may cause namespace race condition #2758

Open
1 of 2 tasks
chiayi opened this issue Jan 15, 2025 · 2 comments
Open
1 of 2 tasks
Assignees
Labels
bug Something isn't working cli kubectl plugin

Comments

@chiayi
Copy link
Contributor

chiayi commented Jan 15, 2025

Search before asking

  • I searched the issues and found no similar issues.

KubeRay Component

Others

What happened + What you expected to happen

#2745 May be causing e2e tests to fail due to race condition. Within each Describe block, the namespace variable is shared. And since this variable is shared, the DeferCleanup may cause namespace to be "cleaned up" once one It block is complete.

The expected behavior would be that each It block has its own namespace variable.

Reproduction script

Running the e2e test multiple times.

Anything else

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@chiayi chiayi added bug Something isn't working triage labels Jan 15, 2025
@chiayi
Copy link
Contributor Author

chiayi commented Jan 15, 2025

It could also be possible that since the tests that are most commonly failing are ray job submit and ray session, there could be a port overlap issue.

@MortalHappiness MortalHappiness self-assigned this Jan 15, 2025
@MortalHappiness MortalHappiness added cli kubectl plugin and removed triage labels Jan 15, 2025
@chiayi
Copy link
Contributor Author

chiayi commented Jan 16, 2025

I think the simple fix for this is to make the tests Ordered so that they run one after another, since by default, I believe Ginkgo runs the tests in random order and if no decorator is set, it runs tests in parallel. The downside of this would be that the tests will most likely take longer to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli kubectl plugin
Projects
None yet
Development

No branches or pull requests

2 participants