Files
substrate/hack/verify/python-protos.sh
T
Julian Gutierrez Oschmann 21b0b030bc Generate the benchmark Python gRPC clients at image build time (#1825)
protoc's Python output puts the serialized descriptor on a single line
which makes any two concurrent ateapi.proto changes conflict.

This is unfortunate as both proto and go generated code usually merges
with no conflict.

Stop checking in the *_pb2*.py files. The locust and nighthawk-ingress
images now generate them in a build stage via
benchmarking/locust/codegen/generate.sh.

Fixes #1824
2026-09-23 19:45:51 +00:00

30 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Compiles the benchmarks' Python gRPC clients into a scratch directory, so a
# proto change that breaks them fails here rather than in the next benchmark
# image build. They are not checked in, so there is no drift to compare
# against.
set -o errexit -o nounset -o pipefail
ROOT="$(git rev-parse --show-toplevel)"
cd "${ROOT}"
out="$(mktemp -d)"
trap 'rm -rf "${out}"' EXIT
OUT_DIR="${out}" benchmarking/locust/codegen/generate.sh