Skip to content
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

[SDK] Unit tests for TrainingClient APIs - get_job_pod_names and update_job #2192

Merged

Conversation

YosiElias
Copy link
Contributor

What this PR does / why we need it:
New unit test for get_job_pod_names and update_job functions

Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):
Fixes #2161

Checklist:

  • Docs included if any changes are user facing

@coveralls
Copy link

coveralls commented Aug 1, 2024

Pull Request Test Coverage Report for Build 10511367867

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.009%) to 33.477%

Totals Coverage Status
Change from base Build 10284610088: -0.009%
Covered Lines: 3950
Relevant Lines: 11799

💛 - Coveralls

@YosiElias
Copy link
Contributor Author

can someone pls review this PR?
@andreyvelich @jinchihe @kuizhiqing

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review @YosiElias!
Please take a look
/assign @droctothorpe @kubeflow/wg-training-leads @Electronic-Waste

Comment on lines 21 to 24
LIST_RESPONSE = [
{"metadata": {"name": "Dummy V1PodList-1"}},
{"metadata": {"name": "Dummy V1PodList-2"}},
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you want to change it ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to test and present the possibility of returning more than one name (I can remove this case if you think its unnecessary)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andreyvelich is it fine by you to keep this case?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest keep it as it is for old tests, since in that case we don't need to introduce SimpleNamespace from typing module.

"valid flow with 2 pods",
{
"name": TEST_NAME,
"namespace": "2_pods",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to use different namespaces here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above, this is kind of flag for this case with 2 names

@YosiElias YosiElias requested a review from andreyvelich August 19, 2024 08:15
@andreyvelich
Copy link
Member

Hi @YosiElias! Did you get a chance to check my comment here: #2192 (comment) ?
I think after that we should be ready to merge this PR.

@YosiElias
Copy link
Contributor Author

Hi @andreyvelich! Sorry for the delay, I was busy with other things.
As you suggested I changed the 2 pod case (and dropped the use of SimpleNamespace) , if there are any additional comments I would love to hear them.
Thank you very much for your comments!

Signed-off-by: yelias <[email protected]>
@andreyvelich
Copy link
Member

Overall, looks good, thank you for doing this @YosiElias!
Please fix the pre-commit, so we can merge it.
/assign @droctothorpe @kubeflow/wg-training-leads

Signed-off-by: yelias <[email protected]>
@YosiElias YosiElias requested a review from andreyvelich August 22, 2024 15:53
Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update @YosiElias!
/lgtm
/approve

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 6900714 into kubeflow:master Aug 22, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SDK] Add more unit tests for TrainingClient APIs
3 participants