Skip to content

HTTPRouteInvalidNonExistentBackendRef Conformance Test Fails #431

@danehans

Description

@danehans

The HTTPRouteInvalidNonExistentBackendRef conformance test is failing.

Test Logs:

...
http.go:159: Response expectation failed, not ready yet: expected status code to be 500, got 503
Sending Request:
< GET / HTTP/1.1
< Host: 127.0.0.1:80
< User-Agent: Go-http-client/1.1
< Accept-Encoding: gzip
<
<

Received Response:
< HTTP/1.1 503 Service Unavailable
< Content-Length: 19
< Content-Type: text/plain
< Date: Tue, 27 Sep 2022 17:05:46 GMT
< Server: envoy
<
< no healthy upstream

    http.go:159: Response expectation failed, not ready yet: expected status code to be 500, got 503
    http.go:140: timeout while waiting after 30 attempts, 0/3 sucessess
...
--- FAIL: TestGatewayAPIConformance (52.53s)
    --- FAIL: TestGatewayAPIConformance/HTTPRouteInvalidNonExistentBackendRef (31.13s)
        --- PASS: TestGatewayAPIConformance/HTTPRouteInvalidNonExistentBackendRef/HTTPRoute_with_only_a_nonexistent_BackendRef_has_a_ResolvedRefs_Condition_with_status_False_and_Reason_BackendNotFound (0.00s)
        --- FAIL: TestGatewayAPIConformance/HTTPRouteInvalidNonExistentBackendRef/HTTP_Request_to_invalid_nonexistent_backend_receive_a_500 (30.00s)
FAIL

Envoy is returning a 503 instead of a 500. This may be due to the httproute controller not adding the route to the watchable map since it's considered invalid.

EG Logs:

...
2022-09-27T17:05:36.839Z	ERROR	controller/controller.go:326	Reconciler error	{"runner": "provider", "controller": "httproute", "object": {"name":"invalid-nonexistent-backend-ref","namespace":"gateway-conformance-infra"}, "namespace": "gateway-conformance-infra", "name": "invalid-nonexistent-backend-ref", "reconcileID": "2b953b24-718c-4319-9658-789d9d9cb9cc", "error": "invalid backendRef: invalid namespace; must be nil"}

It appears that validateBackendRef() needs to support cross-namespace references.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ciCI and build related issuesarea/conformanceGateway API Conformance Related Issueshelp wantedExtra attention is neededkind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions