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

Implement Cohort Webhook #2982

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Conversation

gabesaba
Copy link
Contributor

@gabesaba gabesaba commented Sep 4, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Implements Cohort Webhook, allowing users to create Cohort API objects. Part of #79

Special notes for your reviewer:

Additional changes are needed in cache and queue before the hierarchical functionality is complete. In the current state, we have implemented first-class Cohorts: Cohorts which provide resources directly, not just from lending ClusterQueues.

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 Sep 4, 2024
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 4, 2024
Copy link

netlify bot commented Sep 4, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 84574cc
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/66e169b351c379000809c917

@gabesaba
Copy link
Contributor Author

gabesaba commented Sep 5, 2024

/assign @macsko

@alculquicondor
Copy link
Contributor

Should we have that release note?

It was already possible to create cohorts since #2693

@gabesaba
Copy link
Contributor Author

gabesaba commented Sep 5, 2024

Should we have that release note?

It was already possible to create cohorts since #2693

Is it an option for me to write a large release note which covers all of the HierarchicalCohort changes? Then, we can link all of the relevant pull requests to it in the 0.9 release

@alculquicondor
Copy link
Contributor

Is it an option for me to write a large release note which covers all of the HierarchicalCohort changes?

I actually prefer that. Or somehow preface all the changes with one common string, so that the release notes script puts them next to each other.

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.

/approve

Comment on lines 119 to 121
var allErrs field.ErrorList
allErrs = append(allErrs, ValidateClusterQueue(newObj)...)
return allErrs
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
var allErrs field.ErrorList
allErrs = append(allErrs, ValidateClusterQueue(newObj)...)
return allErrs
return ValidateClusterQueue(newObj)

Or just remove the function. I think we used to have mutability checks before, but now everything is editable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to the suggestion, rather than removing. I think we still want validation, to make sure the values make sense upon update?

pkg/webhooks/cohort_webhook.go Outdated Show resolved Hide resolved
pkg/webhooks/cohort_webhook.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 5, 2024
@gabesaba gabesaba force-pushed the webhook branch 2 times, most recently from 3b0b662 to 38396d5 Compare September 11, 2024 09:49
@alculquicondor
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@alculquicondor
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 11, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 58635506a3e9a7203d7c8353edd25590a4f49821

@k8s-ci-robot k8s-ci-robot merged commit d433197 into kubernetes-sigs:main Sep 11, 2024
16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.9 milestone Sep 11, 2024
@gabesaba gabesaba deleted the webhook branch September 11, 2024 14:37
@gabesaba
Copy link
Contributor Author

/release-note-none

Only attaching release note to a single PR, where we define the API #2693

@k8s-ci-robot
Copy link
Contributor

@gabesaba: you can only set the release note label to release-note-none if the release-note block in the PR body text is empty or "none".

In response to this:

/release-note-none

Only attaching release note to a single PR, where we define the API #2693

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-sigs/prow repository.

@gabesaba
Copy link
Contributor Author

/release-note-edit

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Sep 20, 2024
kannon92 pushed a commit to openshift-kannon92/kubernetes-sigs-kueue that referenced this pull request Nov 19, 2024
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-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants