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

properly configure appwrapper webhooks #4163

Merged
merged 6 commits into from
Feb 6, 2025

Conversation

dgrove-oss
Copy link
Contributor

@dgrove-oss dgrove-oss commented Feb 6, 2025

What type of PR is this?

/kind bug

What this PR does / why we need it:

Adds the kubebuilder directives to properly configure the AppWrapper webhooks.
This should have been part of #3953.

Which issue(s) this PR fixes:

Special notes for your reviewer:

No release notes because we haven't made a release with appwrapper. The release note from #3953 is sufficient.

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 6, 2025
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 6, 2025
Copy link

netlify bot commented Feb 6, 2025

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit fa1a7cf
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/67a517049570bb0008d4bbb6

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

@tenzen-y
Copy link
Member

tenzen-y commented Feb 6, 2025

/kind feature

This integration has not been released, yet. So we can consider this as just followup of #3953

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 6, 2025
@mimowo
Copy link
Contributor

mimowo commented Feb 6, 2025

What is the user-facing change of the webhooks? It would be great to cover that in e2e or integration tests. I'm ok with a follow up if you tested manually.

@tenzen-y
Copy link
Member

tenzen-y commented Feb 6, 2025

What is the user-facing change of the webhooks? It would be great to cover that in e2e or integration tests. I'm ok with a follow up if you tested manually.

I think that the integration tests are enough in this case. The objective for webhook tests aim to verify if webhooks are correctly configured (mostly manifests and kubebuilder markers). It seems that AppWrapper does not have specific webhook as I can see https://github.com/kubernetes-sigs/kueue/tree/main/pkg/controller/jobs/appwrapper

@dgrove-oss
Copy link
Contributor Author

dgrove-oss commented Feb 6, 2025

What is the user-facing change of the webhooks? It would be great to cover that in e2e or integration tests. I'm ok with a follow up if you tested manually.

I'm working on the integration test now as suggested by @tenzen-y . Should only take about an hour.
I didn't do it before because for its Kueue webhook AppWrapper just instantiates the BaseWebook (so the core functionality is tested already). But we do need to test exactly the thing I forgot to do in my original PR... that the webhook actually gets registered correctly.

For AppWrapper users, there is no change. With Kueue 0.10 this code runs in the external webhook (installed with AppWrapper controller). In Kueue 0.11 it runs in Kueue's webhook and is disabled by configuration in the AppWrapper controller's webhook.

@kannon92
Copy link
Contributor

kannon92 commented Feb 6, 2025

Could we follow a simple pattern that we do for pod/deployment/statefulset?

If we don't use AppWrapper in our framework, could we ignore the webhooks?

@dgrove-oss
Copy link
Contributor Author

Could we follow a simple pattern that we do for pod/deployment/statefulset?

If we don't use AppWrapper in our framework, could we ignore the webhooks?

We should use the same pattern as all enabled-by-default frameworks that aren't Kinds that are part core Kubernetes. Ie, no difference between AppWrapper or RayCluster, or PyTorchJob.

@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 Feb 6, 2025
@dgrove-oss
Copy link
Contributor Author

dgrove-oss commented Feb 6, 2025

integration test added.

it's not the most direct way to find it, but the reason I found this problem in the first place is my e2e multikueue tests in #3992 were failing because the webhook is responsible for defaulting managedBy and it wasn't running on the appwrapper the test created on the master node.

Copy link
Contributor

@mimowo mimowo left a comment

Choose a reason for hiding this comment

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

Impl LGTM, left some comments to the test.

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

Thank you!
/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 Feb 6, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: f272a51a4b3ce64a56fff60169b74be7aeb94b3d

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgrove-oss, tenzen-y

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 Feb 6, 2025
@k8s-ci-robot k8s-ci-robot merged commit 4b7758c into kubernetes-sigs:main Feb 6, 2025
18 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.11 milestone Feb 6, 2025
@dgrove-oss dgrove-oss deleted the aw-webhook branch February 6, 2025 20:50
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/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.

5 participants