- Notifications
You must be signed in to change notification settings - Fork948
fix: resolve race condition in TestWorkspaceAgent/GoogleCloud#18970
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat withCodeRabbit:
SupportNeed help? Create a ticket on oursupport page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
…nt/GoogleCloudThe test was flaky due to a race condition where the agent CLI would startand attempt authentication before the HTTP server's handler was fullyinitialized. The test server starts immediately but the handler is setasynchronously, creating a window where requests return 404.This fix waits for the server to be ready by making a test request to/api/v2/buildinfo before starting the agent, ensuring the HTTP handleris properly set up.Fixes:coder/internal#778
The test was flaky due to a race condition where the agent CLI would start and attempt Google Cloud instance identity authentication before the agent was fully inserted into the database.
This fix adds a synchronization point that waits for the agent to be properly inserted into the database before starting the agent CLI, eliminating the race condition.
Fixes:coder/internal#778