-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Convert k8s.io/kubelet/pkg/apis/dra
from gogo to protoc
#133026
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1020,10 +1020,8 @@ function codegen::protobindings() { | |
|
||
# Each element of this array is a directory containing subdirectories which | ||
# eventually contain a file named "api.proto". | ||
local apis_using_gogo=( | ||
local apis=( | ||
"staging/src/k8s.io/kubelet/pkg/apis/dra" | ||
) | ||
local apis_using_protoc=( | ||
"staging/src/k8s.io/kubelet/pkg/apis/deviceplugin" | ||
"staging/src/k8s.io/kubelet/pkg/apis/podresources" | ||
"staging/src/k8s.io/kms/apis" | ||
|
@@ -1034,7 +1032,6 @@ function codegen::protobindings() { | |
"staging/src/k8s.io/externaljwt/apis" | ||
"staging/src/k8s.io/kubelet/pkg/apis/dra-health" | ||
) | ||
local apis=("${apis_using_gogo[@]}" "${apis_using_protoc[@]}") | ||
|
||
kube::log::status "protobuf bindings: ${#apis[@]} targets" | ||
if [[ "${DBG_CODEGEN}" == 1 ]]; then | ||
|
@@ -1050,15 +1047,13 @@ function codegen::protobindings() { | |
done | ||
|
||
if kube::protoc::check_protoc >/dev/null; then | ||
hack/_update-generated-proto-bindings-dockerized.sh gogo "${apis_using_gogo[@]}" | ||
hack/_update-generated-proto-bindings-dockerized.sh protoc "${apis_using_protoc[@]}" | ||
hack/_update-generated-proto-bindings-dockerized.sh protoc "${apis[@]}" | ||
Comment on lines
-1054
to
+1050
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll follow-up on the script part in a separate PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. follow-up is good, if we don't have any gogo proto bindings now, let's delete all the gogo logic from that path completely (drop the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ref: #133271 |
||
else | ||
kube::log::status "protoc ${PROTOC_VERSION} not found (can install with hack/install-protoc.sh); generating containerized..." | ||
# NOTE: All output from this script needs to be copied back to the calling | ||
# source tree. This is managed in kube::build::copy_output in build/common.sh. | ||
# If the output set is changed update that function. | ||
build/run.sh hack/_update-generated-proto-bindings-dockerized.sh gogo "${apis_using_gogo[@]}" | ||
build/run.sh hack/_update-generated-proto-bindings-dockerized.sh protoc "${apis_using_protoc[@]}" | ||
build/run.sh hack/_update-generated-proto-bindings-dockerized.sh protoc "${apis[@]}" | ||
fi | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we discover those instead of listing explicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(separate PR, not blocking this one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you asking if we can automatically distinguish which api.proto files are using gogo and which are using standard protoc, or if we can discover all api.proto files anywhere in the tree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
second. We switched to protoc everywhere. Now instead of listing APIs maybe we can discover them in the tree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it's possible, can look into doing that as a follow-up