kubeflow / common

Common APIs and libraries shared by other Kubeflow operator repositories.
Apache License 2.0
51 stars 73 forks source link

fix(expectation): more appropriate use of expectation #139

Closed eggiter closed 3 years ago

eggiter commented 3 years ago

More appropriate use of expectation:

  1. use RaiseExpectations in the code to accumulate expectations since SetExpectations has no such kind of ability. reset expectation in the beginning of ReconcileJobs;
  2. expected creation in more appropriate place;
  3. add "expectDeletion";

More detailed comments and explanations are presented with codes.

google-cla[bot] commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

eggiter commented 3 years ago

@googlebot I signed it!

google-cla[bot] commented 3 years ago

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

eggiter commented 3 years ago

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot I fixed it.

eggiter commented 3 years ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please assign terrytangyuan after the PR has been reviewed. You can assign the PR to them by writing /assign @terrytangyuan in a comment when ready.

The full list of commands accepted by this bot can be found 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

/assign @terrytangyuan @gaocegege

Jeffwan commented 3 years ago

@eggiter Thanks for the contribution. I am curious if you meet some problems in current expectation implementation? We can better help review the changes with more context

eggiter commented 3 years ago

@eggiter Thanks for the contribution. I am curious if you meet some problems in current expectation implementation? We can better help review the changes with more context

Detailed explanations are replied. The problems i encountered are, current implementation of "expectation" is reconciling or is waiting expectations are satisfied when there is no need to. reconciling when it should wait creation or deletion is observed, waiting when there is an error encountered and no object is created.

google-oss-robot commented 3 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jeffwan

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](https://github.com/kubeflow/common/blob/master/OWNERS)~~ [Jeffwan] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
Jeffwan commented 3 years ago

Seems @terrytangyuan and @gaocegege both approve the PR.

/lgtm