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

Cherry-pick two commits #461

Merged

Conversation

haiyanmeng
Copy link
Contributor

@haiyanmeng haiyanmeng commented Nov 1, 2021

No description provided.

Today, when a WaitTask timeout happens, the WaitTask sends the
TimeoutError on the TaskChannel. After receiving the TimeoutError,
`baseRunner.run` terminates immediately by returning the error to its
caller (Applier.Run or Destroyer.Run). The caller then sends the error
onto the EventChannel and terminates.

With this PR, when a WaitTask timeout happens, the WaitTask sends a
WaitType Event including the TimeoutError on the EventChannel, and then
sends an empty TaskResult on the TaskChannel. An empty TaskResult
suggests that the task finished successfully, and therefore
`baseRunner.run` would continue instead of terminate.

The motivation of this change is to make sure that cli-utils only
terminates on fatal errors (such as inventory-related errors, and
ApplyOptions creation errors). A WaitTask timeout may not always mean a
fatal error (it may happen because the StatusPoller has not finished
polling everything, or some but not all the resources have not reached
the desired status), and therefore should not terminate cli-utils.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 1, 2021
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 1, 2021
@haiyanmeng
Copy link
Contributor Author

/cc @mortent

@haiyanmeng
Copy link
Contributor Author

/test ?

@k8s-ci-robot
Copy link
Contributor

@haiyanmeng: No presubmit jobs available for kubernetes-sigs/cli-utils@release-0.26

In response to this:

/test ?

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.

@haiyanmeng
Copy link
Contributor Author

/test all

@k8s-ci-robot
Copy link
Contributor

@haiyanmeng: No presubmit jobs available for kubernetes-sigs/cli-utils@release-0.26

In response to this:

/test all

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.

@mortent
Copy link
Member

mortent commented Nov 2, 2021

I think you need to run make generate after you added the new WaitTask.

@seans3
Copy link
Contributor

seans3 commented Nov 2, 2021

I think you need to run make generate after you added the new WaitTask.

Usually best to just run make all before creating a PR, since it also formats, vets, and lints.

@haiyanmeng
Copy link
Contributor Author

/test all

@haiyanmeng haiyanmeng mentioned this pull request Nov 2, 2021
@haiyanmeng haiyanmeng changed the title Change the behavior of hanlding a WaitTask timeout Cherry-pick two commits Nov 2, 2021
@mortent
Copy link
Member

mortent commented Nov 2, 2021

/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 2, 2021
@seans3
Copy link
Contributor

seans3 commented Nov 2, 2021

/label tide/merge-method-squash
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Nov 2, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 2, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haiyanmeng, mortent, seans3

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 8e25286 into kubernetes-sigs:release-0.26 Nov 2, 2021
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants