Skip to content

Fix e2e tests - pod already exists intermittent issue#172

Merged
sandeepkunusoth merged 3 commits into
valkey-io:mainfrom
sandeepkunusoth:fix_e2e_pod_already_exists_intermittent_issue
May 11, 2026
Merged

Fix e2e tests - pod already exists intermittent issue#172
sandeepkunusoth merged 3 commits into
valkey-io:mainfrom
sandeepkunusoth:fix_e2e_pod_already_exists_intermittent_issue

Conversation

@sandeepkunusoth
Copy link
Copy Markdown
Member

@sandeepkunusoth sandeepkunusoth commented May 11, 2026

This PR fixes intermittent E2E test failures caused by kubectl run attempting to create a pod with same name (client) that may already exist from previous test runs.
failed job link: https://github.com/valkey-io/valkey-operator/actions/runs/25645368225/job/75273172729
Error:
[FAILED] Timed out after 120.001s. The function passed to Eventually failed at /home/runner/work/valkey-operator/valkey-operator/test/e2e/metrics_exporter_test.go:386 with: Unexpected error: <*fmt.wrapError | 0x29b7c393800>: "kubectl run client --image=valkey/valkey:9.0.0 --restart=Never -- valkey-cli -c -h valkeycluster-no-exporter.default.svc.cluster.local ACL LIST" failed with error "Error from server (AlreadyExists): pods \"client\" already exists\n": exit status 1 { msg: "\"kubectl run client --image=valkey/valkey:9.0.0 --restart=Never -- valkey-cli -c -h valkeycluster-no-exporter.default.svc.cluster.local ACL LIST\" failed with error \"Error from server (AlreadyExists): pods \\\"client\\\" already exists\\n\": exit status 1",

Changes

  • Updated E2E tests to use unique client pod names or ensure cleanup before pod creation.
  • Prevents failures like:
    Error from server (AlreadyExists): pods "client" already exists

Testing

  • Verified tests no longer fail intermittently due to existing client pods.

Checklist

  • This Pull Request is related to one issue.
  • Commit message explains what changed and why
  • Tests are added or updated.
  • I have run pre-commit locally (pre-commit run --all-files or hooks on commit)

Signed-off-by: Sandeep Kunusoth <sandeepkunsoth000@gmail.com>
Signed-off-by: Sandeep Kunusoth <sandeepkunsoth000@gmail.com>
@sandeepkunusoth sandeepkunusoth changed the title Fix e2e pod already exists intermittent issue Fix e2e tests - pod already exists intermittent issue May 11, 2026
@sandeepkunusoth sandeepkunusoth marked this pull request as draft May 11, 2026 04:43
Signed-off-by: Sandeep Kunusoth <sandeepkunsoth000@gmail.com>
@sandeepkunusoth sandeepkunusoth marked this pull request as ready for review May 11, 2026 06:03
@sandeepkunusoth sandeepkunusoth merged commit 2f84600 into valkey-io:main May 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants