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

Replace dummy client with fake client #1818

Conversation

tenzen-y
Copy link
Member

@tenzen-y tenzen-y commented May 31, 2023

What this PR does / why we need it:
I replaced dummy_client for reconciler with the fake client.
Our dummy_client implements client.Client interface and maintaining dummy_clinety is hard.
For example, controller runtime expands that interface since v0.14. And then, we faced unimplemented errors when we upgraded the controller runtime version.

#1817

 Error: test_job/reconciler.v1/test_job/test_job_reconciler.go:46:46: cannot use dummy_client (variable of type *DummyClient) as type client.Client in argument to common_reconciler.BareJobReconciler:
	*DummyClient does not implement client.Client (missing SubResource method)
Error: test_job/reconciler.v1/test_job/test_job_reconciler.go:49:46: cannot use dummy_client (variable of type *DummyClient) as type client.Client in argument to common_reconciler.BarePodReconciler:
	*DummyClient does not implement client.Client (missing SubResource method)
Error: test_job/reconciler.v1/test_job/test_job_reconciler.go:52:50: cannot use dummy_client (variable of type *DummyClient) as type client.Client in argument to common_reconciler.BareServiceReconciler:
	*DummyClient does not implement client.Client (missing SubResource method)

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

Checklist:

  • Docs included if any changes are user facing

@coveralls
Copy link

coveralls commented May 31, 2023

Pull Request Test Coverage Report for Build 5133143951

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 33.913%

Files with Coverage Reduction New Missed Lines %
pkg/controller.v1/mpi/mpijob_controller.go 2 77.5%
Totals Coverage Status
Change from base Build 5132051603: 0.2%
Covered Lines: 3336
Relevant Lines: 9837

💛 - Coveralls

@tenzen-y
Copy link
Member Author

/assign @johnugeorge

@tenzen-y
Copy link
Member Author

I found a new flaky test....

#1819

@tenzen-y tenzen-y force-pushed the replace-dummy-client-with-fake-client branch from 73d9f4f to 3d261c0 Compare May 31, 2023 12:57
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@tenzen-y tenzen-y force-pushed the replace-dummy-client-with-fake-client branch from 3d261c0 to e7e2dbf Compare May 31, 2023 12:59
@johnugeorge
Copy link
Member

Agree. Thanks @tenzen-y

/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label May 31, 2023
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johnugeorge, tenzen-y

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 0c3be5d into kubeflow:master May 31, 2023
21 checks passed
@tenzen-y tenzen-y deleted the replace-dummy-client-with-fake-client branch May 31, 2023 14:10
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