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

move function GetKubemarkMasterComponentResoureUsage and remove long-time TODO #87271

Merged
merged 1 commit into from Jan 17, 2020
Merged

move function GetKubemarkMasterComponentResoureUsage and remove long-time TODO #87271

merged 1 commit into from Jan 17, 2020

Conversation

tanjunchen
Copy link
Member

@tanjunchen tanjunchen commented Jan 16, 2020

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Which issue(s) this PR fixes:

ref:#86763

Special notes for your reviewer:
see #87271 (comment)
/cc @neolit123
/cc @oomichi

Does this PR introduce a user-facing change?:

None

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

None

@k8s-ci-robot k8s-ci-robot added 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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 Jan 16, 2020
@tanjunchen
Copy link
Member Author

/priority backlog
/release-note-none

@k8s-ci-robot k8s-ci-robot added priority/backlog Higher priority than priority/awaiting-more-evidence. 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-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 16, 2020
return sshResult.Stdout, nil
}

// getKubemarkMasterComponentsResourceUsage returns the resource usage of kubemark which contains multiple combinations of cpu and memory usage for each pod name.
Copy link
Member Author

Choose a reason for hiding this comment

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

see https://github.com/kubernetes/kubernetes/pull/87271/files#diff-b498843cdcc70479a96c0cfffc6290afL44

This TODO from https://github.com/kubernetes/kubernetes/pull/38507/files#diff-b498843cdcc70479a96c0cfffc6290afR31 4 years ago.
GetKubemarkMasterComponentsResourceUsage is only used by https://github.com/kubernetes/kubernetes/pull/87271/files#diff-572985ec546140c5cf2bc24658132e83R187
so make it private.

For

TODO: figure out how to move this to kubemark directory (need to factor test SSH out of e2e framework

I think that it is good time to re-examine and evaluate this TODO

if someone wishes to write a separate proposal for this work, please create an issue or TODO(@github) named to this function, We can easily track this down

@tanjunchen tanjunchen changed the title move function GetKubemarkMasterComponentResoureUsage move function GetKubemarkMasterComponentResoureUsage and remove long-time TODO Jan 16, 2020
@@ -556,3 +557,65 @@ func (g *ContainerResourceGatherer) StopAndSummarize(percentiles []int, constrai
}
return &summary, nil
}

// KubemarkResourceUsage is a struct for tracking the resource usage of kubemark.
type KubemarkResourceUsage struct {
Copy link
Member

Choose a reason for hiding this comment

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

can this structure become private

kubemarkResourceUsage?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes . sorry forget it

@@ -183,7 +184,7 @@ type resourceGatherWorker struct {
func (w *resourceGatherWorker) singleProbe() {
data := make(ResourceUsagePerContainer)
if w.inKubemark {
kubemarkData := GetKubemarkMasterComponentsResourceUsage()
kubemarkData := getKubemarkMasterComponentsResourceUsage()
Copy link
Member

Choose a reason for hiding this comment

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

i think the move is fine, but IMO in the future kubemark specifics should be outside of the framework and in a new package:
test/e2e/scalability

Copy link
Member Author

Choose a reason for hiding this comment

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

sure.

TODO: move this to test/e2e/scalability see https://github.com/kubernetes/kubernetes/pull/87271#discussion_r367217336

We can explain this here.How about it?

Copy link
Member

Choose a reason for hiding this comment

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

lets not add the TODO just yet.

i would like to see what others think about the new proposed location and decoupling the framework from kubemark.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok

@neolit123
Copy link
Member

/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 Jan 17, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: neolit123, tanjunchen

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 Jan 17, 2020
@k8s-ci-robot k8s-ci-robot merged commit 02ac661 into kubernetes:master Jan 17, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Jan 17, 2020
@tanjunchen tanjunchen deleted the move-function-GetKubemarkMasterComponentResoureUsage branch January 17, 2020 04:35
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/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.

None yet

3 participants