Comments (16)
Using tags would be a way to have more reproducible builds, they still need to be tagged from time to time tho. That is still better than using @latest
or micro managing commit revisions.
from kubernetes.
Either that or we pin to a more recent commit, for example
@835d969ad83a
.
@mauri870 thanks for investigating.
Question, if we use @latest
would this not cause problems in the future if we try to build a release branch from the past? Maybe this is not a big deal. OTOH if we hardcode a tag, it may create maintenance costs.
I'm wondering if there is a better way, say to version openapi-gen
and use the corresponding tag, say 1.30.1
?
from kubernetes.
/assign
from kubernetes.
I was able to reproduce, but just because I had an older version of kube-openapi in my GOPATH. Using the @latest
prefix in the command fixed it.
$ GO111MODULE=on go install k8s.io/kube-openapi/cmd/openapi-gen
../../gopath/pkg/mod/k8s.io/[email protected]/pkg/common/common.go:23:2: missing go.sum entry for module providing package github.com/emicklei/go-restful/v3 (imported by k8s.io/kube-openapi/pkg/common); to add:
go get k8s.io/kube-openapi/pkg/[email protected]
$ GO111MODULE=on go install k8s.io/kube-openapi/cmd/openapi-gen@latest
go: downloading k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a
$ GO111MODULE=on go install k8s.io/kube-openapi/cmd/openapi-gen@latest
I think line https://github.com/kubernetes/code-generator/blob/master/kube_codegen.sh#L330C45-L330C64 needs to be
GO111MODULE=on go install $(printf "k8s.io/kube-openapi/cmd/%s@latest" "${BINS[@]}")
from kubernetes.
Either that or we pin to a more recent commit, for example @835d969ad83a
. For some reason if you ommit the version it is using a commit from Feb 27.
from kubernetes.
I can do it.
from kubernetes.
/cc @alculquicondor @mimowo @thockin
from kubernetes.
GO111MODULE=on go install k8s.io/kube-openapi/cmd/openapi-gen
/sig api-machinery
from kubernetes.
Yeah, with latest
works for me too.
from kubernetes.
Thanks @mauri870 and @mimowo for the research. Is either of you thinking on submitting a fix for this? Thanks!
from kubernetes.
I can do it.
Thanks!
/assign mbobrovskyi
from kubernetes.
Yes, please don't use @latest
Generally instead we'd control the version of a tool in the hack/tools module and install it from there (see e.g.
kubernetes/hack/verify-spelling.sh
Line 35 in eb68409
from kubernetes.
Line 8 in eb68409
kubernetes/hack/tools/tools.go
Line 24 in eb68409
This allows us to also gain go.sum for the package while not polluting the main module with dev-only dependencies.
from kubernetes.
Not sure if we need to make another go.mod. Because it's not just a dev-only dependency. I propose to add it to tools.go
of code-generator.
from kubernetes.
This is about semversioning kubernetes/kube-openapi#421 (comment).
Note, and this is crucial for this repo, kube-openapi has a collection of very different functionality that is independently developed. Our go-openapi fork is very different from pkg/cached or pkg/builder. Semver for a collection repository like this is not a good strategy. We could apply semver to individual parts via nested go.mods. That would make a lot more sense.
from kubernetes.
/triage accepted
from kubernetes.
Related Issues (20)
- Node Labeling node.kubernetes.io/out-of-service Taint Label Delay HOT 2
- [FG:InPlacePodVerticalScaling] e2e test does not verify resource update in pod status HOT 3
- cronjob schedule with multiple conditions not working - conflict between day (week) and day (month) HOT 5
- NetPol block self pod trafic using an svc and not direct call HOT 12
- kube-apiserver logs watch requests before they end in 1.30 HOT 9
- Node Lifecycle Controller does not mark pods not ready when node becomes Ready=False HOT 8
- endpoints cannot be changed from notReadyAddresses to addresses HOT 8
- Enhancement: Add vTPM Configuration Fields for Enhanced Container Security HOT 3
- 'kubectl delete istag/$ISTAG --dry-run=server' is unexpectedly deleting the object from the server HOT 5
- [FG:InPlacePodVerticalScaling] resources in pod status are never updated if EventedPLEG is enabled HOT 2
- [Flaking test] ci-kubernetes-e2e-gci-gce.Overall HOT 4
- `kubernetes.io/legacy-token-last-used` label being added to long lived service token secrets HOT 2
- The endpoint status does not update when the pod state changes rapidly. HOT 8
- Pod with exitCode 137, The reason has nothing to do with resources。 HOT 2
- Failure cluster [9afae275...] HOT 2
- finish DRA for 1.31 HOT 4
- [Failing Test] ci-kubernetes-cloud-provider-kind-conformance-parallel-ipv6 (client rate limiter error) HOT 2
- TypeMeta is empty in Type client Apply and Patch responses HOT 3
- Job API: Relax validation enforcing Pod Failure Policy is only compatible with pod restart policy of "Never" HOT 7
- invalid memory address or nil pointer dereference" in wait.JitterUntil HOT 4
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 kubernetes.