-
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
chore: simplify comparison and variable declaration #1209
Conversation
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #1209 +/- ##
==========================================
- Coverage 50.04% 50.02% -0.03%
==========================================
Files 143 143
Lines 19906 19892 -14
==========================================
- Hits 9962 9950 -12
+ Misses 8849 8847 -2
Partials 1095 1095
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -178,7 +175,8 @@ func (r *ReconcileBroadcastJob) Reconcile(_ context.Context, request reconcile.R | |||
addLabelToPodTemplate(job) | |||
|
|||
if IsJobFinished(job) { | |||
if isPast, leftTime := pastTTLDeadline(job); isPast { | |||
isPast, leftTime := pastTTLDeadline(job) |
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.
Why you need to change here?
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 wanted to write something like
if !isPast && leftTime>0 { return xxx }
klog.Infof(xxx)
...
return xxx
But I was not sure of its correctness, so I reverted it, but this modification was kept.
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zmberg 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 |
Ⅰ. Describe what this PR does
Simplify some code, mainly comparison and variable declaration.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
lint and test
Ⅳ. Special notes for reviews