Skip to content

cleanup(scheduler): move metric labels to metrics package#116312

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
sanposhiho:move-label
Mar 12, 2023
Merged

cleanup(scheduler): move metric labels to metrics package#116312
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
sanposhiho:move-label

Conversation

@sanposhiho
Copy link
Copy Markdown
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

move metric labels to metrics package.

Which issue(s) this PR fixes:

follow up: #115082 (comment)

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

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


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 6, 2023
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Details

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 the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Mar 6, 2023
@sanposhiho
Copy link
Copy Markdown
Member Author

/cc @alculquicondor

@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 6, 2023
Copy link
Copy Markdown
Member

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

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

/approve

Comment thread pkg/scheduler/metrics/metrics.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add a comment for which label these are used.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggestion: I would prefer to add a new block to group them together and add one comment at the top, these comments added below seems just repetitive.

// Blow are label values for corresponding framework extension points.
const (
	PreFilter = "PreFilter"
	Filter = "Filter"
         ...
)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

👍

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, sanposhiho

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 Mar 6, 2023
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 6, 2023
@sanposhiho
Copy link
Copy Markdown
Member Author

sanposhiho commented Mar 6, 2023

Both places aren't using preFilter and Filter though 🤔

https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/116312/pull-kubernetes-e2e-kind/1632866461603074048

k8s.io/kubernetes/pkg/scheduler/framework/runtime
pkg/scheduler/framework/runtime/framework.go:605:60: undefined: preFilter
pkg/scheduler/framework/runtime/framework.go:723:60: undefined: Filter

@sanposhiho
Copy link
Copy Markdown
Member Author

/retest

@sanposhiho
Copy link
Copy Markdown
Member Author

Hmm I have no idea why it fails.
/pkg/scheduler/framework/runtime/framework.go#L605 on the 224bd566a5c1cec1366f7f4f16dc68d84dd2558d isn't using preFilter.

https://github.com/kubernetes/kubernetes/blob/224bd566a5c1cec1366f7f4f16dc68d84dd2558d/pkg/scheduler/framework/runtime/framework.go#L605

@kerthcet
Copy link
Copy Markdown
Member

kerthcet commented Mar 9, 2023

The error seems unlikely, let me try again :)
/retest

@kerthcet
Copy link
Copy Markdown
Member

kerthcet commented Mar 9, 2023

Maybe related to the test-infra. 🤔

@sanposhiho
Copy link
Copy Markdown
Member Author

sanposhiho commented Mar 9, 2023

Just pushed another commit, may fix this weird failing. Let's see..

@alculquicondor
Copy link
Copy Markdown
Member

There seem to be compilation errors:

W0309 05:34:27.612] pkg/scheduler/framework/runtime/framework.go:605:60: undefined: preFilter
W0309 05:34:27.612] pkg/scheduler/framework/runtime/framework.go:723:60: undefined: Filter

@sanposhiho
Copy link
Copy Markdown
Member Author

sanposhiho commented Mar 9, 2023

the weirdness here is no place (including framework.go#L605) isn't using preFilter actually in the commit 417cf8f.

@alculquicondor
Copy link
Copy Markdown
Member

rebase?

@sanposhiho sanposhiho force-pushed the move-label branch 2 times, most recently from 834acde to 4265879 Compare March 9, 2023 17:07
@alculquicondor
Copy link
Copy Markdown
Member

@sanposhiho
Copy link
Copy Markdown
Member Author

I see, so those jobs are running after rebasing on the latest master....

@sanposhiho
Copy link
Copy Markdown
Member Author

/retest

@kerthcet
Copy link
Copy Markdown
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 Mar 12, 2023
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: f9b4e262c071238d5f439fc5ba2fbd44417b81d0

@k8s-ci-robot k8s-ci-robot merged commit e413e6a into kubernetes:master Mar 12, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.27 milestone Mar 12, 2023
@alculquicondor
Copy link
Copy Markdown
Member

I see, so those jobs are running after rebasing on the latest master....

Yes, otherwise we couldn't be sure that this PR doesn't break top-of-tree.

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. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. 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.

4 participants