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

Check if the namespace is created by the same test suite #2097

Merged

Conversation

johscheuer
Copy link
Member

Description

Prevent cases where two concurrent test suites will choose the same random namespace and cluster name. This change will make sure that only one test suite will take the namespace and the other test suite will generate a new random name. This will prevent cases where those two concurrent test suites use the same namespace, which will cause a failure of both test cases.

Type of change

Please select one of the options below.

  • Bug fix (non-breaking change which fixes an issue)

Discussion

Testing

Ran a manual test (the test suite was picking the same namespace as I defined it with the according environment variable):

Operator Stress when creating and deleting a cluster multiple times should create a healthy and available cluster [e2e]
/Users/jscheuermann/go/src/github.com/FoundationDB/fdb-kubernetes-operator/e2e/test_operator_stress/operator_stress_test.go:53
  2024/07/04 12:38:08 created namespace jscheuermann
  2024/07/04 12:38:09 namespace jscheuermann already in use by test suite: operator-test, current test suite: operator-stress
  2024/07/04 12:38:10 created namespace jscheuermann

Documentation

Follow-up

@johscheuer johscheuer added the bug Something isn't working label Jul 4, 2024
@foundationdb-ci
Copy link

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

  • Commit ID: 7bc423e
  • Duration 2:59:37
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

  • Commit ID: aecee8f
  • Duration 2:54:00
  • Result: ❌ FAILED
  • Error: Error while executing command: if $fail_test; then exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@johscheuer johscheuer closed this Jul 4, 2024
@johscheuer johscheuer reopened this Jul 4, 2024
@foundationdb-ci
Copy link

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

  • Commit ID: aecee8f
  • Duration 2:39:55
  • Result: ❌ FAILED
  • Error: Error while executing command: if $fail_test; then exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@johscheuer johscheuer closed this Jul 5, 2024
@johscheuer johscheuer reopened this Jul 5, 2024
Copy link
Contributor

@nicmorales9 nicmorales9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@johscheuer
Copy link
Member Author

The test failures above were unrelated to this change.

@johscheuer johscheuer merged commit 9b6db3d into FoundationDB:main Jul 5, 2024
21 of 22 checks passed
@johscheuer johscheuer deleted the prevent-reuse-same-namespace branch July 5, 2024 09:41
@foundationdb-ci
Copy link

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

  • Commit ID: aecee8f
  • Duration 2:34:28
  • Result: ❌ FAILED
  • Error: Error while executing command: if $fail_test; then exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

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

Successfully merging this pull request may close these issues.

None yet

3 participants