Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions benchmarking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ Once installed:

### Rebuilding gRPC Python clients

Make sure you have a virtual environment created (`python3 -m venv venv`)
and activated (`source venv/bin/activate`).
Run `./hack/update/locust-protos.sh` to regenerate the checked-in Python stubs
under `benchmarking/locust/common/`. The generator uses a pinned venv in
`benchmarking/locust/codegen/` so the output does not depend on whatever
packages happen to be installed locally.

Install project requirements: `pip install -r requirements.txt`

Then run `generate_protos.sh` to generate the Python proto clients.
`hack/verify-all.sh` (and therefore `make verify`) fails if those stubs have
drifted from the `.proto` sources.
25 changes: 25 additions & 0 deletions hack/update/locust-protos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/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.

set -o errexit -o nounset -o pipefail

# Regenerates Locust's checked-in Python gRPC stubs from ateapi.proto and
# glutton.proto via benchmarking/locust/generate_protos.sh.

ROOT="$(git rev-parse --show-toplevel)"
cd "${ROOT}"

./benchmarking/locust/generate_protos.sh
25 changes: 25 additions & 0 deletions hack/verify/locust-protos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/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.

set -o errexit -o nounset -o pipefail

# Fails if Locust's checked-in Python gRPC stubs have drifted from the .proto
# sources. hack/verify-all.sh picks this up automatically.

ROOT="$(git rev-parse --show-toplevel)"
cd "${ROOT}"

./hack/third_party/kubernetes/verify-generated.sh locust-protos "$@"