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

Extract separate package for core/utils.go and split into multiple files. #2407

Merged
merged 2 commits into from
Oct 22, 2019

Conversation

losipiuk
Copy link
Contributor

@losipiuk losipiuk commented Oct 1, 2019

This PR extracts uitls.go from core package to separate utils package. The motivation for that is the size of core package. Is humongous which hinders maintenance. Expect subsequent refactors in the area.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 1, 2019
@k8s-ci-robot k8s-ci-robot requested review from Jeffwan and piosz October 1, 2019 14:41
@losipiuk losipiuk force-pushed the lo/scale-down-cleanup-1 branch from 77eaf9c to d4cc12d Compare October 1, 2019 14:44
@losipiuk losipiuk force-pushed the lo/scale-down-cleanup-1 branch from d4cc12d to 7f083d2 Compare October 22, 2019 12:23

var (
// NodeConditionTaints lists taint keys used as node conditions
NodeConditionTaints = TaintKeySet{
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: does it need to be exported? It's never used outside the package

@aleksandra-malinowska
Copy link
Contributor

Two thoughts (non-blocking):

  1. Not sure what is the reason for moving some used-in-one-place-and-very-specific-functions into utils (e.g. filterOutExpendableAndSplit) while moving some such functions from utils (e.g. fixNodeGroupSize), i.e. what are the criteria for where each of them should live. But as there wasn't much order before, I don't mind either way.
  2. This PR is very large, with one commit changing 1.7k lines of code total. It's one thing to sanity-check where the functions move, but it's very hard to verify that they weren't modified, and that the net difference (~100 loc) is only due to moving code around (imports, boilerplate etc.) In the future, can we have smaller PRs?

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aleksandra-malinowska

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 Oct 22, 2019
@k8s-ci-robot k8s-ci-robot merged commit 7118ea8 into kubernetes:master Oct 22, 2019
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/cluster-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants