Comments (6)
I've just hit this issue as well in my own project. The generated clientset code's tests appear to have malformed parameters lists:
$ go build -a ./...
# <omitted>
pkg/client/clientset/versioned/typed/objectbucket.io/v1alpha1/fake/fake_objectbucket.go:126:48: not enough arguments in call to testing.NewRootPatchSubresourceAction
have (schema.GroupVersionResource, string, []byte, []string...)
want (schema.GroupVersionResource, string, types.PatchType, []byte, ...string)
pkg/client/clientset/versioned/typed/objectbucket.io/v1alpha1/fake/fake_objectbucketclaim.go:134:44: not enough arguments in call to testing.NewPatchSubresourceAction
have (schema.GroupVersionResource, string, string, []byte, []string...)
want (schema.GroupVersionResource, string, string, types.PatchType, []byte, ...string)
I've tried deleting and regenerated the respective files without success.
Using k8s.io/code-generator (from dep's Gopkg.toml)
[[override]]
name = "k8s.io/code-generator"
version = "kubernetes-1.12.3"
from client.
Found a solution here: kubernetes-retired/cluster-registry#271
I fixed this in my project by updating my deps to 1.13.1 and regenerating the clientset:
[[override]]
name = "k8s.io/code-generator"
version = "kubernetes-1.13.1"
[[constraint]]
name = "k8s.io/client-go"
version = "kubernetes-1.13.1"
[[constraint]]
name = "k8s.io/apimachinery"
version = "kubernetes-1.13.1"
[[constraint]]
name = "k8s.io/api"
version = "kubernetes-1.13.1"
from client.
@copejon Do you know what the steps are to fix? I thought the dependencies were pinned (ping @sixolet). Bit confused how to actually fix / prevent this from happening.
from client.
@cdrage : I think the tests are passing now
➜ client git:(master) go test -v ./pkg/...
go: finding github.com/knative/test-infra/scripts latest
go: finding github.com/knative/test-infra latest
go: downloading github.com/knative/test-infra v0.0.0-20190305224539-804daea55392
=== RUN TestDummy
--- PASS: TestDummy (0.00s)
PASS
ok github.com/knative/client/pkg 0.001s
=== RUN TestDescribeRevisionWithNoName
--- PASS: TestDescribeRevisionWithNoName (0.00s)
=== RUN TestDescribeRevisionYaml
--- PASS: TestDescribeRevisionYaml (0.00s)
=== RUN TestEmptyServiceDescribe
--- PASS: TestEmptyServiceDescribe (0.00s)
=== RUN TestServiceDescribeDefaultOutput
--- PASS: TestServiceDescribeDefaultOutput (0.00s)
=== RUN TestListEmpty
--- PASS: TestListEmpty (0.00s)
=== RUN TestListDefaultOutput
--- PASS: TestListDefaultOutput (0.00s)
PASS
ok github.com/knative/client/pkg/kn/commands (cached)
from client.
@cdrage The steps to fix are a bit messy. Describing exactly what I did won't be very useful as it was specific to my dependencies' versions. The end goal with k8s dependencies was to get them all on the same version. The version mismatch between code-generation, schema packages, client-go, and apimachinery meant that older versions of generated code caused more recently versioned consumers of that code to fail.
Specifically, k8s 1.13 packages couldn't use older generated client code. So I had to update all my k8s package versions in the Gopkg.toml, run deps ensure --update
and regenerated the client with the (no updated) code-generator
scripts.
from client.
cc @frobware
from client.
Related Issues (20)
- Change to Sugar Controller will impact inject Broker functionality option of "Kn trigger create" HOT 3
- Issues with go-licenses HOT 4
- Add support for different volume types HOT 6
- Can't create private service using --no-cluster-local HOT 3
- Add `url` option for `kn service list --output` HOT 2
- Add support for providing sink spec in GVR format
- Add config option to specify `readOnly` volumes HOT 2
- Add `--scale-activation` flag to match new Serving option HOT 5
- Option to specify Node Selector HOT 2
- support uninstallation of local cluster using kn HOT 6
- Compile errors with Go 1.20 HOT 2
- kn does not show new trigger filters HOT 2
- Service export should handle securityContext field HOT 12
- Missing example of fully qualified GVR in`--sink` flag HOT 3
- Eventing TLS: support Eventing TLS in kn-plugin-event HOT 5
- `kn trigger update --help` information is incorrect HOT 2
- CLI: Add support for EventType v1beta2 HOT 6
- CLI: add support for experimental new filters API in trigger HOT 4
- Ability to set toleration, affinity and node selector HOT 8
- 48h Knative - A Hackathon-Style Event
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from client.