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

conformance: allow error status in Route #1152

Merged

Conversation

howardjohn
Copy link
Contributor

Fixes #1135

This changes tests to assert their is either no parent at all, or a
non-accepted parent (indicating an error message, presumably).

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 9, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @howardjohn. 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 9, 2022
@k8s-ci-robot k8s-ci-robot requested review from thockin and youngnick May 9, 2022 20:02
@robscott
Copy link
Member

robscott commented May 9, 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. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 9, 2022
Copy link
Contributor

@skriss skriss left a comment

Choose a reason for hiding this comment

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

LGTM other than one comment nit

@@ -177,6 +177,41 @@ func WaitForGatewayAddress(t *testing.T, client client.Client, gwName types.Name
return net.JoinHostPort(ipAddr, port), waitErr
}

// HTTPRouteMustHaveParents waits for the specified HTTPRoute to have either no parents
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// HTTPRouteMustHaveParents waits for the specified HTTPRoute to have either no parents
// HTTPRouteMustHaveNoAcceptedParents waits for the specified HTTPRoute to have either no parents

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 @howardjohn! Mostly LGTM, just a couple nits.

conformance/utils/kubernetes/helpers.go Outdated Show resolved Hide resolved

var actual []v1alpha2.RouteParentStatus
waitFor := time.Duration(seconds) * time.Second
waitErr := wait.PollImmediate(1*time.Second, waitFor, func() (bool, error) {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not really sure what the solution is here, but this seems like something that could accidentally pass if a controller just hadn't gotten around to populating status yet. I hate to add delay for the sake of delay, but maybe we need to wait a few seconds before accepting len(actual) == 0 as a successful result. If status is populated that seems sufficient to pass immediately, but not quite sure about the lack of conditions resulting in an immediate pass.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added a delay only in this case

Fixes kubernetes-sigs#1135

This changes tests to assert their is either no parent at all, or a
non-accepted parent (indicating an error message, presumably).
@howardjohn howardjohn force-pushed the conformance/route-error branch from 1aeacae to 9e21fa4 Compare May 12, 2022 15:26
@robscott
Copy link
Member

Thanks!

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: howardjohn, 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 lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 12, 2022
@k8s-ci-robot k8s-ci-robot merged commit 89285d1 into kubernetes-sigs:master May 12, 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/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. 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.

Conformance tests should allow an error state in Route Parent status
4 participants