Skip to content

Stabilize Fusion execution-timeout test against cold-start flake - #9938

Merged
glen-84 merged 2 commits into
mainfrom
gai/deflake-fusion-execution-timeout-test
Jun 17, 2026
Merged

glen-84 merged 2 commits into
mainfrom
gai/deflake-fusion-execution-timeout-test

Conversation

@glen-84

@glen-84 glen-84 commented Jun 17, 2026

Copy link
Copy Markdown
Member

Summary

  • CancellationTests.Request_Is_Running_Into_Execution_Timeout_While_Http_Request_In_Node_Is_Still_Ongoing flaked under CI load: the snapshot dropped the sourceSchemas[].interactions: block whenever the 250ms execution timeout elapsed before the gateway dispatched to the subgraph.
  • Root cause: TimeoutMiddleware sits above parsing, planning, and execution in the pipeline, so first-request cold start (planning plus JIT, inside the timed window) can consume the 250ms before onBeforeSend records the subgraph request, leaving no interaction to snapshot.
  • Fix: warm the gateway with a { __typename } request first. It resolves on the gateway, never reaches the subgraph, and records no interaction, so the executor build and pipeline JIT happen outside the tight timeout. The measured request then reliably records the interaction. The 250ms timeout and the committed snapshot are unchanged.

Test plan

  • Ran the full CancellationTests class (both methods across net8.0, net9.0, and net10.0): all pass.
  • Ran the previously-failing test 5 times on net10.0: consistently green.

Copilot AI review requested due to automatic review settings June 17, 2026 12:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Stabilizes a flaky Fusion execution-timeout snapshot test by warming up the gateway before running the time-budgeted request, reducing first-request cold-start/JIT overhead impact on the measured timeout window.

Changes:

  • Adds a preliminary { __typename } request to warm the gateway before the 250ms execution-timeout scenario is exercised.

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

@github-code-quality

github-code-quality Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

Code Coverage Overview

Languages: C#

C# / code-coverage/dotnet

The overall coverage in the gai/deflake-fusion-e... branch remains at 49%, unchanged from the main branch.

Show a code coverage summary of the most impacted files.
File main eeb6a28 gai/deflake-fusion-e... 5d5b055 +/-
/home/runner/wo...erMiddleware.cs 100% 89% -11%
/home/runner/wo...gerMessage.g.cs 15% 11% -4%
/home/runner/wo...boxProcessor.cs 74% 72% -2%
/home/runner/wo...ationPlanner.cs 88% 88% 0%
/home/runner/wo...geDispatcher.cs 72% 75% +3%
/home/runner/wo...gerMessage.g.cs 6% 10% +4%
/home/runner/wo...entsListener.cs 62% 66% +4%
/home/runner/wo...gerMessage.g.cs 18% 23% +5%
/home/runner/wo...heMiddleware.cs 86% 92% +6%
/home/runner/wo...eiveEndpoint.cs 68% 77% +9%

Updated June 17, 2026 13:19 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@glen-84
glen-84 merged commit e210622 into main Jun 17, 2026
145 checks passed
@glen-84
glen-84 deleted the gai/deflake-fusion-execution-timeout-test branch June 17, 2026 13:21
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