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

Add a conformance test that checks adding and removing listeners #1827

Merged

Conversation

mmamczur
Copy link
Contributor

What type of PR is this?

/kind test
/area conformance

What this PR does / why we need it:

Adds a conformance test that tests adding and removing listeners.
#1607

Which issue(s) this PR fixes:

Fixes #1607

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/test area/conformance 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 Mar 16, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @mmamczur. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 16, 2023
@shaneutt shaneutt changed the title Add a conformance test that cecks adding and removing listeners. Add a conformance test that checks adding and removing listeners Mar 16, 2023
@mmamczur mmamczur force-pushed the conformance-modify-listeners branch from 68318e1 to a69d9e4 Compare March 16, 2023 14:03
Copy link
Member

@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

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

Looking good! thanks for working on this.

I have a few minor comments.

conformance/tests/gateway-modify-listeners.go Outdated Show resolved Hide resolved
conformance/tests/gateway-modify-listeners.go Outdated Show resolved Hide resolved
// Sanity check
kubernetes.GatewayMustHaveLatestConditions(t, original)

all := v1beta1.NamespacesFromAll
Copy link
Member

@shaneutt shaneutt Mar 16, 2023

Choose a reason for hiding this comment

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

comment-only: In the future with kubernetes/utils#269, this kind of thing will start being much easier without clutter. But that is neither here nor there 🤷

conformance/tests/gateway-modify-listeners.go Outdated Show resolved Hide resolved
conformance/tests/gateway-modify-listeners.go Outdated Show resolved Hide resolved
conformance/tests/gateway-modify-listeners.go Outdated Show resolved Hide resolved
conformance/tests/gateway-modify-listeners.go Outdated Show resolved Hide resolved
conformance/tests/gateway-modify-listeners.go Outdated Show resolved Hide resolved
conformance/tests/gateway-modify-listeners.go Outdated Show resolved Hide resolved
conformance/tests/gateway-modify-listeners.go Outdated Show resolved Hide resolved
@mmamczur mmamczur force-pushed the conformance-modify-listeners branch from a69d9e4 to acbf79e Compare March 16, 2023 14:56
@shaneutt shaneutt 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 Mar 16, 2023
@shaneutt shaneutt added this to the v0.7.0 milestone Mar 16, 2023
@shaneutt shaneutt self-requested a review March 16, 2023 15:18
Copy link
Member

@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

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

Looking good thank you.

These conformance tests often end up needing a couple people with different implementations to check them over to tease everything out, I'm approving but I'll leave the lgtm for someone else 👍

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mmamczur, shaneutt

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 Mar 16, 2023
@mmamczur mmamczur force-pushed the conformance-modify-listeners branch from acbf79e to 39d2885 Compare March 16, 2023 17:18
@mmamczur
Copy link
Contributor Author

/retest

fixed imports formatting

Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks @mmamczur! This mostly LGTM, would appreciate some reviews from other implementers as well before merging though.

conformance/tests/gateway-modify-listeners.go Outdated Show resolved Hide resolved
@mmamczur mmamczur force-pushed the conformance-modify-listeners branch from 39d2885 to bf8543b Compare March 17, 2023 07:57
@dprotaso
Copy link
Contributor

I think there are some implementations out there that could struggle with arbitrary port numbers.

Limiting the listener ports to '80' and '443' is pretty reductive. This feature should support arbitrary port numbers.

@robscott
Copy link
Member

Limiting the listener ports to '80' and '443' is pretty reductive. This feature should support arbitrary port number

I think that's a separate discussion. I'm not opposed to tests that cover different/arbitrary ports, but I think that should be the explicit purpose of those tests. It's possible that an implementation may support adding listeners but not the full set of possible ports, I'd like to ensure those two concepts are disconnected in test results.

@robscott
Copy link
Member

Thanks @mmamczur!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 17, 2023
@k8s-ci-robot k8s-ci-robot merged commit bb97afe into kubernetes-sigs:main Mar 17, 2023
4 checks passed
@dprotaso
Copy link
Contributor

dprotaso commented Mar 17, 2023

The intent of the issue was to support arbitrary ports/listeners because there are implementations that only listen on port 80 and 443.

From: #1586 (comment)

well I may be misspeaking a little, but at the very least Contour doesn't let you configure multiple HTTP or HTTPS Listeners, only one port is allowed for each at the moment

@robscott
Copy link
Member

The intent of the issue was to support arbitrary ports/listeners because there are implementations that only listen on port 80 and 443.

Sorry, the arbitrary ports detail wasn't clear to me from the issue this PR fixes. I've filed #1842 as a follow up, let me know if I missed anything.

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. area/conformance cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/test 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Conformance test to exercise adding multiple listeners
5 participants