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

Backport of docs: add note about path prefix matching behavior for HTTPRoute config into release/1.16.x #17861

Conversation

hc-github-team-consul-core
Copy link
Collaborator

Backport

This PR is auto-generated from #17860 to be assessed for backporting due to the inclusion of the label backport/1.16.

The below text is copied from the body of the original PR.


Description

The Gateway API spec says the following about path prefix route matches (source):

Matches based on a URL path prefix split by /. Matching is case sensitive and done on a path element by element basis. A path element refers to the list of labels in the path split by the / separator. When specified, a trailing / is ignored.

For example, the paths /abc, /abc/, and /abc/def would all match the prefix /abc, but the path /abcd would not.

Consul API Gateway does simple string prefix comparison today, which is the same thing that the rest of Consul does. The result is that, contrary to the specification above, we do match /abcd. This is because Consul uses RouteMatch_Prefix across the board for prefix matching when generating xDS instead of RouteMatch_PathSeparatedPrefix.

This PR just calls out that difference in the docs so we don't surprise anyone as much as we can help it.

Testing & Reproduction steps

N/A

Links

Vercel preview of added note

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core requested a review from a team as a code owner June 23, 2023 22:08
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/NET-4481-path-matching-doc/commonly-engaging-rhino branch 2 times, most recently from 4460094 to 23723ce Compare June 23, 2023 22:08
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/NET-4481-path-matching-doc/commonly-engaging-rhino branch from 8be7fd1 to c1913a9 Compare June 23, 2023 22:08
Copy link
Collaborator

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@github-actions github-actions bot added the type/docs Documentation needs to be created/updated/clarified label Jun 23, 2023
@hc-github-team-consul-core hc-github-team-consul-core merged commit 94c90ca into release/1.16.x Jun 23, 2023
107 checks passed
@hc-github-team-consul-core hc-github-team-consul-core deleted the backport/NET-4481-path-matching-doc/commonly-engaging-rhino branch June 23, 2023 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/docs Documentation needs to be created/updated/clarified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants