Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix trace placement for errors occurring in lists #7699

Merged
merged 6 commits into from
Aug 24, 2023

Conversation

trevor-scheer
Copy link
Member

Fixes #4476

Currently, when errors occur while resolving a list item, the trace builder fails to place the error at the correct path and just defaults to the root node with a warning message:

Could not find node with path x.y.1, defaulting to put errors on root node.

This change places these errors at their correct paths and removes the log.

@trevor-scheer trevor-scheer requested review from glasser and a team August 22, 2023 23:42
@netlify
Copy link

netlify bot commented Aug 22, 2023

Deploy Preview for apollo-server-docs ready!

Name Link
🔨 Latest commit d661279
🔍 Latest deploy log https://app.netlify.com/sites/apollo-server-docs/deploys/64e646f7694fd30008e15747
😎 Deploy Preview https://deploy-preview-7699--apollo-server-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 22, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit d661279:

Sandbox Source
Apollo Server Typescript Configuration
Apollo Server Configuration

Copy link
Member

@glasser glasser left a comment

Choose a reason for hiding this comment

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

I think you probably also want to reach out to Pulsar internally to ensure that our usage report ingestion code will properly notice and handle errors on list nodes in traces. (Feel free to ping me on that request to stay in the loop.)

packages/server/src/plugin/traceTreeBuilder.ts Outdated Show resolved Hide resolved
packages/server/src/plugin/traceTreeBuilder.ts Outdated Show resolved Hide resolved
jest.config.base.js Show resolved Hide resolved
Copy link
Member

@glasser glasser left a comment

Choose a reason for hiding this comment

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

lgtm modulo the concern about GraphOS ingestion

@trevor-scheer trevor-scheer merged commit 62e7d94 into main Aug 24, 2023
6 checks passed
@trevor-scheer trevor-scheer deleted the trevor/fix-tree-builder-list-paths branch August 24, 2023 17:56
@github-actions github-actions bot mentioned this pull request Aug 24, 2023
trevor-scheer pushed a commit that referenced this pull request Aug 24, 2023
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @apollo/server-integration-testsuite@4.9.2

### Patch Changes

- Updated dependencies
\[[`62e7d940d`](62e7d94)]:
    -   @apollo/server@4.9.2

## @apollo/server@4.9.2

### Patch Changes

- [#7699](#7699)
[`62e7d940d`](62e7d94)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Fix error
path attachment for list items

Previously, when errors occurred while resolving a list item, the trace
builder would fail to place the error at the correct path and just
default to the root node with a warning message:

> `Could not find node with path x.y.1, defaulting to put errors on root
node.`

This change places these errors at their correct paths and removes the
log.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

apollo-engine-reporting doesn't put errors associated with list elements on the right node
2 participants