test: add unit test for jobset controller
issue from https://github.com/kubernetes-sigs/jobset/issues/476 It's a bit embarrassing. I accidentally deleted the PR during synchronization and resubmitted a new one. Sorry. When there is rebase, I don’t know how to do it, and I often close the submission.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: googs1025 Once this PR has been reviewed and has the lgtm label, please assign danielvegamyhre for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Hi @googs1025. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
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/test-infra repository.
Deploy Preview for kubernetes-sigs-jobset canceled.
| Name | Link |
|---|---|
| Latest commit | 96fdbd24c0458ed9d459d58a7b568719ad963f17 |
| Latest deploy log | https://app.netlify.com/sites/kubernetes-sigs-jobset/deploys/662baff29528d60009af0571 |
When there is rebase, I don’t know how to do it, and I often close the submission.
No worries! I will take a look at this tomorrow.
/ok-to-test
@googs1025 I am refactoring createJobs() to make it more testable in https://github.com/kubernetes-sigs/jobset/pull/496 since right now this function does a lot things unrelated to creating jobs (enforcing startup policy rules, suspend/resume, etc.) which makes it harder to unit test thoroughly.
This will make it easier for you to write the tests, and easier for me to review them as well.
I added some preliminary notes on some of your test in the meantime.
@danielvegamyhre Thank you for your response. I will update the content of this PR after you merge your pr.
Maybe this PR can wait until @danielvegamyhre these PRs https://github.com/kubernetes-sigs/jobset/pull/496 https://github.com/kubernetes-sigs/jobset/pull/494 are merged before I make new changes.
We can prioritize handling this PR https://github.com/kubernetes-sigs/jobset/pull/490 first.
We can prioritize handling this PR #490 first.
Sounds good I will take a look at #490 again
/hold
until comments addressed
@googs1025 I am refactoring createJobs() to make it more testable in #496 since right now this function does a lot things unrelated to creating jobs (enforcing startup policy rules, suspend/resume, etc.) which makes it harder to unit test thoroughly.
This will make it easier for you to write the tests, and easier for me to review them as well.
I added some preliminary notes on some of your test in the meantime.
The refactor is complete, feel free to resume this PR
@danielvegamyhre Okay, I plan to spend some time next week working on this PR
@googs1025 Ok please submit PRs with tests for only 1 function at a time, so that it is easier to review.
@googs1025: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| pull-jobset-verify-main | 96fdbd24c0458ed9d459d58a7b568719ad963f17 | link | true | /test pull-jobset-verify-main |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
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/test-infra repository. I understand the commands that are listed here.
@googs1025 are you still working on this?
@googs1025 are you still working on this?
Yes, I have been quite busy with work recently. I will start this PR next week. thanks for reminding
Just following up on this @googs1025, do you still plan to finish this?
Just following up on this @googs1025, do you still plan to finish this? @danielvegamyhre Sorry, maybe I can let this issue go, I have other things with higher priority to do