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

In waiting for ready, watch falls back to polling. #491

Merged
merged 7 commits into from
Nov 20, 2019

Conversation

sixolet
Copy link
Contributor

@sixolet sixolet commented Nov 9, 2019

Fixes #325

Add a new way of using a polling function to generate a watch.Interface(), and fall back to that if the server doesn't support watch. Not every knative server supports watch.

@sixolet sixolet added this to the v0.11.0 milestone Nov 9, 2019
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 9, 2019
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@sixolet: 3 warnings.

In response to this:

Fixes #325

Add a new way of using a polling function to generate a watch.Interface(), and fall back to that if the server doesn't support watch. Not every knative server supports watch.

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.

pkg/wait/poll_watcher.go Show resolved Hide resolved
pkg/wait/poll_watcher.go Outdated Show resolved Hide resolved
pkg/wait/poll_watcher_test.go Show resolved Hide resolved
@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 9, 2019
@sixolet
Copy link
Contributor Author

sixolet commented Nov 9, 2019

The test issue is some go.sum checksum mismatch I'm not sure how to resolve.

@rhuss
Copy link
Contributor

rhuss commented Nov 11, 2019

@sixolet please rebase on master, I've fixed that.

@rhuss
Copy link
Contributor

rhuss commented Nov 11, 2019

/retest

1 similar comment
@sixolet
Copy link
Contributor Author

sixolet commented Nov 11, 2019

/retest

Copy link
Collaborator

@navidshaikh navidshaikh left a comment

Choose a reason for hiding this comment

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

lgtm, just a few nits

Type: watch.Added,
Object: new,
}
} else if !(ok1 && ok2) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we separate the if check for err, ok1 and ok2 ? (OR may be a nested switch)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried it that way, and it was less clear and more error prone, so I returned it to this way.

pkg/wait/poll_watcher.go Outdated Show resolved Hide resolved
pkg/wait/wait_for_ready.go Show resolved Hide resolved
@navidshaikh
Copy link
Collaborator

/retest

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-client-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/wait/poll_watcher.go Do not exist 58.2%
pkg/wait/wait_for_ready.go 71.6% 70.5% -1.1

@navidshaikh
Copy link
Collaborator

/retest

@navidshaikh navidshaikh mentioned this pull request Nov 20, 2019
Copy link
Collaborator

@navidshaikh navidshaikh left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 20, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: navidshaikh, sixolet

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:
  • OWNERS [navidshaikh,sixolet]

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

@knative-prow-robot knative-prow-robot merged commit e07b5a9 into knative:master Nov 20, 2019
dsimansk pushed a commit to dsimansk/client that referenced this pull request Oct 20, 2020
while setting up serving/eventing
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. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. 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.

Polling watcher option
6 participants