-
Notifications
You must be signed in to change notification settings - Fork 554
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
Add WaitForFinishedJobs measurement #1976
Conversation
Sorry, I should have added a WIP notice. Thank you for your quick reviews. The PR is now ready. I have renamed |
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.
Only small nit comments, except for that lgtm.
spec: | ||
containers: | ||
- name: {{.Name}} | ||
image: bash |
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 suspect that this config is just example for this new measurement and you plan to change it later, right?
If we plan to change batch/config.yaml later and add more replicas etc it would be nice to use image stored in gcr. This one is downloaded from docker hub so we might have problem with rate limiting + it's better to add tag of image so each node doesn't need to download image multiple times.
Also do yu plan to change it later to sleep instead of exit?
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.
Yes, I plan to change this to a proper load test. But I still would like to have this merged as it serves as proof that the measurement works.
I will request to upload an image soon. I was told I need to verify the license. I might create a simple go code that just exits, otherwise.
I don't think we need sleep for now, although that could be an argument for the command.
} else { | ||
delete(w.finishedJobs, key) | ||
} | ||
w.lock.Unlock() |
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 you move it up and do defer w.lock.Unlock()
?
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
failed++ | ||
} | ||
} | ||
w.lock.Unlock() |
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.
Let's add defer
here too and move it up.
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
clusterFramework *framework.Framework | ||
cancel context.CancelFunc | ||
lock sync.Mutex | ||
finishedJobs map[string]batchv1.JobConditionType |
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 you add comment that this lock is used for accessing finishedJobs map?
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
47d3970
to
4aee4f5
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.
squashed
clusterFramework *framework.Framework | ||
cancel context.CancelFunc | ||
lock sync.Mutex | ||
finishedJobs map[string]batchv1.JobConditionType |
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
failed++ | ||
} | ||
} | ||
w.lock.Unlock() |
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
} else { | ||
delete(w.finishedJobs, key) | ||
} | ||
w.lock.Unlock() |
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
4aee4f5
to
76d35d1
Compare
76d35d1
to
e50ce64
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, marseel 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 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds a WaitForCompletedJobs measurement and a placeholder test.
Which issue(s) this PR fixes:
Part of #799
kubernetes/enhancements#2214 and kubernetes/enhancements#2879
Special notes for your reviewer:
Does this PR introduce a user-facing change?: