Skip to content

api: move generic matcher proto to its own package#17096

Merged
htuch merged 26 commits intoenvoyproxy:mainfrom
snowp:move-generic-matcher
Aug 8, 2021
Merged

api: move generic matcher proto to its own package#17096
htuch merged 26 commits intoenvoyproxy:mainfrom
snowp:move-generic-matcher

Conversation

@snowp
Copy link
Contributor

@snowp snowp commented Jun 23, 2021

In order to unblock a dependency between route_components.proto and the matcher tree, move the alpha Matcher to
its own package. To provide an upgrade path for users using this, we'll keep the old copy around for a single deprecation
cycle.

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

Risk Level: Low
Testing: n/a
Docs Changes: n/a
Release Notes: Deprecation note

Snow Pettersen added 2 commits June 23, 2021 02:35
Signed-off-by: Snow Pettersen <snowp@lyft.com>
Signed-off-by: Snow Pettersen <snowp@lyft.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
envoyproxy/api-shepherds assignee is @htuch
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #17096 was opened by snowp.

see: more, trace.

@snowp
Copy link
Contributor Author

snowp commented Jun 23, 2021

@htuch This moves the proto as per #17037. I figured we'd provide some kind of upgrade path via supporting both the new and old proto, though let me know if you think we should just do an aggressive move given the alpha status.

Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

@snowp very exciting to see routing and sub-linear matchers coming together.

One question I have on this is whether we are breaking the circular dependency at the ideal place. The fact that generic matchers depend on HeaderMatcher in router seems wrong, ideally the header matcher would be somewhere generic. OTOH to fix this would require wasting time deprecating the existing location and moving the type for route table, which is very disruptive to existing users (almost everyone using Envoy and HTTP).

Is what you ahve here the least bad you can think of?

@markdroth
Copy link
Contributor

While you're at it, can you also update the following doc to indicate an exception for [#alpha:]?

https://github.com/envoyproxy/envoy/blob/main/api/API_VERSIONING.md#backwards-compatibility

Thanks!

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

snowp commented Jul 7, 2021

Is what you ahve here the least bad you can think of?

I think this is the least bad in terms how many people this would be affected by it (only users of the new matching API). I'm also not sure if moving the header matching protos would help without a breaking API change: the protos currently referencing them are not in alpha, so even if we copied them we wouldn't be able to remove the build time dependency on the existing route matching protos since we need to keep the deprecated field around. With this change we can remove the old matching tree proto (immediately? or maybe following a deprecation cycle?) and continue to evolve the new proto without being held back by the API stability policy.

Snow Pettersen added 2 commits July 7, 2021 17:06
Signed-off-by: Snow Pettersen <snowp@lyft.com>
Signed-off-by: Snow Pettersen <snowp@lyft.com>
@markdroth
Copy link
Contributor

Another thought: Since we're moving this any way, would it make sense to move it to the cncf/xds repo at this point?

@snowp
Copy link
Contributor Author

snowp commented Jul 8, 2021

@markdroth I'm not opposed to that since I don't think it would be too much work, so happy to do that if we feel like it's the right call. @envoyproxy/api-shepherds thoughts?

@snowp
Copy link
Contributor Author

snowp commented Jul 8, 2021

Also: given the exception we're now giving breaking changes to alpha protos, does it still make sense to provide the migration path that this PR offers at the moment? After looking at it some more, none of the affected protos are referenced by type url (only ExtensionWithMatch is, which isnt changed), so if we were to swap the type of the matcher field to something that looks the same that should not break anything on the wire

Thoughts?

@htuch
Copy link
Member

htuch commented Jul 9, 2021

I think moving to cncf/xds would make sense as this is a fairly fundamental generic construct. But, don't feel so strongly I'd bike shed a ton.

Migration path makes sense if it helps out in your situation @snowp, otherwise I think it's fine to just make the breaking change in alpha.

@snowp
Copy link
Contributor Author

snowp commented Jul 9, 2021

Looking into what it would take to migrate this to udpa there are two messages outside of the immediate field that would also need to be migrated: TypedExtensionConfig and matcher.v3.StringMatcher. We could add these to udpa as well, though that will involve duck typing more functions (like I've done in this PR via templating) to make them compatible with the identical protos in the Envoy repo vs the udpa repo.

Thoughts? Not sure if this makes things more complicated than they have to be

Snow Pettersen added 2 commits July 9, 2021 03:20
Signed-off-by: Snow Pettersen <snowp@lyft.com>
Copy link
Contributor

@markdroth markdroth left a comment

Choose a reason for hiding this comment

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

I'd be fine with creating a copy of both TypedExtensionConfig and StringMatcher in the cncf/xds repo.

may be granted for scenarios in which these stricter conditions model behavior already implied
structurally or by documentation.

* Messages marked as [#alpha:] are excluded from the backwards compatibility guarantees.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please put this in the bulletted list below, which lists the other items that have an exception.

Signed-off-by: Snow Pettersen <snowp@lyft.com>
@snowp snowp requested review from asraa, ggreenway and lizan as code owners July 9, 2021 19:22
@repokitteh-read-only
Copy link

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).

🐱

Caused by: #17096 was synchronize by snowp.

see: more, trace.

@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label Jul 9, 2021
Signed-off-by: Snow Pettersen <snowp@lyft.com>
@snowp snowp requested a review from jmarantz as a code owner July 27, 2021 15:57
Snow Pettersen added 2 commits July 27, 2021 15:57
Signed-off-by: Snow Pettersen <snowp@lyft.com>
Signed-off-by: Snow Pettersen <snowp@lyft.com>
@htuch
Copy link
Member

htuch commented Aug 1, 2021

Looks like CI failures.
/wait

Signed-off-by: Snow Pettersen <snowp@lyft.com>
Snow Pettersen added 2 commits August 5, 2021 15:21
Signed-off-by: Snow Pettersen <snowp@lyft.com>
Signed-off-by: Snow Pettersen <snowp@lyft.com>
@moderation
Copy link
Contributor

I think it's lack of any release, but this seems strange it should be the first time since there are other deps in this situation. @moderation @phlax any thoughts?

Seems like the deps issue is resolved and there shouldn't be problems with deps without releases or targeting specific commits.

/lgtm deps

@repokitteh-read-only repokitteh-read-only bot removed the deps Approval required for changes to Envoy's external dependencies label Aug 5, 2021
Signed-off-by: Snow Pettersen <snowp@lyft.com>
htuch
htuch previously approved these changes Aug 6, 2021
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@repokitteh-read-only repokitteh-read-only bot removed the api label Aug 6, 2021
mathetake
mathetake previously approved these changes Aug 6, 2021
Copy link
Member

@mathetake mathetake left a comment

Choose a reason for hiding this comment

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

LGTM for changes to SPIFFE validator extension

Signed-off-by: Snow Pettersen <snowp@lyft.com>
@snowp snowp dismissed stale reviews from mathetake and htuch via 162c85f August 6, 2021 15:12
@snowp
Copy link
Contributor Author

snowp commented Aug 6, 2021

Finally passed CI on this on, ptal @htuch

Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@repokitteh-read-only repokitteh-read-only bot removed the api label Aug 8, 2021
@htuch htuch merged commit 40ed333 into envoyproxy:main Aug 8, 2021
mpuncel added a commit to mpuncel/envoy that referenced this pull request Aug 11, 2021
* main: (687 commits)
  ci: set build debug information from env (envoyproxy#17635)
  ext_authz: do the authentication even the direct response is set (envoyproxy#17546)
  upstream: various cleanups in connection pool code (envoyproxy#17644)
  owners: promote Dmitry to maintainer (envoyproxy#17642)
  quiche: client session supports creating bidi stream (envoyproxy#17543)
  Update HTTP/2 METADATA documentation. (envoyproxy#17637)
  ext_proc: Check validity of the :status header (envoyproxy#17596)
  test: add ASSERT indicating that gRPC stream has not been started yet (envoyproxy#17614)
  ensure that the inline cookie header will be folded correctly  (envoyproxy#17560)
  cluster_manager: Make ClusterEntry a class instead of a struct (envoyproxy#17616)
  owners: make Raúl a Thrift senior extension maintainer (envoyproxy#17641)
  quiche: update QUICHE dependency (envoyproxy#17618)
  Delete mock for removed RouteEntry::perFilterConfig() method (envoyproxy#17623)
  REPO_LAYOUT.md: fix outdated link (envoyproxy#17626)
  hcm: forbid use of detection extensions with use_remote_addr/xff_num_trusted_hops (envoyproxy#17558)
  thrift proxy: add request shadowing support (envoyproxy#17544)
  ext_proc: Ensure that timer is always cancelled (envoyproxy#17569)
  Proposal: Add CachePolicy interface to allow for custom cache behavior (envoyproxy#17362)
  proto: fix verify to point at v3 only (envoyproxy#17622)
  api: move generic matcher proto to its own package (envoyproxy#17096)
  ...
mpuncel added a commit to mpuncel/envoy that referenced this pull request Aug 16, 2021
* main: (687 commits)
  ci: set build debug information from env (envoyproxy#17635)
  ext_authz: do the authentication even the direct response is set (envoyproxy#17546)
  upstream: various cleanups in connection pool code (envoyproxy#17644)
  owners: promote Dmitry to maintainer (envoyproxy#17642)
  quiche: client session supports creating bidi stream (envoyproxy#17543)
  Update HTTP/2 METADATA documentation. (envoyproxy#17637)
  ext_proc: Check validity of the :status header (envoyproxy#17596)
  test: add ASSERT indicating that gRPC stream has not been started yet (envoyproxy#17614)
  ensure that the inline cookie header will be folded correctly  (envoyproxy#17560)
  cluster_manager: Make ClusterEntry a class instead of a struct (envoyproxy#17616)
  owners: make Raúl a Thrift senior extension maintainer (envoyproxy#17641)
  quiche: update QUICHE dependency (envoyproxy#17618)
  Delete mock for removed RouteEntry::perFilterConfig() method (envoyproxy#17623)
  REPO_LAYOUT.md: fix outdated link (envoyproxy#17626)
  hcm: forbid use of detection extensions with use_remote_addr/xff_num_trusted_hops (envoyproxy#17558)
  thrift proxy: add request shadowing support (envoyproxy#17544)
  ext_proc: Ensure that timer is always cancelled (envoyproxy#17569)
  Proposal: Add CachePolicy interface to allow for custom cache behavior (envoyproxy#17362)
  proto: fix verify to point at v3 only (envoyproxy#17622)
  api: move generic matcher proto to its own package (envoyproxy#17096)
  ...

Signed-off-by: Michael Puncel <mpuncel@squareup.com>
leyao-daily pushed a commit to leyao-daily/envoy that referenced this pull request Sep 30, 2021
In order to unblock a dependency between route_components.proto and the matcher tree, move the alpha Matcher to
its own package. To provide an upgrade path for users using this, we'll keep the old copy around for a single deprecation
cycle.

Risk Level: Low
Testing: n/a
Docs Changes: n/a
Release Notes: Deprecation note

Signed-off-by: Snow Pettersen <snowp@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