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

Global param propagation for sequential merger #745

Merged
merged 6 commits into from
Jan 17, 2025

Conversation

thedae
Copy link
Member

@thedae thedae commented Jan 13, 2025

Adding a way to globally propagate params in the sequential merger without having to specify them in the UrlPattern.

The parameter propagation can be enabled specifying the sequential_propagated_params entry in the ExtraConfig.proxy namespace

Example

    {
      "endpoint": "/example",
      "backend": [
        {
          "url_pattern": "/one"
        },
        {
          "encoding": "no-op",
          "url_pattern": "/two"
        },
        {
          "url_pattern": "/three"
        }
      ],
      "extra_config": {
        "proxy": {
          "sequential": true,
          "sequential_propagated_params": [
            "resp0_id",
            "resp0_profile.name",
            "resp1"
          ]
        }
      }
    }

This configuration would:

  • Propagate the field id from /one response to both /two and /three
  • Propagate the nested field profile.name from /one response to both /two and /three
  • Propagate the full /two response to /three. This only works for no-op encoding backends

Signed-off-by: thedae <[email protected]>
Signed-off-by: thedae <[email protected]>
@kpacha kpacha merged commit 9b8a7c3 into master Jan 17, 2025
5 checks passed
@kpacha kpacha deleted the propagate_seq_merger_params branch January 17, 2025 13:19
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.

2 participants