Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Commit fc0b0a7

Browse files
authored
ci: reduce number of workers for presubmit check (#447)
This reverts commit 7959874. fixes #444
1 parent 3264f75 commit fc0b0a7

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

.kokoro/build.sh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,23 @@ sudo apt-get update
5757
apt-get install -y libffi-dev libjpeg-dev zlib1g-dev libmemcached-dev
5858
cd $DJANGO_TESTS_DIR/django && pip3 install -e . && pip3 install -r tests/requirements/py3.txt; cd ../../
5959

60-
61-
if [[ $KOKORO_JOB_NAME == *"continuous"* ]]
60+
if [[ $USE_SPANNER_EMULATOR != 1 ]]
6261
then
63-
# Disable continuous build as it creates too many Spanner instances
64-
# ("Quota exceeded for quota metric 'Instance create requests' and
65-
# limit 'Instance create requests per minute' of service
66-
# 'spanner.googleapis.com').
67-
export DJANGO_WORKER_COUNT=0
62+
# Not using the emulator!
63+
# Hardcode the max number of workers since Spanner has a very low
64+
# QPS for administrative RPCs of 5QPS (averaged every 100 seconds)
65+
if [[ $KOKORO_JOB_NAME == *"continuous"* ]]
66+
then
67+
# Disable continuous build as it creates too many Spanner instances
68+
# ("Quota exceeded for quota metric 'Instance create requests' and
69+
# limit 'Instance create requests per minute' of service
70+
# 'spanner.googleapis.com').
71+
export DJANGO_WORKER_COUNT=0
72+
else
73+
export DJANGO_WORKER_COUNT=6
74+
fi
6875
else
6976
export DJANGO_WORKER_COUNT=$(ls .kokoro/presubmit/worker* | wc -l)
70-
fi
71-
72-
if [[ $USE_SPANNER_EMULATOR == 1 ]]
73-
then
7477
# Install and start the Spanner emulator
7578
VERSION=0.7.3
7679
wget https://storage.googleapis.com/cloud-spanner-emulator/releases/${VERSION}/cloud-spanner-emulator_linux_amd64-${VERSION}.tar.gz 2&>/dev/null

0 commit comments

Comments
 (0)