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

TAS: allow to dump the usage of domains for TAS ResourceFlavors #4295

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vladikkuzn
Copy link
Contributor

@vladikkuzn vladikkuzn commented Feb 18, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

Allows to dump the free capacity of TAS snapshots per domain.

Which issue(s) this PR fixes:

Fixes #3493

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 18, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vladikkuzn
Once this PR has been reviewed and has the lgtm label, please assign mimowo for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Feb 18, 2025
Copy link

netlify bot commented Feb 18, 2025

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit 0ddfb24
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/67beeb9b862a7f0008bf49d2
😎 Deploy Preview https://deploy-preview-4295--kubernetes-sigs-kueue.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@vladikkuzn
Copy link
Contributor Author

/cc @mimowo

@k8s-ci-robot k8s-ci-robot requested a review from mimowo February 18, 2025 09:00
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 19, 2025
@vladikkuzn vladikkuzn requested a review from gabesaba February 20, 2025 09:40
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 20, 2025
@vladikkuzn vladikkuzn force-pushed the dump-the-usage-of-domains branch from 07d2aec to 95d34c0 Compare February 20, 2025 09:43
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 20, 2025
@vladikkuzn
Copy link
Contributor Author

/test all

@vladikkuzn
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 25, 2025
@vladikkuzn
Copy link
Contributor Author

/test pull-kueue-verify-main

log.Info("TAS Snapshot Free Capacity",
"clusterQueue", cqName,
"resourceFlavor", tasFlavor,
"freeCapacityPerDomain", tasSnapshot.FreeCapacityPerDomain(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Please verify that this log line works properly when running integration test, and that is not affected by #4137. There is no need to write a new integration test, unless this path is not covered. We only want to make sure that this line is output properly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is how it looks now: 2025/02/26 10:38:20 INFO TAS Snapshot Free Capacity freeCapacityPerDomain="map[domain1:map[cpu:2000 memory:4294967296 nvidia.com/gpu:1] domain2:map[cpu:1000 memory:2147483648]]"

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we pretty print these? 4294967296, 2147483648 is hard for humans to read

Try this function

func ResourceQuantityString(name corev1.ResourceName, v int64) string {
rq := ResourceQuantity(name, v)
return rq.String()
}

@vladikkuzn vladikkuzn force-pushed the dump-the-usage-of-domains branch from 95d34c0 to 6da5f7c Compare February 26, 2025 08:41
@vladikkuzn vladikkuzn force-pushed the dump-the-usage-of-domains branch from 6da5f7c to 0ddfb24 Compare February 26, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TAS: allow to dump the usage of domains for TAS ResourceFlavors
3 participants