-
Notifications
You must be signed in to change notification settings - Fork 972
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
Do not create jobs until pg inqueue #634
Conversation
Travis tests have failedHey @hzxuzhonghu, TravisBuddy Request Identifier: 7892a720-2580-11ea-8c31-f79bb2699b7f |
Travis tests have failedHey @hzxuzhonghu, TravisBuddy Request Identifier: bb33d390-2587-11ea-8c31-f79bb2699b7f |
Hey @hzxuzhonghu, TravisCI finished with status TravisBuddy Request Identifier: 297d5e80-262c-11ea-8748-5b98fb6aa2de |
@k82cn Please let me know if this make sense to you, so i can decide if i should work on fixing ci. Otherwise, i can close it. |
Hey @hzxuzhonghu, TravisCI finished with status TravisBuddy Request Identifier: fa441a60-2639-11ea-8748-5b98fb6aa2de |
Hey @hzxuzhonghu, TravisCI finished with status TravisBuddy Request Identifier: 82fd7fe0-26bc-11ea-b014-cf6d669622bf |
Hey @hzxuzhonghu, TravisCI finished with status TravisBuddy Request Identifier: 7e535060-26ca-11ea-b014-cf6d669622bf |
I am pretty sure the e2e is flaky |
Hey @hzxuzhonghu, TravisBuddy Request Identifier: 863b5810-2704-11ea-9fe8-03452f69915b |
if job, err = cc.createJob(job); err != nil { | ||
return err | ||
// Skip job initiation if job is already accepted | ||
if job.Status.State.Phase == "" || job.Status.State.Phase == batch.Pending || job.Status.State.Phase == batch.Restarting { |
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.
add isInitialized
func for this check.
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.
done
} | ||
} | ||
var syncTask bool | ||
if pg, _ := cc.pgLister.PodGroups(job.Namespace).Get(job.Name); pg != nil { |
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.
can we check this in handler?
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.
I am not sure i am understanding what you mean. My thought is to split the SyncJob function: the first phase is initialization and the second phase is sync.
LGTM overall :) /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hzxuzhonghu, k82cn 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 |
Hey @hzxuzhonghu, TravisBuddy Request Identifier: 1cd97940-2d41-11ea-a185-6fb6d15019ed |
/lgtm |
Fixes: #621