Skip to content

Conversation

@thaJeztah
Copy link
Contributor

full diff: emicklei/go-restful@v2.9.5...v3.7.3

  • Switch to using go modules
  • Add check for wildcard to fix CORS filter
  • Add check on writer to prevent compression of response twice
  • Add OPTIONS shortcut WebService receiver
  • Add Route metadata to request attributes or allow adding attributes to routes
  • Add wroteHeader set
  • Enable content encoding on Handle and ServeHTTP
  • Feat: support google custom verb
  • Feature: override list of method allowed without content-type
  • Fix Allow header not set on '405: Method Not Allowed' responses
  • Fix Go 1.15: conversion from int to string yields a string of one rune
  • Fix WriteError return value
  • Fix: use request/response resulting from filter chain
  • handle path params with prefixes and suffixes
  • HTTP response body was broken, if struct to be converted to JSON has boolean value
  • List available representations in 406 body
  • Support describing response headers
  • Unwrap function in filter chain + remove unused dispatchWithFilters

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Updating this dependency to a version that's using go modules

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

The non-go module version is still in use by various other dependencies within the k8s.io org, so those will need to be updated as well (and updated in this repository after they've been updated)

Does this PR introduce a user-facing change?


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


full diff: emicklei/go-restful@v2.9.5...v3.7.3

- Switch to using go modules
- Add check for wildcard to fix CORS filter
- Add check on writer to prevent compression of response twice
- Add OPTIONS shortcut WebService receiver
- Add Route metadata to request attributes or allow adding attributes to routes
- Add wroteHeader set
- Enable content encoding on Handle and ServeHTTP
- Feat: support google custom verb
- Feature: override list of method allowed without content-type
- Fix Allow header not set on '405: Method Not Allowed' responses
- Fix Go 1.15: conversion from int to string yields a string of one rune
- Fix WriteError return value
- Fix: use request/response resulting from filter chain
- handle path params with prefixes and suffixes
- HTTP response body was broken, if struct to be converted to JSON has boolean value
- List available representations in 406 body
- Support describing response headers
- Unwrap function in filter chain + remove unused dispatchWithFilters

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@k8s-ci-robot k8s-ci-robot added 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/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. 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-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 6, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @thaJeztah. Thanks for your PR.

I'm waiting for a kubernetes 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.

Details

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 the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Dec 6, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: thaJeztah
To complete the pull request process, please assign liggitt after the PR has been reviewed.
You can assign the PR to them by writing /assign @liggitt in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details 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 area/apiserver area/cloudprovider area/dependency Issues or PRs related to dependency changes area/kubelet sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 6, 2021
@k8s-ci-robot k8s-ci-robot requested review from a team, andrewsykim and caesarxuchao December 6, 2021 12:53
Comment on lines 231 to +232
github.com/emicklei/go-restful => github.com/emicklei/go-restful v2.9.5+incompatible
github.com/emicklei/go-restful/v3 => github.com/emicklei/go-restful/v3 v3.7.3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've left the github.com/emicklei/go-restful (non-go modules) replace in place; I wasn't sure what's common in this scenario, but that replace should (if I'm correct) still help with getting the indirect dependencies to the same / consistent version.

(@dims ?)

@thaJeztah
Copy link
Contributor Author

On this branch; indirect dependencies remaining that use the old (non-go modules) version;

go mod graph | grep ' github.com/emicklei/go-restful@'
k8s.io/[email protected] github.com/emicklei/[email protected]+incompatible
k8s.io/[email protected] github.com/emicklei/[email protected]+incompatible
k8s.io/[email protected] github.com/emicklei/[email protected]
k8s.io/[email protected] github.com/emicklei/[email protected]

Perhaps a replace rule is needed for k8s.io/kube-openapi, as it looks like multiple versions are considered by go modules

@thaJeztah
Copy link
Contributor Author

Opened kubernetes/kube-openapi#271 to open kube-openapi

@dims
Copy link
Member

dims commented Dec 6, 2021

/assign @liggitt @lavalamp
/release-note-none
/ok-to-test

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Dec 6, 2021
@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/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 6, 2021
@liggitt
Copy link
Member

liggitt commented Dec 6, 2021

thanks for the PR... will need to sweep the go-restful release notes and impl changes from v2 to v3 to see if any behavior changes impact us

xref comments on previous bump attempt:

is there a specific bug/issue this bump is intended to address? that would help in knowing how to prioritize review

@thaJeztah
Copy link
Contributor Author

Ouch; I was afraid this could happen; guess either some code needs to be regenerated, or we need to update this in a specific order 😞

