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 "Programmed" Gateway condition, move "Ready" to extended conformance #1499

Merged
merged 8 commits into from
Nov 11, 2022

Conversation

LCaparelli
Copy link
Contributor

What type of PR is this?
/kind feature
/kind api-change

What this PR does / why we need it: Make necessary changes to Gateway and Listener conditions in order to implement GEP-1364.

Which issue(s) this PR fixes:

Fixes #1454

Does this PR introduce a user-facing change?:

Added "Programmed" Gateway and Listener conditions, moved "Ready" to extended conformance

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 1, 2022
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 1, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @LCaparelli. 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 Nov 1, 2022
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 @LCaparelli! This mostly LGTM, would appreciate a review from @youngnick as well though.

apis/v1alpha2/gateway_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/gateway_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/gateway_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/gateway_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/gateway_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/gateway_types.go Show resolved Hide resolved
@robscott
Copy link
Member

robscott commented Nov 2, 2022

/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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 2, 2022
Copy link
Contributor

@youngnick youngnick left a comment

Choose a reason for hiding this comment

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

The API changes look great, but I think there's quite a bit more work to do to update all the conformance tests.

@LCaparelli, did you want to round out the conformance test updates in this PR, or should one of us do it in a follow-up?

apis/v1alpha2/gateway_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/gateway_types.go Show resolved Hide resolved
@youngnick youngnick added this to the v0.6.0 milestone Nov 7, 2022
@LCaparelli
Copy link
Contributor Author

@youngnick, @robscott thanks for the review!

@LCaparelli, did you want to round out the conformance test updates in this PR, or should one of us do it in a follow-up?

Oh, I kinda just searched for usages of ListenerReasonReady and GatewayConditionReady consts and replaced them, it's what I understood from the original issue's:

Update all conformance tests that check the "Ready" Gateway or Listener condition to check "Programmed" instead.

Am I missing other places where this is checked but is not using the consts? Or did you mean something else?

If you mean other tests that were not initially in the issue's scope I'm happy to help and can either do it here or in a follow-up.

@youngnick
Copy link
Contributor

Thanks for the update @LCaparelli!

Hmm, I just went and checked, and I was thinking of this function call:

// GatewayAndHTTPRoutesMustBeReady waits until the specified Gateway has an IP
// address assigned to it and the Route has a ParentRef referring to the
// Gateway. The test will fail if these conditions are not met before the
// timeouts.
func GatewayAndHTTPRoutesMustBeReady(t *testing.T, c client.Client, timeoutConfig config.TimeoutConfig, controllerName string, gw GatewayRef, routeNNs ...types.NamespacedName) string {

But it turns out that's actually already checking for Accepted instead, so is misnamed. Would you be able to tidy that up please?

Additionally, it looks like this function needs an update:

// NamespacesMustBeReady waits until all Pods and Gateways in the provided
// namespaces are marked as ready. This will cause the test to halt if the
// specified timeout is exceeded.
func NamespacesMustBeReady(t *testing.T, c client.Client, timeoutConfig config.TimeoutConfig, namespaces []string) {

It's looking for the Gateway to be Ready , but we're not using the constant, just the string Ready. May be worth a case-sensitive search for Ready as well to find any other uses in the conformance/ directory.

Sorry to be picky, but I want to make sure we squash all the Ready references in one go.

@LCaparelli
Copy link
Contributor Author

Yup, no worries at all @youngnick! Thanks for the additional pointers, I'll take a more thorough look

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 10, 2022
Signed-off-by: Lucas Caparelli <lucas.caparelli@gympass.com>
@LCaparelli
Copy link
Contributor Author

@youngnick @robscott I think I got it all covered this time, please take a look at the last 4 commits when you can. Thanks again for the guidance!

@youngnick
Copy link
Contributor

I can't see anything else this time, nice work @LCaparelli. I'll approve and let @robscott or @shaneutt do the final LGTM.

This is the one that will break v0.5.1 conformance though, i think.

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 11, 2022
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.

Looks good, couple small language nits.

apis/v1alpha2/gateway_types.go Outdated Show resolved Hide resolved
apis/v1beta1/gateway_types.go Outdated Show resolved Hide resolved
Signed-off-by: Lucas Caparelli <lucas.caparelli@gympass.com>
@LCaparelli
Copy link
Contributor Author

Thanks @shaneutt, fixed!

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.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 11, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LCaparelli, shaneutt, youngnick

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 merged commit aa8994f into kubernetes-sigs:main Nov 11, 2022
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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. 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
None yet
Development

Successfully merging this pull request may close these issues.

Add "Programmed" Gateway condition, move "Ready" to extended conformance
5 participants