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 coprocessor empty body panic #6398

Merged
merged 2 commits into from
Dec 6, 2024
Merged

Conversation

BrynCooke
Copy link
Contributor

If a coprocessor responds with an empty body at the supergraph stage then the router would panic as there was a false expectation that the query had already been validated.

There is a deeper issue around coprocessors and their ability to modify the query before processing. As query analysis and plugins may use the query to populate context modifying the query won't necessarily do what the user wants. In fact the router will simply ignore the modified query as the parsed version is already in context. But that will be tackled in future pipeline rework.


Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Tests added and passing3
    • Unit Tests
    • Integration Tests
    • Manual Tests

Exceptions

  • No unit tests as it is the interaction across the entire pipeline that highlights the issue. Instead extensive integration tests have been added.
  • No docs change as this is a bug fix.

Notes

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

@BrynCooke BrynCooke requested review from a team as code owners December 4, 2024 14:43
@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Dec 4, 2024

✅ Docs Preview Ready

No new or changed pages found.

This comment has been minimized.

If a coprocessor responds with an empty body at the supergraph stage then the router would panic as there was a false expectation that the query had already been validated.

There is a deeper issue around coprocessors and their ability to modify the query before processing. As query analysis and pluginss may use the query to populate context modifying the query won't necessarily do what the user wants. In fact the router will simply ignore the modified query as the parsed version is already in context.
@BrynCooke BrynCooke force-pushed the bryn/coprocessor-empty-body-panic branch from 373f437 to 297678d Compare December 4, 2024 14:55
@BrynCooke BrynCooke requested a review from a team as a code owner December 4, 2024 14:55
@BrynCooke BrynCooke merged commit 88e7bb1 into dev Dec 6, 2024
13 checks passed
@BrynCooke BrynCooke deleted the bryn/coprocessor-empty-body-panic branch December 6, 2024 10:01
@BrynCooke BrynCooke mentioned this pull request Dec 16, 2024
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