envoy
envoy copied to clipboard
Full Set Of Changes For Pattern Match and Rewrite
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:]
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!
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/)
.
/retest
Retrying Azure Pipelines: Check envoy-presubmit isn't fully completed, but will still attempt retrying. Retried failed jobs in: envoy-presubmit
/retest
Retrying Azure Pipelines: Check envoy-presubmit isn't fully completed, but will still attempt retrying. Retried failed jobs in: envoy-presubmit
Looks like coverage is failing, and it needs a main merge.
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.
Sorry what is the status of this? Is this being broken into smaller PRs? If so can we close this?
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.
/retest
Retrying Azure Pipelines: Retried failed jobs in: envoy-presubmit
/retest
Retrying Azure Pipelines: Retried failed jobs in: envoy-presubmit
/wait
/retest
Retrying Azure Pipelines: Check envoy-presubmit isn't fully completed, but will still attempt retrying. Retried failed jobs in: envoy-presubmit
/retest
Retrying Azure Pipelines: Retried failed jobs in: envoy-presubmit
/retest
Retrying Azure Pipelines: Retried failed jobs in: envoy-presubmit
@zuercher Could you take a look?
@htuch can you give this an API review?