-
Notifications
You must be signed in to change notification settings - Fork 699
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
reconcileTFJobs is always triggered even with no update #796
Conversation
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. |
CLAs look good, thanks! |
Travis tests have failedHey @jian-he, 2nd Buildgometalinter --config=linter_config.json --vendor ./...
3rd Buildgometalinter --config=linter_config.json --vendor ./...
|
Travis tests have failedHey @jian-he, 2nd Buildgometalinter --config=linter_config.json --vendor ./...
3rd Buildgometalinter --config=linter_config.json --vendor ./...
|
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase and try again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gaocegege, ScorpioCPH 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 |
@jian-he can you please explain this change? I think running reconcile periodically is highly desirable as this ensures the job is correctly running. For example, by calling reconcile periodically we ensure that if any pods are interrupted we will detect this and take corrective action. I don't think we want to depend on getting an event for all possible changes as we could easily miss a change. I think one of the design principles for K8s controllers is that they are level set. This means we want to periodically check that everything is in the expected state and if not take corrective action. I think this PR prevents that because on each call to reconcile we won't do anything because the resource version hasn't changed, so we won't actually check that everything is in the expected state. |
I agree with @jlewi If we somehow miss taking complete action on an update event(may be an transient error or a return), this PR will skip further reconciliation. |
I think if any pods' states are changed, the reversion of TFJob will be updated, so we catch this immediately. |
old and current (https://github.com/kubeflow/tf-operator/blob/master/pkg/controller.v2/tfcontroller/tfjob.go#L66) are provided by the upstream. I feel, there is always a chance that controller may have missed updates or prior actions failed. In such cases, we won't take further actions since resource versions are same |
@jlewi @gaocegege @johnugeorge @ScorpioCPH |
Found that reconcileTFJobs continuously gets triggered even with no update.
This patch fixes that
This change is