Skip to content

feat: expose concurrency limits and inflight resolves#1501

Merged
alepane21 merged 15 commits into
masterfrom
ale/eng-9608-dns-lookup-timeout-impacting-wundergraph-router-latency
Jul 2, 2026
Merged

feat: expose concurrency limits and inflight resolves#1501
alepane21 merged 15 commits into
masterfrom
ale/eng-9608-dns-lookup-timeout-impacting-wundergraph-router-latency

Conversation

@alepane21

Copy link
Copy Markdown
Contributor

@coderabbitai summary

Checklist

  • I have discussed my proposed changes in an issue and have received approval to proceed.
  • I have followed the coding standards of the project.
  • Tests or benchmarks have been added or updated.

Open Source AI Manifesto

This project follows the principles of the Open Source AI Manifesto. Please ensure your contribution aligns with its principles.

@claude claude Bot 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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds two exported Resolver methods exposing semaphore capacity and in-flight resolves, and instruments GraphQLResolveInfo with timestamps and durations for the resolve/render and client-write phases; instrumentation is applied in both normal and singleflight response paths.

Changes

Resolver Concurrency & Timing

Layer / File(s) Summary
Concurrency getter methods and tests
v2/pkg/engine/resolve/resolve.go, v2/pkg/engine/resolve/resolve_test.go
Adds MaxConcurrentResolves() and InflightResolves() to report semaphore capacity and current in-flight resolves; includes TestResolver_ConcurrencyGetters verifying state transitions.
Response resolve/write timing instrumentation
v2/pkg/engine/resolve/resolve.go
Extends GraphQLResolveInfo with ResponseResolveStartTime, ResponseResolveDuration, ResponseWriteStartTime, and ResponseWriteDuration; records start times and durations around resolvable.Resolve(...) and writer.Write(...) in both ResolveGraphQLResponse and ArenaResolveGraphQLResponse (including singleflight follower path).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description only contains the repository's contribution template without any substantive details about the changes, rationale, or implementation approach. Provide a meaningful description of the changes, including the motivation, what concurrency metrics are exposed, and why they are useful for users.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: exposing concurrency limits and inflight resolver statistics through new public methods.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ale/eng-9608-dns-lookup-timeout-impacting-wundergraph-router-latency

Comment @coderabbitai help to get the list of available commands.

@alepane21 alepane21 changed the title Ale/eng 9608 dns lookup timeout impacting wundergraph router latency feat: expose concurrency limits and inflight resolves May 19, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@v2/pkg/engine/resolve/resolve.go`:
- Around line 390-394: The current path sets resp.ResponseResolveStartTime and
resp.ResponseResolveDuration after calling t.resolvable.Resolve but leaves
resp.ResponseWriteStartTime and resp.ResponseWriteDuration zero; update
ResolveGraphQLResponse so that immediately after computing responseResolveStart
and resp.ResponseResolveDuration you also set resp.ResponseWriteStartTime =
responseResolveStart and resp.ResponseWriteDuration =
resp.ResponseResolveDuration (or compute a separate duration using
time.Since(responseResolveStart) for clarity) so GraphQLResolveInfo is populated
consistently; locate this in the block around t.resolvable.Resolve,
resp.ResponseResolveStartTime, and resp.ResponseResolveDuration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b046cc6c-2fc7-4370-bfa2-0efca5033b7b

📥 Commits

Reviewing files that changed from the base of the PR and between 7fe681f and 5cd0c14.

📒 Files selected for processing (1)
  • v2/pkg/engine/resolve/resolve.go

Comment thread v2/pkg/engine/resolve/resolve.go
@alepane21 alepane21 requested a review from a team as a code owner June 3, 2026 09:35
…okup-timeout-impacting-wundergraph-router-latency
Comment thread v2/pkg/engine/resolve/resolve.go
Comment thread v2/pkg/engine/resolve/resolve.go
Comment thread v2/pkg/engine/resolve/resolve.go
…okup-timeout-impacting-wundergraph-router-latency
@alepane21 alepane21 merged commit c9af890 into master Jul 2, 2026
10 checks passed
@alepane21 alepane21 deleted the ale/eng-9608-dns-lookup-timeout-impacting-wundergraph-router-latency branch July 2, 2026 11:55
devsergiy pushed a commit that referenced this pull request Jul 2, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.7.0](v2.6.0...v2.7.0)
(2026-07-02)


### Features

* expose concurrency limits and inflight resolves
([#1501](#1501))
([c9af890](c9af890))


### Bug Fixes

* fix provides on abstract types
([#1564](#1564))
([8244558](8244558))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: wundergraph-bot[bot] <285992168+wundergraph-bot[bot]@users.noreply.github.com>
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.

3 participants