-
Notifications
You must be signed in to change notification settings - Fork 771
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
fix ejob nil pointer bug #1016
fix ejob nil pointer bug #1016
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1016 +/- ##
==========================================
+ Coverage 49.64% 49.66% +0.01%
==========================================
Files 124 124
Lines 12078 12078
==========================================
+ Hits 5996 5998 +2
+ Misses 5166 5164 -2
Partials 916 916
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -255,7 +255,9 @@ func (r *ReconcileEphemeralJob) filterPods(job *appsv1alpha1.EphemeralJob) ([]*v | |||
continue | |||
} | |||
|
|||
if len(targetPods) < int(*job.Spec.Replicas) { | |||
if job.Spec.Replicas == nil { | |||
targetPods = append(targetPods, &podList.Items[i]) |
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.
gofmt: File is not gofmt
-ed with -s
Reply with "@sonatype-lift help" for info about LiftBot commands.
Reply with "@sonatype-lift ignore" to tell LiftBot to leave out the above finding from this PR.
Reply with "@sonatype-lift ignoreall" to tell LiftBot to leave out all the findings from this PR and from the status bar in Github.
When talking to LiftBot, you need to refresh the page to see its response. Click here to get to know more about LiftBot commands.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
7f47cd8
to
4de129c
Compare
4de129c
to
e5f2d54
Compare
Signed-off-by: JunjunLi <junjunli666@gmail.com>
e5f2d54
to
1b32918
Compare
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FillZpp 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 |
Signed-off-by: JunjunLi <junjunli666@gmail.com> Signed-off-by: Liu Zhenwei <zwliu@thoughtworks.com>
Ⅰ. Describe what this PR does
fix ejob nil pointer.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
ejob controller will not panic if
ejob.spec.replicas
not set.Ⅳ. Special notes for reviews