Skip to content

Fix flaky MCPRemoteProxy integration test#3993

Merged
JAORMX merged 1 commit into
mainfrom
fix-flaky-mcpremoteproxy-test
Mar 4, 2026
Merged

Fix flaky MCPRemoteProxy integration test#3993
JAORMX merged 1 commit into
mainfrom
fix-flaky-mcpremoteproxy-test

Conversation

@JAORMX
Copy link
Copy Markdown
Collaborator

@JAORMX JAORMX commented Mar 4, 2026

Summary

  • Replace 3 point-in-time GetRemoteProxyPhase() assertions with statusHelper.WaitForPhase() which uses Eventually with polling
  • Fixes intermittent failure where Phase is "" instead of "Pending" due to a timing gap between two separate status updates in the controller's reconciliation

Root cause

The controller performs two sequential status updates: ToolConfigHash first, then Phase. The test waited for ToolConfigHash (using Eventually), then did a single-shot read of Phase — which could see the object after update #1 but before update #2 completed.

Test plan

  • task lint passes
  • task operator-test-integration passes (all 7 suites)

🤖 Generated with Claude Code

Replace point-in-time GetRemoteProxyPhase() assertions with
statusHelper.WaitForPhase() which uses Eventually with polling.

The controller performs two separate status updates during reconciliation
(ToolConfigHash first, then Phase). The test could read the object after
the first update but before the second, seeing an empty Phase. Using
WaitForPhase retries until the Phase is set or the timeout elapses.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the size/XS Extra small PR: < 100 lines changed label Mar 4, 2026
@JAORMX JAORMX merged commit 7ce49e8 into main Mar 4, 2026
35 checks passed
@JAORMX JAORMX deleted the fix-flaky-mcpremoteproxy-test branch March 4, 2026 10:04
reyortiz3 pushed a commit that referenced this pull request Mar 4, 2026
Replace point-in-time GetRemoteProxyPhase() assertions with
statusHelper.WaitForPhase() which uses Eventually with polling.

The controller performs two separate status updates during reconciliation
(ToolConfigHash first, then Phase). The test could read the object after
the first update but before the second, seeing an empty Phase. Using
WaitForPhase retries until the Phase is set or the timeout elapses.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants