apollographql / router

A configurable, high-performance routing runtime for Apollo Federation 🚀
https://www.apollographql.com/docs/router/
Other
815 stars 271 forks source link

Fix header multiple propagation of single header #6281

Closed BrynCooke closed 5 days ago

BrynCooke commented 6 days ago

4535 introduced an issue where the following config would not work:

headers:
- propagate:
    named: a
    rename: b
- propagate:
    named: a
    rename: c

The existing logic maintained a set of headers that had been propagated already, but did not take into account renaming. It used the original name of the header when tracking which headers had been propagated.

This fix adds a test for propagation and fixes the logic to take into account renames.


Checklist

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

Exceptions

Notes

[^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.

svc-apollo-docs commented 6 days ago

✅ Docs Preview Ready

No new or changed pages found.

github-actions[bot] commented 6 days ago

@BrynCooke, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

router-perf[bot] commented 6 days ago

CI performance tests