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

add expectation-related functions for other resources used in mpi-controller #1484

Merged
merged 3 commits into from
Dec 15, 2021

Conversation

zw0610
Copy link
Member

@zw0610 zw0610 commented Nov 25, 2021

fix issues related to controller logic from comment #1457 (review)

@zw0610 zw0610 changed the title fix comments for mpi-controller WIP fix comments for mpi-controller Nov 25, 2021
@terrytangyuan terrytangyuan marked this pull request as draft November 25, 2021 06:31
@coveralls
Copy link

coveralls commented Nov 25, 2021

Pull Request Test Coverage Report for Build 1581041831

  • 29 of 36 (80.56%) changed or added relevant lines in 1 file are covered.
  • 248 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+3.7%) to 27.75%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controller.v1/mpi/mpijob_controller.go 29 36 80.56%
Files with Coverage Reduction New Missed Lines %
pkg/apis/pytorch/validation/validation.go 2 91.67%
pkg/apis/tensorflow/v1/openapi_generated.go 13 0%
pkg/apis/xgboost/v1/openapi_generated.go 13 0%
pkg/apis/mxnet/v1/openapi_generated.go 14 0%
pkg/controller.v1/pytorch/pytorchjob_controller.go 49 61.65%
pkg/controller.v1/mpi/mpijob_controller.go 157 75.35%
Totals Coverage Status
Change from base Build 1493027296: 3.7%
Covered Lines: 1703
Relevant Lines: 6137

💛 - Coveralls

@zw0610 zw0610 marked this pull request as ready for review November 25, 2021 11:51
@zw0610 zw0610 changed the title WIP fix comments for mpi-controller fix comments for mpi-controller Nov 26, 2021
@zw0610 zw0610 changed the title fix comments for mpi-controller fix controller-related comments for mpijob Nov 26, 2021
@zw0610
Copy link
Member Author

zw0610 commented Nov 30, 2021

Hi @Jeffwan and @terrytangyuan , this pull request mainly focus on the expectation things with mpi-operator.

I understand the importance of expectation for controllers when implemented without controller-runtime. With the training-operator fully built on kubebuilder, do we still need expectation related logic?

This question amplifies with mpi-controller.v1 because unlike other controllers, mpi-controller.v1 utilizes and watches Kubernetes resources besides Pod and Service, making the existing expectation functions insufficient to deal with. While I made some generic expectation functions in this pull request, I'm also thinking if they are redundant.

WDYT?

Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

LGTM in general. Just a couple of minor grammatical suggestions. Could you also update the PR title and description to reflect the changes?

commonv1 "github.com/kubeflow/common/pkg/apis/common/v1"
"github.com/kubeflow/common/pkg/controller.v1/common"
Copy link
Member

Choose a reason for hiding this comment

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

Are we not checking the import order in the CI? If not, we should probably add.

Copy link
Member Author

@zw0610 zw0610 Dec 15, 2021

Choose a reason for hiding this comment

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

I think not. The imports are formatted by goimports, which seems not good enough in this case. Just opened a new issue to track this.

pkg/controller.v1/mpi/mpijob_controller.go Outdated Show resolved Hide resolved
pkg/controller.v1/mpi/mpijob_controller.go Outdated Show resolved Hide resolved
zw0610 and others added 2 commits December 15, 2021 11:31
Co-authored-by: Yuan Tang <terrytangyuan@gmail.com>
Co-authored-by: Yuan Tang <terrytangyuan@gmail.com>
@zw0610 zw0610 changed the title fix controller-related comments for mpijob add expectation-related functions for other resources used in mpi-controller Dec 15, 2021
Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

Thanks!

/lgtm
/approve

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: terrytangyuan, zw0610

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:
  • OWNERS [terrytangyuan,zw0610]

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 b51bfda into kubeflow:master Dec 15, 2021
@zw0610 zw0610 deleted the fix-mpi-controller branch June 20, 2022 04:42
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.

None yet

3 participants