Skip to content

Commit 43dfc16

Browse files
authored
chore: add bigframes load test config to the kokoro configs (#17035)
Changes are pulled from the old BigFrames repo: * https://github.com/googleapis/python-bigquery-dataframes/blob/main/.kokoro/load/load.cfg * https://github.com/googleapis/python-bigquery-dataframes/blob/main/.kokoro/load/common.cfg * https://github.com/googleapis/python-bigquery-dataframes/blob/main/.kokoro/build.sh We will also add configs to pipers so that the BigFrames load test will have its own dedicated Kokoro job. Internal issue: b/509623551
1 parent c538bf6 commit 43dfc16

2 files changed

Lines changed: 82 additions & 0 deletions

File tree

.kokoro/build-bigframes.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
# Copyright 2023 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -eo pipefail
17+
18+
PROJECT_SCM="github/google-cloud-python/packages/bigframes"
19+
20+
if [[ -z "${PROJECT_ROOT:-}" ]]; then
21+
PROJECT_ROOT="${KOKORO_ARTIFACTS_DIR}/${PROJECT_SCM}"
22+
fi
23+
24+
cd "${PROJECT_ROOT}"
25+
26+
# Disable buffering, so that the logs stream through.
27+
export PYTHONUNBUFFERED=1
28+
29+
# Workaround https://github.com/pytest-dev/pytest/issues/9567
30+
export PY_IGNORE_IMPORTMISMATCH=1
31+
32+
# Debug: show build environment
33+
env | grep KOKORO
34+
35+
# Install pip
36+
python3 -m pip install --upgrade --quiet pip
37+
python3 -m pip --version
38+
39+
# Remove old nox
40+
python3 -m pip uninstall --yes --quiet nox-automation
41+
42+
# Install nox
43+
python3 -m pip install --upgrade --quiet nox
44+
python3 -m nox --version
45+
46+
# If NOX_SESSION is set, it only runs the specified session,
47+
# otherwise run all the sessions.
48+
if [[ -n "${NOX_SESSION:-}" ]]; then
49+
python3 -m nox --stop-on-first-error -s ${NOX_SESSION:-}
50+
else
51+
python3 -m nox --stop-on-first-error
52+
fi
53+
54+
# Prevent kokoro from trying to collect many mb of artifacts, wasting several minutes
55+
sudo rm -rf "${KOKORO_ARTIFACTS_DIR?}"/*

.kokoro/load/load-bigframes.cfg

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Build logs will be here
4+
action {
5+
define_artifacts {
6+
regex: "**/*sponge_log.xml"
7+
}
8+
}
9+
10+
build_file: "google-cloud-python/.kokoro/build-bigframes.sh"
11+
timeout_mins: 720
12+
13+
# Only run this nox session.
14+
env_vars: {
15+
key: "NOX_SESSION"
16+
value: "load"
17+
}
18+
19+
env_vars: {
20+
key: "GOOGLE_CLOUD_PROJECT"
21+
value: "bigframes-load-testing"
22+
}
23+
24+
env_vars: {
25+
key: "BIGFRAMES_TEST_MODEL_VERTEX_ENDPOINT"
26+
value: "https://us-central1-aiplatform.googleapis.com/v1/projects/272725758477/locations/us-central1/endpoints/590545496255234048"
27+
}

0 commit comments

Comments
 (0)