Skip to content

Remove redundant workflow deadlines from google_genai and openai_agents tests - #1835

Merged
tconley1428 merged 3 commits into
mainfrom
flake/genai-test-deadlines
Sep 10, 2026
Merged

Remove redundant workflow deadlines from google_genai and openai_agents tests#1835
tconley1428 merged 3 commits into
mainfrom
flake/genai-test-deadlines

Conversation

@DABH

@DABH DABH commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What was changed

Dropped the 5-30s execution_timeout values from the google_genai and openai_agents integration tests, following #1816. RegisterFilesWorkflow uses maximum_attempts=1 for the permanent missing-credentials error it relied on the deadline to cut short. assert_status_retry_behavior asserts the failure cause chain.

Why

Failing CI logs show activities completing within a second, then a 10-40s runner stall, after which a healthy workflow was killed by a deadline that only duplicated pytest-timeout's 60s bound.

Testing

Stall injection (SIGSTOP the test process 12s x3): 2/80 failed before, 80/80 after. An emulated 11s first-task stall reproduces both openai_agents failures before and passes after. Lint clean.

The google_genai integration tests nested 10-30s workflow execution
timeouts inside pytest-timeout's 60s bound. On a stalled macOS CI runner
the deadline expired before the worker processed the next workflow task,
so healthy workflows failed with "Workflow timed out"
(test_mcp_side_effects, test_mcp_full_schema_propagation,
test_file_upload_str_path, test_interaction_lifecycle, test_agents_crud).
Drop the deadlines, as #1816 did for test_replay_tool_loop;
pytest-timeout still bounds real hangs.

test_register_files_without_credentials_fails relied on the 10s deadline
to cut off activity retries (the server caps schedule-to-close at the run
timeout), so its workflow now disables retries for the permanent
missing-credentials error instead of depending on deadline arithmetic.
Several openai_agents tests started workflows with a 5-10s execution timeout nested inside pytest-timeout's 60s bound. On a loaded macOS CI runner the first workflow task was occasionally delayed past the default 10s workflow task timeout; the retried task then ran after the workflow's own execution timeout had already fired, so test_run_config_models failed with 'TimeoutError: Workflow timed out' and test_exception_handling found no activity in history ('assert found'). Drop those deadlines, as #1816 did for test_replay_tool_loop; pytest-timeout still bounds real hangs. Also assert the failure cause in assert_status_retry_behavior so an unexpected failure mode is reported directly.
@DABH DABH changed the title Remove redundant workflow deadlines from google_genai tests Remove redundant workflow deadlines from google_genai and openai_agents tests Sep 10, 2026
@DABH DABH added the skip-changelog PR changes do not require changelog updates label Sep 10, 2026
@DABH
DABH requested a balanced review from Copilot September 10, 2026 06:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new 30-second activity timeout can reproduce the runner-stall failure mode the PR intends to eliminate.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Removes short workflow deadlines that caused flaky AI integration tests during runner stalls.

Changes:

  • Removes redundant workflow execution timeouts.
  • Verifies OpenAI retry failures’ cause chain.
  • Disables retries for the missing-credentials Gemini activity.
File summaries
File Description
tests/contrib/openai_agents/test_openai.py Removes deadlines and strengthens error assertions.
tests/contrib/google_genai/test_gemini.py Removes deadlines and configures missing-credential failure handling.
tests/contrib/google_genai/test_gemini_streaming.py Removes streaming workflow deadlines.
tests/contrib/google_genai/test_gemini_mcp.py Removes MCP workflow deadlines.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/contrib/google_genai/test_gemini.py Outdated
@DABH DABH added the ai-sdk Related to AI integrations label Sep 10, 2026
@DABH
DABH marked this pull request as ready for review September 10, 2026 07:38
@DABH
DABH requested review from a team as code owners September 10, 2026 07:38
@tconley1428
tconley1428 merged commit afc685f into main Sep 10, 2026
45 of 49 checks passed
@tconley1428
tconley1428 deleted the flake/genai-test-deadlines branch September 10, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-sdk Related to AI integrations skip-changelog PR changes do not require changelog updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants