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

Bump Gateway API to v0.7.1 #5353

Merged
merged 12 commits into from
Jun 6, 2023

Conversation

sunjayBhatia
Copy link
Member

@sunjayBhatia sunjayBhatia commented May 10, 2023

To ensure compatibility with upcoming release

Fixes: #5336
Fixes: #5414

@sunjayBhatia sunjayBhatia added the release-note/small A small change that needs one line of explanation in the release notes. label May 10, 2023
@sunjayBhatia sunjayBhatia requested a review from a team as a code owner May 10, 2023 20:27
@sunjayBhatia sunjayBhatia requested review from tsaarni and skriss and removed request for a team May 10, 2023 20:27
@sunjayBhatia
Copy link
Member Author

sunjayBhatia commented May 10, 2023

Will update dependency tag/PR title as new rc/GA versions become available, looks like rc2 is coming soon

@sunjayBhatia sunjayBhatia changed the title Bump Gateway API to v0.7.0-rc1 Bump Gateway API to v0.7.0-rc2 May 10, 2023
@sunjayBhatia
Copy link
Member Author

rc2 image not out yet

@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Merging #5353 (ccd11ce) into main (5fc91fa) will not change coverage.
The diff coverage is 66.66%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5353   +/-   ##
=======================================
  Coverage   78.18%   78.18%           
=======================================
  Files         138      138           
  Lines       18496    18496           
=======================================
  Hits        14462    14462           
  Misses       3757     3757           
  Partials      277      277           
Impacted Files Coverage Δ
internal/gatewayapi/helpers.go 87.94% <0.00%> (ø)
internal/dag/gatewayapi_processor.go 94.34% <100.00%> (ø)

@sunjayBhatia
Copy link
Member Author

sunjayBhatia commented May 11, 2023

Re-running to see if the TLSRoute test failure was a flake

Otherwise, we have the ObservedGeneration bump test failing and more redirect tests failing

  • TestGatewayConformance/GatewayObservedGenerationBump
  • TestGatewayConformance/HTTPRouteRedirectPortAndScheme
    • http-listener-on-8080/0_request_to_'/scheme-nil-and-port-nil'_should_receive_a_302 fails expecting port 8080 to be returned (since it does not specify a port redirect and envoy strips the original request port)
    • http-listener-on-80 tests all pass
    • https-listener-on-443 all the tests fail w/ status 421 since they are not setting a proper host, as-is the requested server name is example but the authority ends up actually just being the Gateway IP
      • once the tests are fixed, we also need to change this line to * rather than *. to cover the new case Gateway API has introduced, no hostnames on the GW or Route mean the SNI match is on *:
        if strings.HasPrefix(fqdn, "*.") {
[2023-05-18 21:42:12.536][31][debug][conn_handler] [source/extensions/listener_managers/listener_manager/active_tcp_listener.cc:155] [C22] new connection from 172.18.0.1:48360
[2023-05-18 21:42:12.536][25][debug][filter] [source/extensions/filters/listener/tls_inspector/tls_inspector.cc:117] tls:onServerName(), requestedServerName: example
[2023-05-18 21:42:12.536][25][debug][conn_handler] [source/extensions/listener_managers/listener_manager/active_tcp_listener.cc:155] [C23] new connection from 172.18.0.1:48334
[2023-05-18 21:42:12.536][25][debug][filter] [source/extensions/filters/listener/tls_inspector/tls_inspector.cc:117] tls:onServerName(), requestedServerName: example
[2023-05-18 21:42:12.536][25][debug][conn_handler] [source/extensions/listener_managers/listener_manager/active_tcp_listener.cc:155] [C24] new connection from 172.18.0.1:48368
[2023-05-18 21:42:12.539][19][debug][filter] [source/extensions/filters/listener/tls_inspector/tls_inspector.cc:117] tls:onServerName(), requestedServerName: example
[2023-05-18 21:42:12.539][19][debug][conn_handler] [source/extensions/listener_managers/listener_manager/active_tcp_listener.cc:155] [C25] new connection from 172.18.0.1:48330
[2023-05-18 21:42:12.541][31][debug][http] [source/common/http/conn_manager_impl.cc:349] [C22] new stream
[2023-05-18 21:42:12.541][31][debug][http] [source/common/http/conn_manager_impl.cc:1039] [C22][S13650922495304120506] request headers complete (end_stream=true):
':authority', '172.18.255.202'
':path', '/scheme-nil-and-port-443'
':method', 'GET'
'user-agent', 'Go-http-client/1.1'
'x-echo-set-header', ''
'accept-encoding', 'gzip'
  • TestGatewayConformance/TLSRouteSimpleSameNamespace looks like a flake

@sunjayBhatia
Copy link
Member Author

sunjayBhatia commented May 18, 2023

made some updates to the comment above, will have a PR to fix GW API tests coming shortly

Issue: kubernetes-sigs/gateway-api#2038

PR: kubernetes-sigs/gateway-api#2039

@sunjayBhatia sunjayBhatia force-pushed the bump-gw-api-0.7.0 branch 2 times, most recently from 5f3d109 to e4c6a18 Compare May 22, 2023 16:49
@@ -76,6 +76,8 @@ jobs:
./hack/actions/install-kubernetes-toolchain.sh $GITHUB_WORKSPACE/bin
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: generate
env:
Copy link
Member Author

Choose a reason for hiding this comment

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

will undo changes here once we have another tagged patch release

@sunjayBhatia sunjayBhatia changed the title Bump Gateway API to v0.7.0-rc2 Bump Gateway API to v0.7.x May 22, 2023
@sunjayBhatia
Copy link
Member Author

sunjayBhatia commented May 22, 2023

New failing test: TestConformance/HTTPRouteHostnameIntersection/HTTPRoutes_that_do_intersect_with_listener_hostnames/1_request_to_'very.specific.com:1234/s1'_should_go_to_infra-backend-v1

fails with error

http.go:222: Response expectation failed for request: {URL: {Scheme:http Opaque: User: Host:172.18.255.205 Path:/s1 RawPath: OmitHost:false ForceQuery:false RawQuery: Fragment: RawFragment:}, Host: very.specific.com:1234, Protocol: HTTP, Method: GET, Headers: map[X-Echo-Set-Header:[]], UnfollowRedirect: false, Server: , CertPem: <truncated>, KeyPem: <truncated>} not ready yet: expected host to be very.specific.com:1234, got very.specific.com (after 1µs)

another instance of port stripping.

@sunjayBhatia
Copy link
Member Author

sunjayBhatia commented May 22, 2023

Another failing test, looks like it was added after my review, see: https://github.com/kubernetes-sigs/gateway-api/pull/1984/files#r1200873543

We implement method matching using the :method pseudoheader, so if you have only a method in one route match and only a single header in another, I believe whichever one comes first in the list will currently "win"

We'll need to add some explicit logic to get this right regardless of match order once the spec is updated with a precedence order

@sunjayBhatia
Copy link
Member Author

rebased on #5390 to get the fixes from there

@sunjayBhatia
Copy link
Member Author

sunjayBhatia commented Jun 2, 2023

looks like the webhook image isn't out yet for 0.7.1

@sunjayBhatia
Copy link
Member Author

sunjayBhatia commented Jun 5, 2023

Might have to undo #3458 to get TestGatewayConformance/HTTPRouteHostnameIntersection passing again as the tests expect the port from the Host header is passed upstream and right now we're stripping it

The test passes if we undo the strip host port configuration and add back the virtualhost domain match for hostname + ":*"

The reason we added this in the first place is you can't match on *.foo.com:* so wildcard hostname + "ignoring" port isn't allowed in Envoy: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-field-config-route-v3-virtualhost-domains

@sunjayBhatia
Copy link
Member Author

Filed kubernetes-sigs/gateway-api#2091

@sunjayBhatia sunjayBhatia force-pushed the bump-gw-api-0.7.0 branch 2 times, most recently from 932c64f to beb66f0 Compare June 5, 2023 20:35
@sunjayBhatia
Copy link
Member Author

rebased on #5437

@sunjayBhatia sunjayBhatia changed the title Bump Gateway API to v0.7.x Bump Gateway API to v0.7.1 Jun 5, 2023
@sunjayBhatia
Copy link
Member Author

Conformance is all passing, just got to fix whatever is up with e2e tests from #5437

Copy link
Member

@skriss skriss left a comment

Choose a reason for hiding this comment

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

🚀 thanks for all the work on this one @sunjayBhatia!

Comment on lines +63 to +67
// Test adds multiple HTTP Listeners to the Gateway with
// distinct ports. This is not supported in Contour until
// multi-Listener support is added.
// See: https://github.com/projectcontour/contour/issues/4960
tests.GatewayObservedGenerationBump.ShortName,
Copy link
Member

Choose a reason for hiding this comment

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

I've confirmed that this test will pass with #5160, will update that PR to remove it from the skipped tests

@skriss
Copy link
Member

skriss commented Jun 5, 2023

This PR still needs its own changelog file

To ensure compatibility with upcoming release

Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
to avoid controller-runtime panic when no log sink is set

Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
panics due to warnings being logged in controller-runtime

Also just curious to see what the warnings are

Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
@sunjayBhatia sunjayBhatia added release-note/minor A minor change that needs about a paragraph of explanation in the release notes. and removed release-note/small A small change that needs one line of explanation in the release notes. labels Jun 5, 2023
@sunjayBhatia sunjayBhatia merged commit d42b892 into projectcontour:main Jun 6, 2023
@sunjayBhatia sunjayBhatia deleted the bump-gw-api-0.7.0 branch June 6, 2023 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/minor A minor change that needs about a paragraph of explanation in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flake: Gateway API conformance TLSRoute update to Gateway API v0.7.1
2 participants