envoy icon indicating copy to clipboard operation
envoy copied to clipboard

Full Set Of Changes For Pattern Match and Rewrite

Open silverstar194 opened this issue 2 years ago • 7 comments

Commit Message: Full Set Of Changes For Pattern Match and Rewrite

Additional Description: This PR will implement issue detailed here and described below: https://github.com/envoyproxy/envoy/issues/7763

Match Patterns and Templates

Wildcard support based on match patterns and templates.

  • A match pattern matches an incoming URL path. Match patterns support glob operators to match URL text and variable definitions to bind matched text to names.

  • Template patterns are used to re-write URLs. Template patterns build new URLs and may reference variables bound by a match pattern.

Match Examples

  • /**.m3u8 would match /foo.m3u8 and /foo/bar.m3u8.
  • /{dir_name}/*.ts would match /example/file.ts and bind dir_name="example" for a later template match to use.
  • /{dir_name}/**.ts would match /example/path/file.ts and bind dir_name="example" for a later template match to use. This would also match /example/.ts, which may or may not be a desired behavior.
  • /{path=v1/*}/{file=*.ts} would match /v1/example/movie.ts (binding path="v1/example" and file="movie"), but would not match /v0/example/movie.ts.

See post for full details and example: https://github.com/envoyproxy/envoy/issues/7763#issuecomment-825053497

Risk Level: Testing: Unit tests. Both both internal matching/rewrite library and config/data plane changes.

Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional API Considerations:]

silverstar194 avatar Jul 14 '22 15:07 silverstar194

As a reminder, PRs marked as draft will not be automatically assigned reviewers, or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

:cat:

Caused by: https://github.com/envoyproxy/envoy/pull/22207 was opened by silverstar194.

see: more, trace.

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

:cat:

Caused by: https://github.com/envoyproxy/envoy/pull/22207 was opened by silverstar194.

see: more, trace.

/retest

silverstar194 avatar Aug 08 '22 19:08 silverstar194

Retrying Azure Pipelines: Check envoy-presubmit isn't fully completed, but will still attempt retrying. Retried failed jobs in: envoy-presubmit

:cat:

Caused by: a https://github.com/envoyproxy/envoy/pull/22207#issuecomment-1208547325 was created by @silverstar194.

see: more, trace.

/retest

silverstar194 avatar Aug 08 '22 20:08 silverstar194

Retrying Azure Pipelines: Check envoy-presubmit isn't fully completed, but will still attempt retrying. Retried failed jobs in: envoy-presubmit

:cat:

Caused by: a https://github.com/envoyproxy/envoy/pull/22207#issuecomment-1208560692 was created by @silverstar194.

see: more, trace.

Looks like coverage is failing, and it needs a main merge.

RyanTheOptimist avatar Aug 11 '22 21:08 RyanTheOptimist

Looks like this PR has some formatting errors. In any case, the best way to move forward efficiently is to break out "pattern_template_lib" into a standalone PR which will be much smaller and must faster to turn reviews around on. Please do this and I'll review ASAP.

RyanTheOptimist avatar Aug 12 '22 19:08 RyanTheOptimist

Sorry what is the status of this? Is this being broken into smaller PRs? If so can we close this?

mattklein123 avatar Aug 29 '22 16:08 mattklein123

Sorry what is the status of this? Is this being broken into smaller PRs? If so can we close this?

Good point. Sorry for not summarizing our offline discussion here! A big chunk was broken out into https://github.com/envoyproxy/envoy/pull/22703 which I have approved and is waiting on @zuercher for cross-company review. Meanwhile, @silverstar194 is merging the changes from that PR into this and I'll take a look once it's passing CI.

RyanTheOptimist avatar Aug 29 '22 17:08 RyanTheOptimist

/retest

silverstar194 avatar Aug 29 '22 18:08 silverstar194

Retrying Azure Pipelines: Retried failed jobs in: envoy-presubmit

:cat:

Caused by: a https://github.com/envoyproxy/envoy/pull/22207#issuecomment-1230707409 was created by @silverstar194.

see: more, trace.

/retest

silverstar194 avatar Sep 06 '22 20:09 silverstar194

Retrying Azure Pipelines: Retried failed jobs in: envoy-presubmit

:cat:

Caused by: a https://github.com/envoyproxy/envoy/pull/22207#issuecomment-1238598480 was created by @silverstar194.

see: more, trace.

/wait

RyanTheOptimist avatar Sep 07 '22 18:09 RyanTheOptimist

/retest

silverstar194 avatar Sep 09 '22 14:09 silverstar194

Retrying Azure Pipelines: Check envoy-presubmit isn't fully completed, but will still attempt retrying. Retried failed jobs in: envoy-presubmit

:cat:

Caused by: a https://github.com/envoyproxy/envoy/pull/22207#issuecomment-1242074648 was created by @silverstar194.

see: more, trace.

/retest

silverstar194 avatar Sep 09 '22 14:09 silverstar194

Retrying Azure Pipelines: Retried failed jobs in: envoy-presubmit

:cat:

Caused by: a https://github.com/envoyproxy/envoy/pull/22207#issuecomment-1242078927 was created by @silverstar194.

see: more, trace.

/retest

silverstar194 avatar Sep 12 '22 13:09 silverstar194

Retrying Azure Pipelines: Retried failed jobs in: envoy-presubmit

:cat:

Caused by: a https://github.com/envoyproxy/envoy/pull/22207#issuecomment-1243755658 was created by @silverstar194.

see: more, trace.

@zuercher Could you take a look?

silverstar194 avatar Sep 13 '22 12:09 silverstar194

@htuch can you give this an API review?

RyanTheOptimist avatar Sep 14 '22 04:09 RyanTheOptimist