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

Refeactored framework deployment utils #76978

Merged

Conversation

alejandrox1
Copy link
Contributor

@alejandrox1 alejandrox1 commented Apr 24, 2019

xref: #76206

Signed-off-by: Jorge Alarcon Ochoa alarcj137@gmail.com

What type of PR is this?

/kind cleanup

What this PR does / why we need it:
Refactor and cleanup e2e framework deployment utils
xref: #76206

Special notes for your reviewer:
This is intended to be the beginning of the refactoring of framework/deployment_utils.go into framework/deployment.

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 24, 2019
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 24, 2019
@alejandrox1
Copy link
Contributor Author

/area e2e-test-framework
/area test
/sig testing

@alejandrox1 alejandrox1 force-pushed the framework-deployment-refactor branch from 15ae9ae to 05ad399 Compare April 24, 2019 02:27
@k8s-ci-robot k8s-ci-robot added the sig/apps Categorizes an issue or PR as relevant to SIG Apps. label Apr 24, 2019
@alejandrox1 alejandrox1 force-pushed the framework-deployment-refactor branch from 05ad399 to d4d0592 Compare April 24, 2019 02:32
@cblecker
Copy link
Member

/uncc
Don't have the bandwidth to review this at the moment.

/cc @andrewsykim
Do you have specific reviewers helping with this effort, Andrew?

@k8s-ci-robot k8s-ci-robot requested review from andrewsykim and removed request for cblecker April 24, 2019 02:43
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

LGTM @alejandrox1
if you are ready with this we can remove the WIP.

first run ./hack/update-bazel.sh
and include the resulted changes using git add...

then look at these failures:

test/e2e/apps/deployment.go:324:20: undefined: framework.UpdateDeploymentWithRetries
test/e2e/apps/deployment.go:466:20: undefined: framework.UpdateDeploymentWithRetries
test/e2e/apps/deployment.go:539:21: undefined: framework.UpdateDeploymentWithRetries
test/e2e/apps/deployment.go:685:22: undefined: framework.UpdateDeploymentWithRetries
test/e2e/apps/deployment.go:695:22: undefined: framework.UpdateDeploymentWithRetries
test/e2e/apps/deployment.go:706:22: undefined: framework.UpdateDeploymentWithRetries
test/e2e/apps/deployment.go:715:23: undefined: framework.UpdateDeploymentWithRetries
test/e2e/apps/deployment.go:722:23: undefined: framework.UpdateDeploymentWithRetries
test/e2e/apps/deployment.go:759:21: undefined: framework.UpdateDeploymentWithRetries
test/e2e/apps/deployment.go:865:20: undefined: framework.UpdateDeploymentWithRetries
test/e2e/apps/deployment.go:865:20: too many errors
# k8s.io/kubernetes/test/e2e/upgrades/apps
test/e2e/upgrades/apps/deployments.go:86:20: undefined: framework.UpdateDeploymentWithRetries
test/e2e/upgrades/apps/deployments.go:162:11: undefined: framework.UpdateDeploymentWithRetries

try building the suite locally with those commands i gave you on slack.
when done git add all fixes and force push your commit to the remote branch.

@neolit123
Copy link
Member

/unassign timothysc
until WIP is done.

xref: kubernetes#76206

Signed-off-by: Jorge Alarcon Ochoa <alarcj137@gmail.com>
@alejandrox1 alejandrox1 force-pushed the framework-deployment-refactor branch from d4d0592 to 8200ae6 Compare April 24, 2019 23:28
@alejandrox1
Copy link
Contributor Author

Thank you so much for all of your comments @neolit123 I'm feeling a lot more comfortable getting into the framework.

I opened this pr based on the comments of #76800. Please tell me if it makes more sense to do multiple small PRs to refactor framework/deployment_util.go into framework/deployment or if it would be better for me to try and do it all at once. My thinking is that small changes are easier to review but it may not be such a big deal for others who are a lot more familiar with the code.

@alejandrox1 alejandrox1 changed the title WIP Refeactored framework deployment utils Refeactored framework deployment utils Apr 25, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 25, 2019
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

thank you for the update @alejandrox1

I opened this pr based on the comments of #76800. Please tell me if it makes more sense to do multiple small PRs to refactor framework/deployment_util.go into framework/deployment or if it would be better for me to try and do it all at once. My thinking is that small changes are easier to review but it may not be such a big deal for others who are a lot more familiar with the code.

i think this current PR is a good example in terms of size vs contents.
PRs like this one are preferred instead of many lines of changes.

thanks
/priority backlog
/approve

@k8s-ci-robot k8s-ci-robot added priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 25, 2019
@neolit123
Copy link
Member

/lgtm
/assign @timothysc

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 25, 2019
@oomichi
Copy link
Member

oomichi commented Apr 25, 2019

@alejandrox1

Hello,

I opened this pr based on the comments of #76800. Please tell me if it makes more sense to do multiple small PRs to refactor framework/deployment_util.go into framework/deployment or if it would be better for me to try and do it all at once. My thinking is that small changes are easier to review but it may not be such a big deal for others who are a lot more familiar with the code.

Does the above comment mean we will have more PRs which move all remaining code of test/e2e/framework/deployment_util.go into a new path?
When I checked this PR at the first look, I was confused because this PR just moves one function.
It is better to mention about that on the PR message which mean we have more TODOs.

The code itself seems good for me anyways.

@alejandrox1
Copy link
Contributor Author

Hi @oomichi

Does the above comment mean we will have more PRs which move all remaining code of test/e2e/framework/deployment_util.go into a new path?
When I checked this PR at the first look, I was confused because this PR just moves one function.
It is better to mention about that on the PR message which mean we have more TODOs.

Thank you for your comment. I added some more context into the PR message.
I wanted to begin with one just one function to get some feedback on whether this is would be the optimal way of refactoring framework/deployment_util.go and I was also doubtful about the appropriate number of changes that I should commit in order to make reviewing easy.

)

// UpdateDeploymentWithRetries updates the specified deployment with retries.
func UpdateDeploymentWithRetries(c clientset.Interface, namespace, name string, applyUpdate testutils.UpdateDeploymentFunc) (*apps.Deployment, error) {
Copy link
Member

Choose a reason for hiding this comment

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

what about all the other functions under deployment_util?

@timothysc
Copy link
Member

meh, I'll approve and keep on trucking.

However I'd prefer in the future to bundle shuffling together in complete units.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alejandrox1, neolit123, timothysc

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 Apr 26, 2019
@k8s-ci-robot k8s-ci-robot merged commit 62219e1 into kubernetes:master Apr 26, 2019
@alejandrox1 alejandrox1 deleted the framework-deployment-refactor branch May 1, 2019 16:15
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/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework 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/backlog Higher priority than priority/awaiting-more-evidence. release-note-none Denotes a PR that doesn't merit a release note. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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.

None yet

6 participants