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

Update kustomize, use canonical json-patch v4 import #123339

Merged
merged 4 commits into from
May 29, 2024

Conversation

skitt
Copy link
Member

@skitt skitt commented Feb 16, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

The canonical import for json-patch v4 is
gopkg.in/evanphx/json-patch.v4 (see
https://github.com/evanphx/json-patch/blob/master/README.md#get-it for reference).

Using the v4-specific path should also reduce the risk of unwanted v5 upgrade attempts (see
#120327 for context).

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

This duplicates json-patch in vendor; the remaining dependency comes from kustomize, and will be fixed by kubernetes-sigs/kustomize#5541.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added 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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/kube-proxy area/kubeadm area/kubectl area/kubelet area/test sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 16, 2024
The canonical import for json-patch v4 is
gopkg.in/evanphx/json-patch.v4 (see
https://github.com/evanphx/json-patch/blob/master/README.md#get-it for
reference).

Using the v4-specific path should also reduce the risk of unwanted v5
upgrade attempts, because they won't be offered as automated upgrades
by dependency upgrade management tools, and they won't happen through
indirect dependencies (see
kubernetes#120327 for context).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 28, 2024
@@ -50,12 +49,12 @@ require (
github.com/opencontainers/runc v1.1.12
github.com/opencontainers/selinux v1.11.0
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.0
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
Copy link
Member

Choose a reason for hiding this comment

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

is it intentional this is pulling in a version between tags? do we know if this library expects to be used on a non-tagged version and is stable there?

Copy link
Member Author

@skitt skitt May 29, 2024

Choose a reason for hiding this comment

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

I don’t think it’s intentional; the bump ultimately comes from https://github.com/hashicorp/consul (through https://github.com/spf13/viper) where it was first done in hashicorp/consul#15959 and then propagated.

There won’t be a non-tagged version of the library, it’s unmaintained; in fact the difference between 1.0.0 and the commit referenced above is just a couple of documentation updates to fix an example and add a notice about the end of the project’s maintenance.

@@ -139,7 +139,7 @@ require (
github.com/containerd/ttrpc v1.2.2 // indirect
github.com/coredns/caddy v1.1.1 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
Copy link
Member

Choose a reason for hiding this comment

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

is it intentional this is pulling in a version between tags? do we know if this library expects to be used on a non-tagged version and is stable there?

Copy link
Member Author

Choose a reason for hiding this comment

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

Same as above, this comes from hashicorp/consul#15959.

I also doubt there will be a new release of go-spew; the difference between 1.1.1 and the commit pulled in above is only a CI change to test using Go 1.11 (!).

Copy link
Member

Choose a reason for hiding this comment

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

heh, ok

@liggitt
Copy link
Member

liggitt commented May 29, 2024

I realized we have 3 parallel PRs attempting to update kustomize... (#124812 #124217 #123339)

This PR is the oldest and also took care of switching k/k to the v4 json-patch library to avoid using two names for the same library, so I'm inclined to merge this one.

Just a couple questions on pulling in untagged versions of a couple deps, then lgtm

skitt added a commit to skitt/consul that referenced this pull request May 29, 2024
In both go-difflib and go-spew, the changes since the last release are
insignificant (only touching documentation or CI):

* pmezard/go-difflib@v1.0.0...master
* davecgh/go-spew@v1.1.1...master

This reverts the dependencies to the last release, as far as possible.
The root go.mod and troubleshoot/go.mod will have to be revisited
after the next release of the relevant consul sub-modules.

See also the discussion in
kubernetes/kubernetes#123339

Signed-off-by: Stephen Kitt <skitt@redhat.com>
skitt added a commit to skitt/consul that referenced this pull request May 29, 2024
In both go-difflib and go-spew, the changes since the last release are
insignificant (only touching documentation or CI):

* pmezard/go-difflib@v1.0.0...master
* davecgh/go-spew@v1.1.1...master

This reverts the dependencies to the last release, as far as possible,
in MPL-2.0-licensed components.

See also the discussion in
kubernetes/kubernetes#123339

Signed-off-by: Stephen Kitt <skitt@redhat.com>
@liggitt
Copy link
Member

liggitt commented May 29, 2024

/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 May 29, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 59bc70d4b2cf4acfd3f3955b369be015aafe485f

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 29, 2024
@dims
Copy link
Member

dims commented May 29, 2024

/retest
/approve
/lgtm

Looks like max depth went up a bit.

--- /logs/artifacts/stats-base.txt	2024-05-28 08:50:39.367963813 +0000
+++ /logs/artifacts/stats.txt	2024-05-28 08:50:35.298413815 +0000
@@ -1,7 +1,7 @@
 Direct Dependencies: 187 
-Transitive Dependencies: 328 
+Transitive Dependencies: 327 
 Total Dependencies: 368 
-Max Depth Of Dependencies: 19 
+Max Depth Of Dependencies: 24 
 All dependencies:
 
 bazil.org/fuse
@@ -[18](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/123339/check-dependency-stats/1795376702344400896#1:build-log.txt%3A18)1,7 +181,6 @@
 github.com/envoyproxy/go-control-plane
 github.com/envoyproxy/protoc-gen-validate
 github.com/euank/go-kmsg-parser
-github.com/evanphx/json-patch
 github.com/exponent-io/jsonpath
 github.com/fatih/camelcase
 github.com/felixge/httpsnoop
@@ -351,6 +350,7 @@
 google.golang.org/grpc
 google.golang.org/protobuf
 gopkg.in/check.v1
+gopkg.in/evanphx/json-patch.v4
 gopkg.in/inf.v0
 gopkg.in/natefinch/lumberjack.v2
 gopkg.in/square/go-jose.v2
@@ -375,4 +[37](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/123339/check-dependency-stats/1795376702344400896#1:build-log.txt%3A37)5,4 @@

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, liggitt, skitt

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 merged commit da02fdb into kubernetes:master May 29, 2024
20 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.31 milestone May 29, 2024
@skitt skitt deleted the canonical-json-patch branch May 29, 2024 15:04
@fedebongio
Copy link
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 4, 2024
skitt added a commit to skitt/kustomize that referenced this pull request Jun 6, 2024
spf13/viper recently split its remote package into a separate module,
greatly simplifying its module dependency tree. This doesn't affect
package dependencies but reduces the constraints on module versions
(see the discussion on go-difflib and go-spew in
kubernetes/kubernetes#123339 for an example of
the knock-on effects).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
skitt added a commit to skitt/viper that referenced this pull request Jun 6, 2024
Now that consul/api is gone from the module dependency tree, these
dependencies can be reverted to their latest releases; the changes
since then are only CI-related or documentation updates, which aren't
relevant for downstream users.

(This is very minor but avoids questions like
kubernetes/kubernetes#123339 (comment)
about the use of untagged dependencies.)

Signed-off-by: Stephen Kitt <skitt@redhat.com>
sagikazarmark pushed a commit to spf13/viper that referenced this pull request Jun 6, 2024
Now that consul/api is gone from the module dependency tree, these
dependencies can be reverted to their latest releases; the changes
since then are only CI-related or documentation updates, which aren't
relevant for downstream users.

(This is very minor but avoids questions like
kubernetes/kubernetes#123339 (comment)
about the use of untagged dependencies.)

Signed-off-by: Stephen Kitt <skitt@redhat.com>
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. area/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/kube-proxy area/kubeadm area/kubectl area/kubelet area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: Done
Status: Closed / Done
Status: Done
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet