pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Inconsistency with wait.PollImmediate and WaitForEndpointState

Open Shashankft9 opened this issue 3 years ago • 9 comments

/area test-and-release /kind bug

Expected Behavior

wait.PollImmediate should keep on polling if I pass response checkers through WaitForEndpointState https://github.com/knative/pkg/blob/main/test/request.go#L78 until the state is reached or timeout happens.

Actual Behavior

Since the response checkers for example: https://github.com/knative/pkg/blob/main/test/spoof/response_checks.go#L33 returns true or error, it makes wait.PollImmediate stop polling, that is - only the first endpoint state is checked.

Additional Info

Apologies if I am reading the code wrong, but if this really is an inconsistency, I think the return should be changed to false, nil (in the statuscode check function as well), this makes sense according to me because anyway WaitForEndpointState is the only function which is propogating the response checkers to the Poll method, for CheckEndpointState its defaulted to true, nil and it makes sense because this method's scope is to just check once. If this reasoning makes sense, I can create a PR.

Shashankft9 avatar Jan 31 '22 07:01 Shashankft9

cc @julz

Shashankft9 avatar Jan 31 '22 07:01 Shashankft9

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar May 02 '22 01:05 github-actions[bot]

/remove-lifecycle stale

Shashankft9 avatar May 02 '22 05:05 Shashankft9

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Aug 01 '22 01:08 github-actions[bot]

/remove-lifecycle stale

Shashankft9 avatar Aug 02 '22 12:08 Shashankft9

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Nov 01 '22 01:11 github-actions[bot]

This issue or pull request is stale because it has been open for 90 days with no activity.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close

/lifecycle stale

knative-prow-robot avatar Dec 01 '22 02:12 knative-prow-robot

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Mar 02 '23 01:03 github-actions[bot]

/lifecycle frozen

dprotaso avatar Mar 02 '23 04:03 dprotaso