# k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/server/routes
vendor/k8s.io/apiserver/pkg/server/routes/openapi.go:39:64: cannot use c.RegisteredWebServices() (type []*"k8s.io/kubernetes/vendor/github.com/emicklei/go-restful/v3".WebService) as type []*"k8s.io/kubernetes/vendor/github.com/emicklei/go-restful".WebService in argument to builder.BuildOpenAPISpec

vendor/k8s.io/apiserver/pkg/server/routes/openapi.go:78:41: cannot use ws (type []*"k8s.io/kubernetes/vendor/github.com/emicklei/go-restful/v3".WebService) as type []*"k8s.io/kubernetes/vendor/github.com/emicklei/go-restful".WebService in argument to builder3.BuildOpenAPISpec
# k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder
vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go:203:56: cannot use []*"k8s.io/kubernetes/vendor/github.com/emicklei/go-restful/v3".WebService{...} (type []*"k8s.io/kubernetes/vendor/github.com/emicklei/go-restful/v3".WebService) as type []*"k8s.io/kubernetes/vendor/github.com/emicklei/go-restful".WebService in argument to builder3.BuildOpenAPISpec
vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go:213:62: cannot use []*"k8s.io/kubernetes/vendor/github.com/emicklei/go-restful/v3".WebService{...} (type []*"k8s.io/kubernetes/vendor/github.com/emicklei/go-restful/v3".WebService) as type []*"k8s.io/kubernetes/vendor/github.com/emicklei/go-restful".WebService in argument to builder.BuildOpenAPISpec
vendor/k8s.io/apiextensions-apiserver/pkg/controller/openapi/builder/builder.go:529:3: cannot use "k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/endpoints/openapi".GetOperationIDAndTags (type func(*"k8s.io/kubernetes/vendor/github.com/emicklei/go-restful/v3".Route) (string, []string, error)) as type func(*"k8s.io/kubernetes/vendor/github.com/emicklei/go-restful".Route) (string, []string, error) in field value

@thaJeztah
Copy link
Contributor Author

is there a specific bug/issue this bump is intended to address? that would help in knowing how to prioritize review

No, there's no specific bug/issue; mostly that I noticed the go-restful project moved to using go modules, and I noticed that containerd was still using the non-go modules version (then I noticed there were various indirect dependencies using it).

Based on the errors above, it looks like updating may be a bit hairy as various components use the type 😬 (I'm not very familiar with the dependency tree / relation here, but happy to help getting changes in, in the right order)

@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 Dec 7, 2021
@dims
Copy link
Member

dims commented Jan 5, 2022

/retest

@k8s-ci-robot
Copy link
Contributor

@thaJeztah: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-integration 6e9c922 link true /test pull-kubernetes-integration
pull-kubernetes-node-e2e-containerd 6e9c922 link true /test pull-kubernetes-node-e2e-containerd
pull-kubernetes-conformance-kind-ga-only-parallel 6e9c922 link true /test pull-kubernetes-conformance-kind-ga-only-parallel
pull-kubernetes-verify-govet-levee 6e9c922 link true /test pull-kubernetes-verify-govet-levee
pull-kubernetes-e2e-kind-ipv6 6e9c922 link true /test pull-kubernetes-e2e-kind-ipv6
pull-kubernetes-e2e-gce-ubuntu-containerd 6e9c922 link true /test pull-kubernetes-e2e-gce-ubuntu-containerd
pull-kubernetes-e2e-kind 6e9c922 link true /test pull-kubernetes-e2e-kind
pull-kubernetes-typecheck 6e9c922 link true /test pull-kubernetes-typecheck
pull-kubernetes-unit 6e9c922 link true /test pull-kubernetes-unit
pull-kubernetes-e2e-gce-100-performance 6e9c922 link true /test pull-kubernetes-e2e-gce-100-performance
pull-kubernetes-verify 6e9c922 link true /test pull-kubernetes-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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. I understand the commands that are listed here.

@liggitt liggitt removed their assignment Mar 26, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 5, 2022
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 5, 2022
@k8s-ci-robot
Copy link
Contributor

@thaJeztah: PR needs rebase.

Details

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-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 4, 2022
@liggitt
Copy link
Member

liggitt commented Jun 13, 2022

superceded by #110351

/close

@k8s-ci-robot
Copy link
Contributor

@liggitt: Closed this PR.

Details

In response to this:

superceded by #110351

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apiserver area/cloudprovider area/dependency Issues or PRs related to dependency changes area/kubelet 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. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/node Categorizes an issue or PR as relevant to SIG Node. 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

Development

Successfully merging this pull request may close these issues.

7 participants