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

Fix CEL validation for listener uniqueness #2370

Merged
merged 2 commits into from
Sep 4, 2023

Conversation

frankbu
Copy link
Contributor

@frankbu frankbu commented Sep 1, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:
CEL validation not handling missing listener hostname corectly.

Which issue(s) this PR fixes:

Fixes #2369

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 1, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @frankbu. 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 1, 2023
@frankbu frankbu changed the title Fix CEL validation for listner uniqueness Fix CEL validation for listener uniqueness Sep 1, 2023
@robscott
Copy link
Member

robscott commented Sep 1, 2023

Thanks @frankbu! Can you add corresponding test(s) in https://github.com/kubernetes-sigs/gateway-api/blob/main/pkg/test/cel/gateway_test.go to ensure this fixes the bug?

@robscott
Copy link
Member

robscott commented Sep 1, 2023

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 1, 2023
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 1, 2023
@frankbu
Copy link
Contributor Author

frankbu commented Sep 1, 2023

@robscott I added a test, but am wondering if the CEL tests getting run? I don't see them in https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_gateway-api/2370/pull-gateway-api-test/1697659277918867456

@robscott
Copy link
Member

robscott commented Sep 1, 2023

@frankbu good question! This is decidedly not intuitive, but even though those are go tests, they require a k8s cluster with CRDs installed to be present, so these tests actually are installed in hack/verify-crds-kind.sh. The test results start around line 151 in the output of the verify test run: https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_gateway-api/2370/pull-gateway-api-verify/1697659277851758592. All tests passed. Will defer to someone else for LGTM, but I think this should fix it.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: frankbu, robscott

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

The pull request process is described 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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 1, 2023
@howardjohn
Copy link
Contributor

howardjohn commented Sep 1, 2023 via email

@gauravkghildiyal
Copy link
Member

Thanks @frankbu.
LGTM

@youngnick
Copy link
Contributor

Thanks for this @frankbu.

/lgtm

@howardjohn, if you can find that package, we should probably create an issue to update this script-based arrangement to something better. (I also have #2362 open to make some changes to it for the YAML-based invalid example tests)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 4, 2023
@k8s-ci-robot k8s-ci-robot merged commit 90a3c72 into kubernetes-sigs:main Sep 4, 2023
9 checks passed
@robscott robscott added this to the v0.8.1 milestone Sep 7, 2023
@robscott
Copy link
Member

robscott commented Sep 7, 2023

/cherry-pick release-0.8

@k8s-infra-cherrypick-robot

@robscott: new pull request created: #2379

In response to this:

/cherry-pick release-0.8

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
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GatewaySpec Listener CEL block empty Hostname if similar Listeners also present
7 participants