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

Add a metric that tracks the number of preemptions issued by a ClusterQueue #2538

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

vladikkuzn
Copy link
Contributor

@vladikkuzn vladikkuzn commented Jul 5, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Adds a metric that tracks the number of preemptions issued by a ClusterQueue

Which issue(s) this PR fixes:

Fixes #2491

Special notes for your reviewer:

NONE

Does this PR introduce a user-facing change?

Add preempted_workloads_total metric that tracks the number of preemptions issued by a ClusterQueue)

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@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. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 5, 2024
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 5, 2024
Copy link

netlify bot commented Jul 5, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 1948fed
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/66990f387fa37b0008168758

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jul 5, 2024
@vladikkuzn
Copy link
Contributor Author

/assign

@vladikkuzn
Copy link
Contributor Author

/test all

1 similar comment
@vladikkuzn
Copy link
Contributor Author

/test all

@vladikkuzn vladikkuzn marked this pull request as ready for review July 9, 2024 10:04
@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 Jul 9, 2024
@vladikkuzn
Copy link
Contributor Author

@alculquicondor
Copy link
Contributor

/cc

Copy link
Contributor

@gabesaba gabesaba left a comment

Choose a reason for hiding this comment

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

a few nits, looks good overall

test/util/util.go Outdated Show resolved Hide resolved
pkg/metrics/metrics_test.go Outdated Show resolved Hide resolved
pkg/metrics/metrics.go Outdated Show resolved Hide resolved
test/integration/scheduler/preemption_test.go Outdated Show resolved Hide resolved
pkg/metrics/metrics_test.go Outdated Show resolved Hide resolved
pkg/scheduler/preemption/preemption.go Outdated Show resolved Hide resolved
pkg/metrics/metrics.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 10, 2024
@alculquicondor
Copy link
Contributor

/release-note-edit

Add preempted_workloads_total metric that tracks the number of preemptions issued by a ClusterQueue)

Use the name of the user facing metric, as opposed to the variable name.

@vladikkuzn
Copy link
Contributor Author

/retest

@alculquicondor
Copy link
Contributor

Please rebase

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 12, 2024
@vladikkuzn vladikkuzn force-pushed the preemptions_metric branch 2 times, most recently from 8bfe17f to aaf0922 Compare July 16, 2024 15:05
@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 Jul 16, 2024
Copy link
Contributor

@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.

These changes look good, but looking at the test updates, I realized that there is a bug in #2411 (comment)

@alculquicondor alculquicondor mentioned this pull request Jul 16, 2024
26 tasks
Copy link
Contributor

@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.

I think this needs a rebase now.

@vladikkuzn vladikkuzn force-pushed the preemptions_metric branch 2 times, most recently from 9671166 to 0d0b087 Compare July 17, 2024 20:43
…rQueue

* Merge metric for preempted workloads into ReportPreemption
* test helper
* Expect all preemption reasons
Copy link
Contributor

@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.

/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 Jul 18, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 340b99ae81b7cd714303bfc87dbc6b2c4d03cfb1

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Jul 18, 2024
@k8s-ci-robot k8s-ci-robot merged commit 693e1f1 into kubernetes-sigs:main Jul 18, 2024
16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.8 milestone Jul 18, 2024
@vladikkuzn vladikkuzn deleted the preemptions_metric branch July 18, 2024 14:16
@alculquicondor
Copy link
Contributor

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 18, 2024
kannon92 pushed a commit to openshift-kannon92/kubernetes-sigs-kueue that referenced this pull request Nov 19, 2024
…rQueue (kubernetes-sigs#2538)

* Add a metric that tracks the number of preemptions issued by a ClusterQueue

* Metric for preempted workloads

* Add a metric that tracks the number of preemptions issued by a ClusterQueue

* Merge metric for preempted workloads into ReportPreemption
* test helper
* Expect all preemption reasons
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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 a metric that tracks the number of preemptions issued by a ClusterQueue
5 participants