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

gengo: Migrate to v2 #7

Merged
merged 1 commit into from
Oct 16, 2024
Merged

gengo: Migrate to v2 #7

merged 1 commit into from
Oct 16, 2024

Conversation

sayboras
Copy link
Member

@sayboras sayboras commented Oct 2, 2024

Description

This commit is to migrate gengo to v2, as v1 is no longer maintained1.

Testing

Testing was done locally with make test, as well with cilium/cilium repo in this PR cilium/cilium#34988

$ make test
go fmt ./...
go vet ./...
PKGS=$(go list ./output_tests/...  | paste -sd' ' -); \
/tmp/deepequal-gen --logtostderr --v=0 -O zz_generated.go -h hack/boilerplate.txt --output-base /tmp/tmp.IOS7XpKTWS $PKGS
cp -r "/tmp/tmp.IOS7XpKTWS/github.com/cilium/deepequal-gen/." ./
rm -rf "/tmp/tmp.IOS7XpKTWS"
SUCCESS: no differences in generated output

Testing with cilium/cilium

# Remove all deepequal generated files
$ find . -name zz_generated.deepequal.go | grep -v vendor | xargs rm -f 

# Run make generate-k8s-api-local to re-generate deepequal files
% make generate-k8s-api-local
grep: warning: stray \ before +
go install k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo && go install golang.org/x/tools/cmd/goimports && go run k8s.io/code-generator/cmd/go-to-protobuf --apimachinery-packages='-k8s.io/apimachinery/pkg/util/intstr,-k8s.io/apimachinery/pkg/api/resource,-k8s.io/apimachinery/pkg/runtime/schema,-k8s.io/apimachinery/pkg/runtime,-k8s.io/apimachinery/pkg/apis/meta/v1,-k8s.io/apimachinery/pkg/apis/meta/v1beta1' --drop-embedded-fields="github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1.TypeMeta" --proto-import="$PWD" --proto-import="$PWD/vendor" --proto-import="$PWD/tools/protobuf" --packages=github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1,github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1,github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1,github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1,github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1,github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1,github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1beta1,github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr --go-header-file "$PWD/hack/custom-boilerplate.go.txt" --output-dir=$GOPATH/src
go run github.com/cilium/deepequal-gen --go-header-file "$PWD/hack/custom-boilerplate.go.txt" --output-file zz_generated.deepequal.go --output-base "/tmp/cilium.tmpW79RrS0J" github.com/cilium/cilium/api/v1/models github.com/cilium/cilium/api/v1/server github.com/cilium/cilium/pkg/alibabacloud/eni/types github.com/cilium/cilium/pkg/aws/eni/types github.com/cilium/cilium/pkg/azure/types github.com/cilium/cilium/pkg/bgpv1/manager/reconcilerv2 github.com/cilium/cilium/pkg/bgpv1/types github.com/cilium/cilium/pkg/datapath/tables github.com/cilium/cilium/pkg/datapath/types github.com/cilium/cilium/pkg/ipam/types github.com/cilium/cilium/pkg/k8s github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2 github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1 github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1 github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1 github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1 github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1 github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/labels github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/meta/v1 github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/util/intstr github.com/cilium/cilium/pkg/k8s/types github.com/cilium/cilium/pkg/labels github.com/cilium/cilium/pkg/labelsfilter github.com/cilium/cilium/pkg/loadbalancer github.com/cilium/cilium/pkg/node github.com/cilium/cilium/pkg/node/types github.com/cilium/cilium/pkg/policy/api github.com/cilium/cilium/pkg/service/store
contrib/scripts/k8s-code-gen.sh "/tmp/cilium.tmpW79RrS0J"
SCRIPT_ROOT=/home/tammach/go/src/github.com/cilium/cilium/contrib/scripts/../..
Generating client code for 4 targets
grep: /tmp/cilium.tmpW79RrS0J/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset: No such file or directory
Generating lister code for 4 targets
grep: /tmp/cilium.tmpW79RrS0J/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers: No such file or directory
Generating informer code for 4 targets
grep: /tmp/cilium.tmpW79RrS0J/github.com/cilium/cilium/pkg/k8s/slim/k8s/client/informers: No such file or directory
Generating client code for 1 targets
grep: /tmp/cilium.tmpW79RrS0J/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset: No such file or directory
Generating lister code for 1 targets
grep: /tmp/cilium.tmpW79RrS0J/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/listers: No such file or directory
Generating informer code for 1 targets
grep: /tmp/cilium.tmpW79RrS0J/github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/informers: No such file or directory
Generating client code for 2 targets
grep: /tmp/cilium.tmpW79RrS0J/github.com/cilium/cilium/pkg/k8s/client/clientset: No such file or directory
Generating lister code for 2 targets
grep: /tmp/cilium.tmpW79RrS0J/github.com/cilium/cilium/pkg/k8s/client/listers: No such file or directory
Generating informer code for 2 targets
grep: /tmp/cilium.tmpW79RrS0J/github.com/cilium/cilium/pkg/k8s/client/informers: No such file or directory
Generating deepcopy code for 3 targets
Generating deepcopy code for 25 targets
Generating defaulter code for 3 targets
Generating conversion code for 3 targets
rm -rf "/tmp/cilium.tmpW79RrS0J"

# Check current git status
$ gst
On branch pr/tammach/enable-type-alias
Your branch is up to date with 'origin/pr/tammach/enable-type-alias'.

nothing to commit, working tree clean

Footnotes

  1. https://github.com/kubernetes/gengo/pull/281#issuecomment-2374353462

@sayboras sayboras force-pushed the pr/tammach/gengo-v2 branch 3 times, most recently from 32911b2 to cd9181d Compare October 2, 2024 05:00
This commit is to migrate gengo to v2, as v1 is no longer maintained.

Signed-off-by: Tam Mach <[email protected]>
@sayboras sayboras force-pushed the pr/tammach/gengo-v2 branch from cd9181d to 4c4165f Compare October 2, 2024 10:59
sayboras added a commit to cilium/cilium that referenced this pull request Oct 2, 2024
This is to pick up the changes in cilium/deepequal-gen#7.
The main goal is to enable go 1.23 type alias again.

Relates: #34988
Relates: cilium/deepequal-gen#7

Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to sayboras/cilium that referenced this pull request Oct 2, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
@sayboras sayboras marked this pull request as ready for review October 2, 2024 11:20
@sayboras sayboras requested a review from aanm October 2, 2024 11:20
@sayboras
Copy link
Member Author

sayboras commented Oct 2, 2024

Ah thinking about this again, probably just need to wait for new controller-tools versions, so that we can upgrade in deps in cilium/cilium at once.

Marking this as draft again.

@sayboras sayboras marked this pull request as draft October 2, 2024 11:28
sayboras added a commit to cilium/cilium that referenced this pull request Oct 2, 2024
This is to pick up the changes in cilium/deepequal-gen#7.
The main goal is to enable go 1.23 type alias again.

Relates: #34988
Relates: cilium/deepequal-gen#7

Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to sayboras/cilium that referenced this pull request Oct 3, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to sayboras/cilium that referenced this pull request Oct 7, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to sayboras/cilium that referenced this pull request Oct 15, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to sayboras/cilium that referenced this pull request Oct 15, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Oct 15, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Oct 16, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
@sayboras sayboras marked this pull request as ready for review October 16, 2024 02:05
@sayboras sayboras merged commit f57df2f into master Oct 16, 2024
@sayboras sayboras deleted the pr/tammach/gengo-v2 branch October 16, 2024 02:15
sayboras added a commit to cilium/cilium that referenced this pull request Oct 16, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Oct 16, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Oct 17, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Oct 19, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Oct 27, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Nov 1, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Nov 1, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Nov 5, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Nov 7, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Nov 15, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Nov 15, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Nov 25, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Nov 27, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Nov 28, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Nov 28, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Nov 28, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
sayboras added a commit to cilium/cilium that referenced this pull request Nov 28, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
github-merge-queue bot pushed a commit to cilium/cilium that referenced this pull request Nov 28, 2024
All files are re-generated again as there is change in generation tools.

Relates: kubernetes/kubernetes#127271
Relates: cilium/deepequal-gen#7
Relates: kubernetes-sigs/controller-tools#1061
Relates: 1d9d51f
Signed-off-by: Tam Mach <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants