Skip to content

Conversation

@Joibel
Copy link
Member

@Joibel Joibel commented Jul 1, 2025

Motivation

Sometimes make codegen will fail with mysterious problems

topological order unsafe                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
topological order k8s.io/apimachinery/pkg/runtime/schema                                                                                                                                                                                                                                                                                                                                                                                                                                        
topological order k8s.io/apimachinery/pkg/util/intstr                                                                                                                                                                                           
topological order k8s.io/apimachinery/pkg/api/resource                                                                                                                                                                                          
topological order k8s.io/apimachinery/pkg/runtime                                                                                                                                                                                               
topological order k8s.io/apimachinery/pkg/apis/meta/v1                                                                                                                                                                                          
topological order k8s.io/api/core/v1                                                                                                                                                                                                                                                                                                                                                                                                                                                            
topological order k8s.io/api/policy/v1                                                                                                                                                                                                                                                                                                                                                                                                                                                          
topological order github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1                                                                                                                                                              
2025/07/01 09:56:44 k8s.io/apimachinery/pkg/runtime/generated.proto: File not found.                                                                                                                                                            
k8s.io/apimachinery/pkg/runtime/schema/generated.proto: File not found.                                                                                                                                                                         
github.com/argoproj/argo-workflows/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto:9:1: Import "k8s.io/apimachinery/pkg/runtime/generated.proto" was not found or had errors.                                                                                                                                                                                                                                                                                                       
github.com/argoproj/argo-workflows/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto:10:1: Import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto" was not found or had errors.                                               
github.com/argoproj/argo-workflows/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto:512:12: "k8s.io.apimachinery.pkg.runtime.RawExtension" is not defined.                                                                           
github.com/argoproj/argo-workflows/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto:1277:12: "k8s.io.apimachinery.pkg.runtime.RawExtension" is not defined.                                                                                                                                                                                                                                                                                                                          
2025/07/01 09:56:44 protoc -I . -I /home/vscode/go/src -I /home/vscode/go/src --gogo_out=/home/vscode/go/src /home/vscode/go/src/github.com/argoproj/argo-workflows/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto                                                                                                                                                                                                                                                                 
2025/07/01 09:56:44 Unable to generate protoc on k8s.io.apimachinery.pkg.apis.meta.v1: exit status 1                                                                                                                                                                                                                                                                                                                                                                                            
make: *** [Makefile:422: pkg/apis/workflow/v1alpha1/generated.proto] Error 1          

go-to-protobuf reads the whole project, and downloads dependencies I think. It fails to download dependencies but carries on if it can't read the whole project - and then you see this kind of error.

Modifications

Make lint-go a dependency of this step of codegen. This will cause the linter to cry at you first with relevant words that lead to something that you can fix.

Verification

Bad code now causes make codegen to tell you what to fix.

Documentation

DevX only

@Joibel Joibel added the area/contributing Contributing docs, ownership, etc. Also devtools like devcontainer and Nix label Jul 1, 2025
@Joibel Joibel enabled auto-merge (squash) July 10, 2025 07:10
@Joibel Joibel merged commit 175322c into argoproj:main Jul 10, 2025
60 of 62 checks passed
isubasinghe pushed a commit that referenced this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/contributing Contributing docs, ownership, etc. Also devtools like devcontainer and Nix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants