Skip to content

alpha matching: support generic action factory context#17025

Merged
mattklein123 merged 3 commits intoenvoyproxy:mainfrom
snowp:action-context
Jun 29, 2021
Merged

alpha matching: support generic action factory context#17025
mattklein123 merged 3 commits intoenvoyproxy:mainfrom
snowp:action-context

Conversation

@snowp
Copy link
Contributor

@snowp snowp commented Jun 17, 2021

Prior to this PR the MatchTreeFactory required a FactoryContext in
order to pass this to the action factories. This is not available in all
contexts, and there are other possible use cases where we might need
to pass additional information to the match tree factory (e.g. the
router might need to pass the parent vhost configuration).

This PR introduces a parametrized action context, allowing each usage of
the MatchTree to define its own data that should be presented to the
action factories. This also has the nice benefit of partitioning the
action factories per context: each unique ActionFactoryContext defines a
new factory type, ensuring that actions defined for a HTTP filter
context won't be conflated with actions defined for another context.

Signed-off-by: Snow Pettersen snowp@lyft.com

Risk Level: Medium
Testing: Existing tests
Docs Changes: n/a
Release Notes: n/a

Prior to this PR the MatchTreeFactory requried a ServerFactoryContext in
order to pass this to the action factories. This is not available in all
contexts, and there are other possible use cases where we might need
to pass additional information to the match tree factory (e.g. the
router might need to pass the parent vhost configuration).

This PR introduces a paramterized action context, allowing each usage of
the MatchTree to define its own data that should be presented to the
action factories. This also has the nice benefit of partitioning the
action factories per context: each unique ActionFactoryContext defines a
new factory type, ensuring that actions defined for a HTTP filter
context won't be conflated with actions defined for another context.

Signed-off-by: Snow Pettersen <snowp@lyft.com>
@snowp
Copy link
Contributor Author

snowp commented Jun 17, 2021

cc @aguinet, this will change the match interface again somewhat if this lands before your PRs

@aguinet
Copy link
Contributor

aguinet commented Jun 17, 2021

Thanks for the heads up @snowp ! I'll keep an eye on it!

@snowp snowp added the waiting label Jun 17, 2021
Signed-off-by: Snow Pettersen <snowp@lyft.com>
Signed-off-by: Snow Pettersen <snowp@lyft.com>
@alyssawilk
Copy link
Contributor

@snowp want me to find another reviewer or does it make sense to wait until Matt gets back?

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Makes sense to me!

@mattklein123 mattklein123 merged commit be1cd7b into envoyproxy:main Jun 29, 2021
@paul-r-gall
Copy link
Contributor

Hi, I think this PR broke this extension:

createInputMatcherFactoryCb(const Protobuf::Message& config,

@mattklein123
Copy link
Member

I'm looking into fixing, but it's not so easy and @snowp is out so I'm just going to revert this and let him fix.

mattklein123 added a commit that referenced this pull request Jun 29, 2021
This reverts commit be1cd7b.

Signed-off-by: Matt Klein <mklein@lyft.com>
@mattklein123
Copy link
Member

#17191

mattklein123 added a commit that referenced this pull request Jun 29, 2021
…" (#17191)

This reverts commit be1cd7b.

Signed-off-by: Matt Klein <mklein@lyft.com>
baojr added a commit to baojr/envoy that referenced this pull request Jul 1, 2021
* main: (51 commits)
  listener: add filter chain match support for direct source address (envoyproxy#17118)
  Increase common/common coverage (envoyproxy#17193)
  crash_dump: Added local_end_stream_ to crash dump for H2. (envoyproxy#17199)
  codeql: improve Ubuntu dependency installation (envoyproxy#16556)
  ci: Move tooling tests to tooling job (envoyproxy#17071)
  Fix issue with Windows container image (envoyproxy#17113)
  fix filter linking urls (envoyproxy#17185)
  bug fix: fix bug that check_format.py will check files which are ignored (envoyproxy#17195)
  tls: moving the server name into SocketAddressProvider (envoyproxy#16574)
  network: Use std::make_unique and std::make_shared in source/common/network instead of bare new() (envoyproxy#17177)
  Revert "alpha matching: support generic action factory context (envoyproxy#17025)" (envoyproxy#17191)
  ci: Dont clone filter example where not required (envoyproxy#17182)
  alpha matching: support generic action factory context (envoyproxy#17025)
  xds: Clarify comment for RouteMatch.case_sensitive field. (envoyproxy#17176)
  ci: Only publish the required docker image (envoyproxy#17080)
  coverage: fixing flake (envoyproxy#17190)
  api: add cluster_specifier_plugin to RouteAction (envoyproxy#16944)
  wasm: update V8 to v9.2.230.13. (envoyproxy#17183)
  wasm: update Proxy-Wasm C++ Host and SDK to latest (2021-06-24). (envoyproxy#17174)
  owners: add Piotr as senior extension maintainer (envoyproxy#17175)
  ...

Signed-off-by: Garrett Bourg <bourg@squareup.com>
chrisxrepo pushed a commit to chrisxrepo/envoy that referenced this pull request Jul 8, 2021
)

Prior to this PR the MatchTreeFactory requried a ServerFactoryContext in
order to pass this to the action factories. This is not available in all
contexts, and there are other possible use cases where we might need
to pass additional information to the match tree factory (e.g. the
router might need to pass the parent vhost configuration).

This PR introduces a paramterized action context, allowing each usage of
the MatchTree to define its own data that should be presented to the
action factories. This also has the nice benefit of partitioning the
action factories per context: each unique ActionFactoryContext defines a
new factory type, ensuring that actions defined for a HTTP filter
context won't be conflated with actions defined for another context.

Signed-off-by: Snow Pettersen <snowp@lyft.com>
Signed-off-by: chris.xin <xinchuantao@qq.com>
chrisxrepo pushed a commit to chrisxrepo/envoy that referenced this pull request Jul 8, 2021
…proxy#17025)" (envoyproxy#17191)

This reverts commit be1cd7b.

Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: chris.xin <xinchuantao@qq.com>
snowp pushed a commit to snowp/envoy that referenced this pull request Jul 8, 2021
envoyproxy#17025)" (envoyproxy#17191)"

This reverts commit 27b4f08.

Signed-off-by: Snow Pettersen <snowp@lyft.com>
leyao-daily pushed a commit to leyao-daily/envoy that referenced this pull request Sep 30, 2021
)

Prior to this PR the MatchTreeFactory requried a ServerFactoryContext in
order to pass this to the action factories. This is not available in all
contexts, and there are other possible use cases where we might need
to pass additional information to the match tree factory (e.g. the
router might need to pass the parent vhost configuration).

This PR introduces a paramterized action context, allowing each usage of
the MatchTree to define its own data that should be presented to the
action factories. This also has the nice benefit of partitioning the
action factories per context: each unique ActionFactoryContext defines a
new factory type, ensuring that actions defined for a HTTP filter
context won't be conflated with actions defined for another context.

Signed-off-by: Snow Pettersen <snowp@lyft.com>
leyao-daily pushed a commit to leyao-daily/envoy that referenced this pull request Sep 30, 2021
…proxy#17025)" (envoyproxy#17191)

This reverts commit be1cd7b.

Signed-off-by: Matt Klein <mklein@lyft.com>
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.

5 participants