Skip to content

📖 chore: Add explanatory comment for continuing to use json-patch v4 in the fake client #3118

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

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

kersten
Copy link
Contributor

@kersten kersten commented Feb 17, 2025

update the json-patch dependency from v4 to v5 in the fake client implementation. This change aligns the dependency with its latest version in the github.com/evanphx/json-patch package.

also, fix a minor formatting issue in a TODO comment for consistency.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 17, 2025
@k8s-ci-robot
Copy link
Contributor

Welcome @kersten!

It looks like this is your first PR to kubernetes-sigs/controller-runtime 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/controller-runtime has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @kersten. 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-sigs/prow 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 17, 2025
@@ -29,8 +29,7 @@ import (
"sync"
"time"

// Using v4 to match upstream
Copy link
Member

Choose a reason for hiding this comment

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

Did upsream switch to v5?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is meant by upstream?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Also see the comment in go.mod

// Using v4 to match upstream

Maybe we should add more details like linking #2643

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that would definitely help. First I thought just asking a question about what upstream means. Also I would like to get e deeper understanding in upstream how the old v4 could be replaced.

Copy link
Member

Choose a reason for hiding this comment

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

Yup. That's a question for k/k. I'm pretty sure there already were discussions about this. I just don't know where

@troy0820
Copy link
Member

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 18, 2025
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 6, 2025
@sbueringer
Copy link
Member

sbueringer commented Mar 6, 2025

We can change this PR to make the comment a bit clearer (#3118 (comment)), but otherwise I would close it.

I think everything else has to happen in k/k first

@kersten
Copy link
Contributor Author

kersten commented Mar 6, 2025

Ok, great, I will change it towards the better comment 👌🏻

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 6, 2025
@kersten
Copy link
Contributor Author

kersten commented Mar 6, 2025

@sbueringer does this comment meet your criteria?

Maintain json-patch v4 to align with Kubernetes code and avoid breaking
changes in v5. This ensures compatibility and stability as the fake client
code is adapted from client-go's testing fixture, which relies on v4.

See:
  - kubernetes/kubernetes#91622
  - kubernetes/kubernetes#120326
@sbueringer
Copy link
Member

@sbueringer does this comment meet your criteria?

Thx, sounds pretty good. Please just rename the PR accordingly then I'll merge

@kersten kersten changed the title 🐛 refactor(fake-client): update json-patch dependency to v5 🐛chore(fake-client): Add explanatory comment for continuing to use json-patch v4 in the fake client Mar 7, 2025
@kersten kersten changed the title 🐛chore(fake-client): Add explanatory comment for continuing to use json-patch v4 in the fake client 📖 chore: Add explanatory comment for continuing to use json-patch v4 in the fake client Mar 7, 2025
@kersten
Copy link
Contributor Author

kersten commented Mar 7, 2025

@sbueringer does this comment meet your criteria?

Thx, sounds pretty good. Please just rename the PR accordingly then I'll merge

Done

@sbueringer
Copy link
Member

Thx!

/lgtm
/approve

/hold cancel
/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 do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 7, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 7, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a86339e6a07d0bcf51e1b85a3b4ecb5eb206a3ee

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kersten, sbueringer

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 Mar 7, 2025
@sbueringer
Copy link
Member

/retest

@k8s-ci-robot k8s-ci-robot merged commit de4367f into kubernetes-sigs:main Mar 7, 2025
19 checks passed
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. 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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants