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

v1alpha2: Clarify HTTPRouteFilter conformance levels #655

Closed
banks opened this issue May 7, 2021 · 7 comments
Closed

v1alpha2: Clarify HTTPRouteFilter conformance levels #655

banks opened this issue May 7, 2021 · 7 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@banks
Copy link

banks commented May 7, 2021

What happened:

Reading the API definition in

type HTTPRouteFilter struct {
there seems to be some inconsistency in the conformance level annotations for HTTPRouteFilter.

It's possible I'm just reading it wrong, but if so perhaps the presentation could be clarified to ensure the spec is clear to other implementors.

Specifically, in HTTPRouteFilter I see RequestHeaderModifier is Core while RequestMirror is Extended (which seems sensible):

// RequestHeaderModifier defines a schema for a filter that modifies request
// headers.
//
// Support: Core
//
// +optional
RequestHeaderModifier *HTTPRequestHeaderFilter `json:"requestHeaderModifier,omitempty"`
// RequestMirror defines a schema for a filter that mirrors requests.
//
// Support: Extended
//
// +optional
RequestMirror *HTTPRequestMirrorFilter `json:"requestMirror,omitempty"`

But then in the annotations on those nested struct types:

  • all the fields in the Core HTTPRequestHeaderFilter are marked as Extended. If all config fields only require conformance by "extended" implementations, what does it mean that the filter itself is required by Core implementations?
  • HTTPRequestMirrorFilter which is marked as Extended above, has a field ServiceName which is marked as Core conformance level. What does it mean for a field to be required by Core conforming implementations if it's part of an Extended struct?

What you expected to happen:

Conformance level annotations for nested configuration to be the same or weaker than the parent configuration level.

Thanks for your great work on this spec, I'm following closely!

[edit] I notice afterwards that v1alpha2 where I saw this is unstable so perhaps this is still a WIP and tracked elsewhere? I didn't see anything obvious though.

@banks banks added the kind/bug Categorizes issue or PR as related to a bug. label May 7, 2021
@banks banks changed the title Clarify HTTPRouteFilter conformance levels v1alpha2: Clarify HTTPRouteFilter conformance levels May 7, 2021
@robscott robscott added this to the v1alpha2 milestone May 7, 2021
@robscott
Copy link
Member

robscott commented May 7, 2021

Thanks for catching this @banks! You're right that this is unnecessarily confusing. Although each individual support level could make sense in isolation, they don't with the context you've provided here.

@hbagdi
Copy link
Contributor

hbagdi commented May 12, 2021

Doing a bit of git spelunking, we didn't have enough discussion around the conformance level for those fields and they got marked as extended in a cleanup: 034c323#diff-d1c59de21c79ea2bd1a99c2f52d9879981dd785848408064289287cb262fe600R422-R424

I think fields inside RequestHeaderModifier shouldn't even have conformance level as the behavior of the filter is well-defined (except #480).

hbagdi added a commit to hbagdi/service-apis that referenced this issue Jul 13, 2021
As noted in kubernetes-sigs#655, a core filter with extended support fields is
confusing and also seems to be incorrect.
This patch drops the extended field from the filter and is a partial fix
for the referenced issue.

HTTPRequestMirroFilter has not been patch as GEP-718 could potentially
simplify that.
@hbagdi
Copy link
Contributor

hbagdi commented Jul 13, 2021

/assign

hbagdi added a commit to hbagdi/service-apis that referenced this issue Jul 13, 2021
As noted in kubernetes-sigs#655, a core filter with extended support fields is
confusing and also seems to be incorrect.
This patch drops the extended field from the filter and is a partial fix
for the referenced issue.

HTTPRequestMirroFilter has not been patch as GEP-718 could potentially
simplify that.
@hbagdi
Copy link
Contributor

hbagdi commented Jul 15, 2021

#721 is a partial fix.
#719 should simplify the filter a bit. I'll take care of updating the language to match the discussion here.
Let me know if I'm missing anything else from here.

@robscott
Copy link
Member

#723 also attempts to fix this

@robscott
Copy link
Member

I think this has been fixed by #721 and #723, feel free to reopen if I missed anything.

/close

@k8s-ci-robot
Copy link
Contributor

@robscott: Closing this issue.

In response to this:

I think this has been fixed by #721 and #723, feel free to reopen if I missed anything.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants