Skip to content

fix: deflake //rs/execution_environment:execution_environment_test#9797

Open
basvandijk wants to merge 2 commits intomasterfrom
ai/deflake-execution_environment_test-2026-04-09
Open

fix: deflake //rs/execution_environment:execution_environment_test#9797
basvandijk wants to merge 2 commits intomasterfrom
ai/deflake-execution_environment_test-2026-04-09

Conversation

@basvandijk
Copy link
Copy Markdown
Collaborator

@basvandijk basvandijk commented Apr 9, 2026

Root Cause

Three different composite query tests were intermittently failing with:

Composite query call exceeded the time limit.

The failing tests:

  • composite_query_cache_reports_system_api_calls_metric
  • composite_query_cache_reports_transient_errors_metric
  • composite_query_no_user_response

The production default for max_query_call_walltime is 10s. On slow/loaded CI machines, composite queries in tests exceeded this wall-clock limit, causing spurious failures. The time limit check uses Instant::now().elapsed() which measures real wall-clock time, making it sensitive to CPU contention.

Fix

Increase max_query_call_walltime from 10s to 60s in the ExecutionTestBuilder default config. No tests explicitly test the time limit behavior, so this is safe.


This PR was created following the steps in .claude/skills/fix-flaky-tests/SKILL.md.

Increase the composite query wall-time limit from 10s (production default)
to 300s in the test builder to prevent flaky timeouts on slow CI machines.

Three different composite query tests were intermittently failing with
"Composite query call exceeded the time limit." because the 10-second
wall-clock limit was being exceeded under CI load:
- composite_query_cache_reports_system_api_calls_metric
- composite_query_cache_reports_transient_errors_metric
- composite_query_no_user_response

No tests explicitly test the time limit behavior, so increasing it in
the test environment is safe.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses flaky composite query tests by relaxing the wall-clock time limit used during query call-graph execution in the ExecutionTestBuilder default configuration, making CI results less sensitive to host load/CPU contention.

Changes:

  • Increased ExecutionTestBuilder’s default max_query_call_walltime from the production default (10s) to 300s for tests.
  • Added an inline comment explaining the rationale (CI flakiness avoidance).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@basvandijk basvandijk marked this pull request as ready for review April 9, 2026 16:15
@basvandijk basvandijk requested a review from a team as a code owner April 9, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants