gateway-api icon indicating copy to clipboard operation
gateway-api copied to clipboard

Backendref httproute filter request redirect

Open arnaud-tincelin opened this issue 1 year ago • 14 comments

What type of PR is this? /kind test /area conformance

What this PR does / why we need it:

Which issue(s) this PR fixes: #2936

Does this PR introduce a user-facing change?:

NONE

arnaud-tincelin avatar Jun 05 '24 07:06 arnaud-tincelin

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: arnaud-tincelin / name: Arnaud (f6689f57ec6eb7c885217984187b4f7f13b34fa6, c30cd8ce2f7edb516d2dbf49e322715124792eb1, 013148f7209f71d48033d4f0d948f93be32cd474, 3874b65a91f3c436ee8a43d648597badda017f05)

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: arnaud-tincelin Once this PR has been reviewed and has the lgtm label, please assign danwinship for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Jun 05 '24 07:06 k8s-ci-robot

Welcome @arnaud-tincelin!

It looks like this is your first PR to kubernetes-sigs/gateway-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/gateway-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Jun 05 '24 07:06 k8s-ci-robot

Hi @arnaud-tincelin. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

k8s-ci-robot avatar Jun 05 '24 07:06 k8s-ci-robot

thank you @mlavacca, it's a lot clearer!

I am still working on the code based on your comments and I am trying to run the tests on an AKS with istio gateway or azure gateway but in both cases the tests end up in timeout. Is there something I am missing?

The tests seem to be stuck on this:

helpers.go:223: 2024-06-06T11:26:27.841628413+02:00: gateway-conformance-infra/gateway-add-listener Gateway not Accepted yet
    helpers.go:222: 2024-06-06T11:26:28.841559903+02:00: Accepted condition set to Status False with Reason Accepted, expected Status True
    helpers.go:222: 2024-06-06T11:26:28.841667255+02:00: Accepted was not in conditions list [[{Accepted False 1 2024-06-06 11:14:31 +0200 CEST Accepted Gateway does not have annotation to reference Application Gateway for Containers resource}]]

and I started the tests with

go test ./conformance -run TestConformance -args \
    --gateway-class=istio \ # or azure-alb-external
    --supported-features=Gateway,HTTPRoute,HTTPRouteBackendPathRedirect`

arnaud-tincelin avatar Jun 06 '24 12:06 arnaud-tincelin

Hey folks, just to give an update on this PR - this test can't really work currently as the feature is not yet implemented on the various Gateway API implementations.

I started to write the Cilium implementation: https://github.com/cilium/cilium/compare/main...tormath1:cilium:tormath1/backend-request-redirect-filter and I can get the test to pass with this (with one backend at the moment).

tormath1 avatar Jul 18 '24 16:07 tormath1

Thanks to @tormath1 to ping us in Cilium slack, and to highlight the potential issue with multiple backends in the current Cilium implementation 🙇.

sayboras avatar Jul 23 '24 02:07 sayboras

This one is in a similar situation as https://github.com/kubernetes-sigs/gateway-api/pull/2821. We'd need https://github.com/kubernetes-sigs/gateway-api/issues/3009 to be addressed before adding conformance tests on feature not implemented yet by any project.

mlavacca avatar Aug 19 '24 17:08 mlavacca

/ok-to-test

candita avatar Aug 27 '24 23:08 candita

I don't think there is any reason to delay conformance tests while waiting for implementations. The feature implementations and feature conformance testing can be done in parallel.

candita avatar Aug 27 '24 23:08 candita

  • imo the use case highlighted in the test is invalid - a backend shouldnt be needed when performing a redirect so a backend specific redirect doesnt make sense to me.
  • when traffic splitting to different backends, you may want to redirect some traffic, here a backend specific redirect filter does make sense
  • I'm a -1 on adding conformance tests for features that dont exist in implementations. The gateway api community is working towards a common vendor/project neutral API for features that exist in multiple implementations, so my suggestion is that we wait for multiple implementations to support a feature before supporting it in the API or conformance tests

arkodg avatar Aug 28 '24 01:08 arkodg

PR needs rebase.

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-sigs/prow repository.

k8s-ci-robot avatar Sep 04 '24 02:09 k8s-ci-robot

@arnaud-tincelin: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gateway-api-crds-validation-2 3874b65a91f3c436ee8a43d648597badda017f05 link true /test pull-gateway-api-crds-validation-2
pull-gateway-api-crds-validation-3 3874b65a91f3c436ee8a43d648597badda017f05 link true /test pull-gateway-api-crds-validation-3
pull-gateway-api-crds-validation-4 3874b65a91f3c436ee8a43d648597badda017f05 link true /test pull-gateway-api-crds-validation-4
pull-gateway-api-crds-validation-1 3874b65a91f3c436ee8a43d648597badda017f05 link true /test pull-gateway-api-crds-validation-1
pull-gateway-api-crds-validation-5 3874b65a91f3c436ee8a43d648597badda017f05 link true /test pull-gateway-api-crds-validation-5

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

k8s-ci-robot avatar Sep 10 '24 20:09 k8s-ci-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Oct 18 '24 13:10 k8s-triage-robot

@arnaud-tincelin thank you for your contribution, and for volunteering for a good-first-issue. I guess going forward it would be best to choose an issue that is for supporting a feature that is on its way to standard and has known working implementations. If you're interested in working on another conformance test, please take a look into https://github.com/kubernetes-sigs/gateway-api/issues/1579, which has a few tests needed to implement. I wrote an example/normative test https://github.com/kubernetes-sigs/gateway-api/pull/1587 for reference.

candita avatar Nov 07 '24 18:11 candita

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Dec 07 '24 18:12 k8s-triage-robot

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/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-sigs/prow repository.

k8s-ci-robot avatar Dec 07 '24 18:12 k8s-ci-robot