fix: propagate actualListSizes via resolver context#1404
Merged
Conversation
It is needed to make router work with setting the header for actual cost via special hook that is called before writing to the client happens.
… yury/eng-8986-expose-costs-in-response-headers
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughActual list size tracking moved from response-level GraphQLResolveInfo to the per-request resolve Context. Resolution now populates Context.ActualListSizes, and the execution engine reads actual-cost data from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@v2/pkg/engine/resolve/context.go`:
- Around line 48-51: Context.Free currently doesn't clear the per-request map
ActualListSizes, so add ActualListSizes to the cleanup logic inside the
Context.Free method: ensure Context.Free resets or nils out c.ActualListSizes
(in the same place other per-request fields are cleared) to avoid retaining
stale data or memory when contexts are reused; locate the Context.Free function
and update it to clear c.ActualListSizes alongside the other cleanup steps.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
execution/engine/execution_engine.gov2/pkg/engine/resolve/context.gov2/pkg/engine/resolve/resolve.go
devsergiy
approved these changes
Feb 23, 2026
This was referenced Feb 23, 2026
ysmolski
pushed a commit
that referenced
this pull request
Feb 23, 2026
🤖 I have created a release *beep* *boop* --- ## [2.0.0-rc.256](v2.0.0-rc.255...v2.0.0-rc.256) (2026-02-23) ### Bug Fixes * propagate actualListSizes via resolver context ([#1404](#1404)) ([5433fcb](5433fcb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
ysmolski
pushed a commit
that referenced
this pull request
Mar 20, 2026
🤖 I have created a release *beep* *boop* --- ## [1.10.0](execution/v1.9.0...execution/v1.10.0) (2026-03-19) ### Features * add initial support for [@requires](https://github.com/requires) in gRPC ([#1362](#1362)) ([07ae75e](07ae75e)) * support sizedFields in cost computations ([#1410](#1410)) ([48f7582](48f7582)) ### Bug Fixes * propagate actualListSizes via resolver context ([#1404](#1404)) ([5433fcb](5433fcb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is needed to make router work with setting the header for actual cost via special hook that is called before writing to the client happens.
Summary by CodeRabbit