Skip to content

Fix GraphQL errors extraction for streaming responses#3410

Merged
kikoveiga merged 1 commit into
developfrom
kikoveiga/fix-graphql-errors-streaming
May 6, 2026
Merged

Fix GraphQL errors extraction for streaming responses#3410
kikoveiga merged 1 commit into
developfrom
kikoveiga/fix-graphql-errors-streaming

Conversation

@kikoveiga

@kikoveiga kikoveiga commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes OkHttpGraphQLAdapter#extractGraphQLErrorAttributes so it returns early if there is a streaming response. Otherwise, peekBody might deadlock as described in the issue below. This is exactly the same mechanism used inside DatadogInterceptor#getBodyLength.

Motivation

#3407

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@kikoveiga kikoveiga changed the title Kikoveiga/fix graphql errors streaming Fix GraphQL errors extraction for streaming content-types Apr 30, 2026
@kikoveiga kikoveiga force-pushed the kikoveiga/fix-graphql-errors-streaming branch 3 times, most recently from 54f2ecb to bd5a0d4 Compare April 30, 2026 16:00
@kikoveiga kikoveiga changed the title Fix GraphQL errors extraction for streaming content-types Fix GraphQL errors extraction for streaming responses Apr 30, 2026
@kikoveiga kikoveiga force-pushed the kikoveiga/fix-graphql-errors-streaming branch from bd5a0d4 to 98662bb Compare April 30, 2026 16:17
@codecov-commenter

codecov-commenter commented Apr 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.97%. Comparing base (7a4cd87) to head (f0d8837).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...id/okhttp/internal/graphql/OkHttpGraphQLAdapter.kt 57.14% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3410      +/-   ##
===========================================
- Coverage    72.04%   71.97%   -0.07%     
===========================================
  Files          960      960              
  Lines        35309    35310       +1     
  Branches      5851     5859       +8     
===========================================
- Hits         25435    25411      -24     
- Misses        8276     8290      +14     
- Partials      1598     1609      +11     
Files with missing lines Coverage Δ
...n/com/datadog/android/okhttp/DatadogInterceptor.kt 80.68% <100.00%> (-0.43%) ⬇️
...id/okhttp/internal/graphql/OkHttpGraphQLAdapter.kt 63.46% <57.14%> (-2.50%) ⬇️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kikoveiga kikoveiga changed the base branch from release/3.9.0 to develop May 4, 2026 09:35
@kikoveiga kikoveiga force-pushed the kikoveiga/fix-graphql-errors-streaming branch from 98662bb to 4079e3c Compare May 4, 2026 10:06
@kikoveiga kikoveiga self-assigned this May 4, 2026
@kikoveiga kikoveiga force-pushed the kikoveiga/fix-graphql-errors-streaming branch from 4079e3c to f0d8837 Compare May 4, 2026 16:37
@kikoveiga kikoveiga marked this pull request as ready for review May 4, 2026 16:52
@kikoveiga kikoveiga requested review from a team as code owners May 4, 2026 16:52
@kikoveiga kikoveiga merged commit 90d2c73 into develop May 6, 2026
27 checks passed
@kikoveiga kikoveiga deleted the kikoveiga/fix-graphql-errors-streaming branch May 6, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants