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

Using patch/apply on update pods. #2074

Conversation

mbobrovskyi
Copy link
Contributor

@mbobrovskyi mbobrovskyi commented Apr 26, 2024

What type of PR is this?

/kind bug
/kind feature

What this PR does / why we need it:

Using patch/apply on update pods.

Which issue(s) this PR fixes:

Fixes #2056

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Pod Integration: Use PATCH updates for pods. This fixes support for Pods when using the latest features in Kubernetes v1.29

@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. kind/bug Categorizes issue or PR as related to a bug. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/feature Categorizes issue or PR as related to a new feature. labels Apr 26, 2024
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 26, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @mbobrovskyi. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 26, 2024
Copy link

netlify bot commented Apr 26, 2024

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit f96e2eb
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/662b6b0aaae7b000089ad1ed
😎 Deploy Preview https://deploy-preview-2074--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.

@trasc
Copy link
Contributor

trasc commented Apr 26, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 26, 2024
@trasc
Copy link
Contributor

trasc commented Apr 26, 2024

/test all

@mbobrovskyi mbobrovskyi marked this pull request as ready for review April 26, 2024 15:24
@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 Apr 26, 2024
@mbobrovskyi
Copy link
Contributor Author

/cc @alculquicondor

"sigs.k8s.io/controller-runtime/pkg/client"
)

func CreatePatch(before, after client.Object) (client.Patch, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you remove the similar function in the workload package?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean this one dddbf3d? I didn't found it.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh sorry, @gabesaba just experimented with it but we didn't merge it :)

@alculquicondor
Copy link
Contributor

/lgtm
/approve
/retest

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

LGTM label has been added.

Git tree hash: dcff22d9687f8cb0ff1dd34a8f2b2aa4d8e8797f

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Apr 26, 2024
@alculquicondor
Copy link
Contributor

/release-note-edit
/kind bug

Use PATCH updates for pods. This fixes support for Pods when using the latest features in Kubernetes v1.29

@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 Apr 26, 2024
@tenzen-y
Copy link
Member

@alculquicondor Could we cherry pick this to 0.6?

@k8s-ci-robot k8s-ci-robot merged commit 6516ada into kubernetes-sigs:main Apr 26, 2024
15 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.7 milestone Apr 26, 2024
@alculquicondor
Copy link
Contributor

/cherry-pick release-0.6

@k8s-infra-cherrypick-robot

@alculquicondor: #2074 failed to apply on top of branch "release-0.6":

Applying: Using patch/apply on update pods.
Using index info to reconstruct a base tree...
M	pkg/controller/jobs/pod/pod_controller.go
M	pkg/controller/jobs/pod/pod_controller_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/controller/jobs/pod/pod_controller_test.go
CONFLICT (content): Merge conflict in pkg/controller/jobs/pod/pod_controller_test.go
Auto-merging pkg/controller/jobs/pod/pod_controller.go
CONFLICT (content): Merge conflict in pkg/controller/jobs/pod/pod_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Using patch/apply on update pods.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-0.6

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/test-infra repository.

@tenzen-y
Copy link
Member

@mbobrovskyi Could you submit a cherry pick PR manually? This cherrypicker would be helpful: https://github.com/kubernetes-sigs/kueue/blob/main/hack/cherry_pick_pull.sh

k8s-ci-robot pushed a commit that referenced this pull request Apr 30, 2024
)

* Using patch/apply on update pods.

* Removed TestReconciler_DeletePodAfterTransientErrorsOnUpdateOrDeleteOps.
@mbobrovskyi mbobrovskyi deleted the fix/ungating-pods-should-use-patch-or-apply-instead-of-update branch May 6, 2024 09:53
@alculquicondor
Copy link
Contributor

/release-note-edit

Pod Integration: Use PATCH updates for pods. This fixes support for Pods when using the latest features in Kubernetes v1.29

@alculquicondor
Copy link
Contributor

/remove-kind feature

@k8s-ci-robot k8s-ci-robot removed the kind/feature Categorizes issue or PR as related to a new feature. label May 30, 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/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Ungating pods should use patch/apply instead of update
6 participants