Skip to content

Conversation

@wgliang
Copy link
Contributor

@wgliang wgliang commented Oct 2, 2018

…/cache/fake

What this PR does / why we need it:

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

Special notes for your reviewer:
@misterikkit

Release note:

Move FakeCache to pkg/scheduler/internal/cache/fake.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 2, 2018
@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 2, 2018
@wgliang wgliang force-pushed the feature/move-fakecache branch from ba1f177 to 75f9373 Compare October 2, 2018 04:02
@shubheksha
Copy link
Contributor

/kind cleanup

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Oct 2, 2018
@timothysc
Copy link
Contributor

/assign @k82cn
/unassign @timothysc

@timothysc timothysc removed their request for review October 3, 2018 01:23
Copy link

@misterikkit misterikkit left a comment

Choose a reason for hiding this comment

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

I think you need to update the users to use the new import path.

@wgliang wgliang force-pushed the feature/move-fakecache branch from 75f9373 to e319f57 Compare October 6, 2018 15:56
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 6, 2018
@wgliang wgliang force-pushed the feature/move-fakecache branch from e319f57 to 558e196 Compare October 6, 2018 15:59
// FakeCache is used for testing
type FakeCache struct {
// Cache is used for testing
type Cache struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rewrite FakeCache to Cache for

Errors from golint:
pkg/scheduler/internal/cache/fake/fake_cache.go:26:6: type name will be used as fake.FakeCache by other packages, and that stutters; consider calling this Cache

@wgliang
Copy link
Contributor Author

wgliang commented Oct 6, 2018

/retest

@wgliang
Copy link
Contributor Author

wgliang commented Oct 7, 2018

/ping @misterikkit @k82cn @bsalamat

*/

package testing
package fake
Copy link
Member

Choose a reason for hiding this comment

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

Why not putting the file in scheduler/internal/cache instead of scheduler/internal/cache/fake?

Choose a reason for hiding this comment

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

Since the fake is meant for unit testing, we want a way to avoid importing it into production binaries. One way would be to call the file fake_test.go or we could just put it in a sub-package. Incidentally, this copies the convention from k8s.io/client-go/kubernetes/fake.

Copy link

@misterikkit misterikkit left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 8, 2018
@wgliang
Copy link
Contributor Author

wgliang commented Oct 9, 2018

/ping @k82cn Please take a look :)
for approve

@bsalamat
Copy link
Member

bsalamat commented Oct 9, 2018

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bsalamat, wgliang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 9, 2018
@wgliang
Copy link
Contributor Author

wgliang commented Oct 10, 2018

/retest

@k8s-ci-robot k8s-ci-robot merged commit d3fe0ea into kubernetes:master Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scheduler cleanup phase 1]: Move FakeCache to pkg/scheduler/internal/cache/fake

7 participants