Skip to content

Fix flaky metrics exporter test by waiting for cluster Ready#173

Merged
jdheyburn merged 1 commit into
valkey-io:mainfrom
Nordix:fix-flaky-e2e-metrics-exporter
May 11, 2026
Merged

Fix flaky metrics exporter test by waiting for cluster Ready#173
jdheyburn merged 1 commit into
valkey-io:mainfrom
Nordix:fix-flaky-e2e-metrics-exporter

Conversation

@bjosv
Copy link
Copy Markdown
Collaborator

@bjosv bjosv commented May 11, 2026

Summary

The metrics exporter test fetched the pod IP before the cluster reached Ready state.
During initial formation the pod IP may change before the cluster reaches Ready state. The curl then hits the stale address and times out.

Wait for the ValkeyCluster to reach Ready state before fetching the pod IP, ensuring the pod is stable and no further restarts will occur. Also fetch the IP by label selector instead of requiring the pod name as an intermediate step.

Checklist

Before submitting the PR make sure the following are checked:

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

The metrics exporter test fetched the pod IP before the cluster reached
Ready state. During initial formation the operator may update the
StatefulSet spec (e.g. ACL hash annotation), causing a pod restart with
a new IP. The curl then hits the stale address and times out.

Wait for the ValkeyCluster to reach Ready state before fetching the pod
IP, ensuring the pod is stable and no further restarts will occur. Also
fetch the IP by label selector instead of requiring the pod name as an
intermediate step.

Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
@hieu2102 hieu2102 mentioned this pull request May 11, 2026
5 tasks
@jdheyburn jdheyburn merged commit d2b80dc 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