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

Refactor CSI Translation Library into a struct that is injected into various components to simplify unit testing #82683

Merged
merged 1 commit into from
Sep 29, 2019

Conversation

davidz627
Copy link
Contributor

@davidz627 davidz627 commented Sep 13, 2019

Fixes: #82670

An example of a unit test possible with this new struct: kubernetes-csi/external-provisioner#343

/kind cleanup
/priority important-soon
/sig storage
/assign @ddebroy @jsafrane @msau42
/cc @ddebroy @leakingtapan @saad-ali @shanesiebken

NONE

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Sep 13, 2019
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/storage Categorizes an issue or PR as relevant to SIG Storage. labels Sep 13, 2019
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 13, 2019
@k8s-ci-robot
Copy link
Contributor

@davidz627: GitHub didn't allow me to request PR reviews from the following users: shanesiebken.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

An example of a unit test possible with this new struct: kubernetes-csi/external-provisioner#343
/kind cleanup
/priority important-soon
/sig storage
/assign @ddebroy @jsafrane @msau42
/cc @ddebroy @leakingtapan @saad-ali @shanesiebken

NONE

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.

@k8s-ci-robot k8s-ci-robot added area/kubelet area/test sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Sep 13, 2019
Copy link
Member

@ddebroy ddebroy left a comment

Choose a reason for hiding this comment

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

This is great! Couple of comments

pkg/volume/util/operationexecutor/operation_generator.go Outdated Show resolved Hide resolved
pkg/volume/util/operationexecutor/operation_generator.go Outdated Show resolved Hide resolved
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.

This PR mostly LGTM. I think I will have more comments/opinions on the fake impl of the translator interface. I'll leave those comments on your WIP PR.

staging/src/k8s.io/csi-translation-lib/translate.go Outdated Show resolved Hide resolved
cmd/kube-controller-manager/app/core.go Outdated Show resolved Hide resolved
pkg/controller/volume/expand/expand_controller.go Outdated Show resolved Hide resolved
pkg/kubelet/kubelet_node_status_test.go Outdated Show resolved Hide resolved
pkg/volume/util/operationexecutor/operation_generator.go Outdated Show resolved Hide resolved
pkg/volume/util/operationexecutor/operation_generator.go Outdated Show resolved Hide resolved
@davidz627
Copy link
Contributor Author

@misterikkit @jsafrane @ddebroy Thanks for your reviews! I've updated the PR, PTAL

@davidz627 davidz627 force-pushed the fix/translationStruct branch 2 times, most recently from 523c447 to 1e85565 Compare September 17, 2019 18:22
@davidz627
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce-100-performance

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 Sep 19, 2019
@davidz627
Copy link
Contributor Author

/assign @saad-ali @jsafrane @mikedanese
for approval

Copy link
Member

@saad-ali saad-ali left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 27, 2019
@davidz627
Copy link
Contributor Author

/assign @ahg-g @Huang-Wei
for scheduler approval

@Huang-Wei
Copy link
Member

/approve
on the scheduling part.

You have to make CI happy:

pkg/scheduler/algorithm/predicates/csi_volume_predicate.go:34:6: exported type InTreeToCSITranslator should have comment or be unexported

…various components to simplify unit testing in future
@davidz627
Copy link
Contributor Author

/retest

@mikedanese
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidz627, Huang-Wei, mikedanese, saad-ali

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 29, 2019
@mikedanese
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 29, 2019
@k8s-ci-robot k8s-ci-robot merged commit 14e5adf into kubernetes:master Sep 29, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Sep 29, 2019
@davidz627 davidz627 deleted the fix/translationStruct branch September 30, 2019 17:56
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. area/kubelet area/test 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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Mock Driver to csi translation library to support unit testing
10 participants