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

Bump github.com/go-openapi/* to newer versions #102098

Closed

Conversation

dims
Copy link
Member

@dims dims commented May 18, 2021

periodic bump. Here's what we are doing:

Signed-off-by: Davanum Srinivas davanum@gmail.com

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. 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. labels May 18, 2021
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 18, 2021
@dims dims assigned sttts and liggitt and unassigned sttts May 18, 2021
@dims
Copy link
Member Author

dims commented May 18, 2021

/sig api-machinery

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. area/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/kubectl 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. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 18, 2021
@k8s-ci-robot k8s-ci-robot requested review from andrewsykim, aojea and a team May 18, 2021 15:36
Comment on lines 36 to 38
github.com/asaskevich/govalidator => github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a
github.com/go-openapi/swag => github.com/go-openapi/swag v0.19.5
github.com/mitchellh/mapstructure => github.com/mitchellh/mapstructure v1.1.2
Copy link
Member

Choose a reason for hiding this comment

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

we can't have replace directives in published modules... this means these have to be bumped as well :-/

@liggitt
Copy link
Member

liggitt commented May 18, 2021

update looks fine, need to bump transitive versions so lint-dependencies doesn't complain

@fedebongio
Copy link
Contributor

/triage accepted

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label May 18, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 18, 2021
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
@dims dims force-pushed the bump-goopenapi-repos-to-newer-versions branch from 63947d8 to f256cde Compare May 18, 2021 23:14
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dims
To complete the pull request process, please ask for approval from liggitt after the PR has been reviewed.

The full list of commands accepted by this bot can be found 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

@nikhita
Copy link
Member

nikhita commented May 19, 2021

kustomize is the only component that requires go-openapi right now:

$ go mod why github.com/go-openapi/spec
# github.com/go-openapi/spec
k8s.io/kubernetes/pkg/kubectl/cmd/convert
k8s.io/cli-runtime/pkg/resource
sigs.k8s.io/kustomize/api/krusty
sigs.k8s.io/kustomize/kyaml/openapi
github.com/go-openapi/spec

Dependency on go-openapi was eliminated in kustomize in kubernetes-sigs/kustomize#3827 and a new release which includes this change was also created - https://github.com/kubernetes-sigs/kustomize/releases/tag/kyaml%2Fv0.10.18

Would it help if we bumped kustomize instead to remove go-openapi completely?

xref #101234 (comment), #98946 (comment), kubernetes-sigs/kustomize#3705

@dims
Copy link
Member Author

dims commented May 19, 2021

@nikhita possibly, kustomize traditionally has been tough to update, So will have to wait for other folks to help with it. I'd say we can land this and still land kustomize when they feel ready.

hasWhitespace string = ".*[[:space:]]"
hasWhitespaceOnly string = "^[[:space:]]+$"
Email string = "^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$"
CreditCard string = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11}|6[27][0-9]{14})$"
Copy link
Member

@liggitt liggitt May 19, 2021

Choose a reason for hiding this comment

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

@sttts we use this in vendor/k8s.io/kube-openapi/pkg/validation/strfmt/default.go and these regex changes modify our API validation for custom resources of format: creditcard, right?

URLUsername string = `(\S+(:\S*)?@)`
URLPath string = `((\/|\?|#)[^\s]*)`
URLPort string = `(:(\d{1,5}))`
URLIP string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3]|24\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-5]))`
Copy link
Member

Choose a reason for hiding this comment

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

I don't see this one used in our validation

@liggitt
Copy link
Member

liggitt commented May 19, 2021

I think #102098 (comment) changes our API validation

@gautierdelorme
Copy link
Contributor

@dims @nikhita I opened kubernetes-sigs/kustomize#3827 to drop go-openapi/spec,validate,strfmt dependency from kustomize so we can remove it from k/k as well. kyaml/v0.10.18, cmd/config/v0.9.11, api/v0.8.9 includes that change but I'm waiting on @monopole to release a new kustomize/v4.x version before bumping kustomize in k/k and dropping go-openapi/spec,validate,strfmt totally. Also, I expect that update to be pretty simple (similar to #101120).

@liggitt Yeah that was one of the reasons why we moved to https://github.com/kubernetes/kube-openapi for API validation. IMO we shouldn't bump those dependencies and just upgrade kustomize to drop go-openapi/spec,validate,strfmt entirely.

@liggitt
Copy link
Member

liggitt commented May 19, 2021

closing this in favor of updating kustomize and dropping the dependency altogether sounds good to me, since this update brings in behavior changes we don't want

@gautierdelorme
Copy link
Contributor

@liggitt I have a branch locally almost ready (just need the new sigs.k8s.io/kustomize/kustomize/v4 release). I also just got some news a few minutes ago from the kustomize team and they have some PRs to look through but are planning to do a release right after checking them. So expect a PR from me here pretty soon. :)

@dims
Copy link
Member Author

dims commented May 20, 2021

/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 May 20, 2021
@gautierdelorme
Copy link
Contributor

@dims @nikhita @liggitt I opened the PR at #102193.

@liggitt
Copy link
Member

liggitt commented May 20, 2021

Thanks!

/close
In favor of #102193

@liggitt liggitt closed this May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/kubectl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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/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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants