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

Misleading error message when cohort has no parent and have borrowingLimit #4392

Open
nasedil opened this issue Feb 25, 2025 · 1 comment · May be fixed by #4473
Open

Misleading error message when cohort has no parent and have borrowingLimit #4392

nasedil opened this issue Feb 25, 2025 · 1 comment · May be fixed by #4473
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@nasedil
Copy link
Contributor

nasedil commented Feb 25, 2025

What happened:
When defining a cohort that has no parent cohort and has borrowingLimit the following error message is shown:

admission webhook "vcohort.kb.io" denied the request: spec.resourceGroups[0].flavors[0].resources[0].borrowingLimit: Invalid value: "0": must be nil when cohort is empty

The message is misleading because clusterQueue object has cohort field for its parent cohort while cohort object has parent field for it's parent cohort. And the error message is same for both cases.
What you expected to happen:
The message could end with must be nil when parent is empty ormust be nil when parent cohort is empty.
How to reproduce it (as minimally and precisely as possible):
Applying the following YAML file:

---
apiVersion: kueue.x-k8s.io/v1beta1
kind: ResourceFlavor
metadata:
  name: pod-performance-resource-flavor
---
apiVersion: kueue.x-k8s.io/v1alpha1
kind: Cohort
metadata:
  name: test-cohort
spec:
  # there is no parent cohort
  # parent: ~
  resourceGroups:
    - coveredResources: ["pods"]
      flavors:
        - name: "pod-performance-resource-flavor"
          resources:
            - name: "pods"
              nominalQuota: 1
              borrowingLimit: 0
...

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): v1.31.5
  • Kueue version (use git describe --tags --dirty --always): v0.11.0-devel-244-gfd6a5206
  • Cloud provider or hardware configuration: GCP GKE
  • OS (e.g: cat /etc/os-release): Debian GNU/Linux
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@nasedil nasedil added the kind/bug Categorizes issue or PR as related to a bug. label Feb 25, 2025
@nasedil
Copy link
Contributor Author

nasedil commented Feb 25, 2025

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant