-
Notifications
You must be signed in to change notification settings - Fork 275
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
Replace time.Now()
with clock.Clock.Now()
in pkg/workload/admissionchecks
#3900
base: main
Are you sure you want to change the base?
Replace time.Now()
with clock.Clock.Now()
in pkg/workload/admissionchecks
#3900
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: TusharMohapatra07 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 |
Hi @TusharMohapatra07. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
time.Now()
with clock.Clock.Now()
in pkg/workload/admissioncheckstime.Now()
with clock.Clock.Now()
in pkg/workload/admissionchecks
@mbobrovskyi Hey, can you please check if this was the refactor expected in |
/ok-to-test |
/cc |
@mbobrovskyi Actually, i haven't updated the tests yet. I just wanted to confirm if this is how you wanted me to fix the clock issue. I called clock to multiple levels. |
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.
Overall LGTM. Please fix tests.
@mbobrovskyi i updated the test. Now, i just have to figure out one thing kueue/cmd/importer/pod/import.go Line 202 in 6ac33de
Here, we have to pass clock. I tried adding clock argument to admitWorkload but couldn't find clock instance anywhere to pass it to the function
|
/retest |
Mmm. Initialize new instance of clock. |
and directly pass realClock ?? |
If it is using only one time than yes. |
/retest |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Replaces
time.Now()
to use the Now() function present insideclock
package.Which issue(s) this PR fixes:
Part of #3380
Special notes for your reviewer:
This PR is work-in-progress.