Skip to content

Commit a28efc1

Browse files
authored
Merge branch 'main' into migration.python-bigquery-magics.migration.2026-03-02_16-59-45.migrate
2 parents c08f497 + f26d29e commit a28efc1

701 files changed

Lines changed: 309578 additions & 7448 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ coverage.xml
5757
*sponge_log.xml
5858

5959
# System test environment variables.
60-
system_tests/local_test_setup
60+
**/system_tests/local_test_setup
61+
**/system_tests/data
6162

6263
# Make sure a generated file isn't accidentally committed.
6364
pylintrc

.kokoro/system-single.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ pwd
2222

2323
# If NOX_SESSION is set, it only runs the specified session,
2424
# otherwise run all the sessions.
25-
SESSION_ARG=""
25+
NOX_SESSION_ARG=""
2626

27-
[[ -z "${NOX_SESSION}" ]] || SESSION_ARG="-s ${NOX_SESSION}"
28-
python3 -m nox ${SESSION_ARG}
27+
# IF NOX_FILE is set, it runs the specific nox file,
28+
# otherwise it runs noxfile.py in the package directory.
29+
NOX_FILE_ARG=""
30+
31+
[[ -z "${NOX_SESSION}" ]] || NOX_SESSION_ARG="-s ${NOX_SESSION}"
32+
33+
[[ -z "${NOX_FILE}" ]] || NOX_FILE_ARG="-f ${NOX_FILE}"
34+
35+
python3 -m nox ${NOX_SESSION_ARG} $NOX_FILE_ARG

.kokoro/system.sh

Lines changed: 77 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,69 @@ export PYTHONUNBUFFERED=1
2424
# Setup firestore account credentials
2525
export FIRESTORE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/firebase-credentials.json
2626

27-
# Setup service account credentials.
28-
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
29-
30-
# Setup project id.
31-
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
32-
33-
RETVAL=0
34-
3527
export PROJECT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..)
3628

3729
cd "$PROJECT_ROOT"
3830

39-
pwd
40-
41-
# A file for running system tests
42-
system_test_script="${PROJECT_ROOT}/.kokoro/system-single.sh"
43-
4431
# This is needed in order for `git diff` to succeed
4532
git config --global --add safe.directory $(realpath .)
4633

34+
RETVAL=0
35+
36+
pwd
37+
38+
run_package_test() {
39+
local package_name=$1
40+
local package_path="packages/${package_name}"
41+
42+
# Declare local overrides to prevent bleeding into the next loop iteration
43+
local PROJECT_ID
44+
local GOOGLE_APPLICATION_CREDENTIALS
45+
local NOX_FILE
46+
local NOX_SESSION
47+
48+
echo "------------------------------------------------------------"
49+
echo "Configuring environment for: ${package_name}"
50+
echo "------------------------------------------------------------"
51+
52+
case "${package_name}" in
53+
"google-auth")
54+
# Copy files needed for google-auth system tests
55+
mkdir -p "${package_path}/system_tests/data"
56+
cp "${KOKORO_GFILE_DIR}/google-auth-service-account.json" "${package_path}/system_tests/data/service_account.json"
57+
cp "${KOKORO_GFILE_DIR}/google-auth-authorized-user.json" "${package_path}/system_tests/data/authorized_user.json"
58+
cp "${KOKORO_GFILE_DIR}/google-auth-impersonated-service-account.json" "${package_path}/system_tests/data/impersonated_service_account.json"
59+
60+
PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/google-auth-project-id.json")
61+
GOOGLE_APPLICATION_CREDENTIALS="${KOKORO_GFILE_DIR}/google-auth-service-account.json"
62+
NOX_FILE="system_tests/noxfile.py"
63+
NOX_SESSION=""
64+
;;
65+
*)
66+
PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
67+
GOOGLE_APPLICATION_CREDENTIALS="${KOKORO_GFILE_DIR}/service-account.json"
68+
NOX_FILE="noxfile.py"
69+
NOX_SESSION="system-3.12"
70+
;;
71+
esac
72+
73+
# Export variables for the duration of this function's sub-processes
74+
export PROJECT_ID GOOGLE_APPLICATION_CREDENTIALS NOX_FILE NOX_SESSION
75+
76+
gcloud auth activate-service-account --key-file="$GOOGLE_APPLICATION_CREDENTIALS"
77+
gcloud config set project "$PROJECT_ID"
78+
79+
# Run the actual test
80+
pushd "${package_path}" > /dev/null
81+
set +e
82+
"${system_test_script}"
83+
local res=$?
84+
set -e
85+
popd > /dev/null
86+
87+
return $res
88+
}
89+
4790
packages_with_system_tests=(
4891
"google-auth"
4992
"google-cloud-bigquery-storage"
@@ -56,42 +99,38 @@ packages_with_system_tests=(
5699
"google-cloud-testutils"
57100
)
58101

102+
# A file for running system tests
103+
system_test_script="${PROJECT_ROOT}/.kokoro/system-single.sh"
104+
59105
# Join array elements with | for the pattern match
60106
packages_with_system_tests_pattern=$(printf "|*%s*" "${packages_with_system_tests[@]}")
61107
packages_with_system_tests_pattern="${packages_with_system_tests_pattern:1}" # Remove the leading pipe
62108

63-
64-
# Run system tests for each package with directory packages/*/tests/system
65-
for dir in `find 'packages' -type d -wholename 'packages/*/tests/system'`; do
66-
# Get the path to the package by removing the suffix /tests/system
67-
package=$(echo $dir | cut -f -2 -d '/')
68-
69-
# Run system tests on every change to these libraries
70-
if [[ $package == @($packages_with_system_tests_pattern) ]]; then
71-
files_to_check=${package}
72-
else
73-
files_to_check=${package}/CHANGELOG.md
109+
# Run system tests for each package with directory `packages/*/tests/system` or directory `packages/*/system_tests`
110+
for dir in `find 'packages' -type d -wholename 'packages/*/tests/system' -o -wholename 'packages/*/system_tests'`; do
111+
# Extract the package name and define the relative package path
112+
# 1. Remove the 'packages/' prefix from the start
113+
# 2. Remove everything after the first '/' remaining
114+
package_name=${dir#packages/}
115+
package_name=${package_name%%/*}
116+
package_path="packages/${package_name}"
117+
118+
# Determine if we should skip based on git diff
119+
files_to_check="${package_path}/CHANGELOG.md"
120+
if [[ $package_name == @($packages_with_system_tests_pattern) ]]; then
121+
files_to_check="${package_path}"
74122
fi
75123

76124
echo "checking changes with 'git diff "${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH}...${KOKORO_GITHUB_PULL_REQUEST_COMMIT}" -- ${files_to_check}'"
77125
set +e
78126
package_modified=$(git diff "${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH}...${KOKORO_GITHUB_PULL_REQUEST_COMMIT}" -- ${files_to_check} | wc -l)
79127
set -e
80-
if [[ "${package_modified}" -eq 0 ]]; then
81-
echo "no change detected in ${files_to_check}, skipping"
128+
129+
if [[ "${package_modified}" -gt 0 ]]; then
130+
# Call the function - its internal exports won't affect the next loop
131+
run_package_test "$package_name" || RETVAL=$?
82132
else
83-
echo "change detected in ${files_to_check}"
84-
echo "Running system tests for ${package}"
85-
pushd ${package}
86-
# Temporarily allow failure.
87-
set +e
88-
${system_test_script}
89-
ret=$?
90-
set -e
91-
if [ ${ret} -ne 0 ]; then
92-
RETVAL=${ret}
93-
fi
94-
popd
133+
echo "No changes in ${package_name}, skipping."
95134
fi
96135
done
97136
exit ${RETVAL}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"api_description": "The Cluster Director API allows you to deploy, manage, and monitor clusters that run AI, ML, or HPC workloads.",
3+
"api_id": "hypercomputecluster.googleapis.com",
4+
"api_shortname": "hypercomputecluster",
5+
"client_documentation": "https://cloud.google.com/python/docs/reference/google-cloud-hypercomputecluster/latest",
6+
"default_version": "v1",
7+
"distribution_name": "google-cloud-hypercomputecluster",
8+
"issue_tracker": "https://issuetracker.google.com/issues/new?component=1907878&template=2195617",
9+
"language": "python",
10+
"library_type": "GAPIC_AUTO",
11+
"name": "google-cloud-hypercomputecluster",
12+
"name_pretty": "Cluster Director API",
13+
"product_documentation": "https://cloud.google.com/blog/products/compute/managed-slurm-and-other-cluster-director-enhancements",
14+
"release_level": "preview",
15+
"repo": "googleapis/google-cloud-python"
16+
}

.librarian/state.yaml

Lines changed: 54 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ libraries:
99
preserve_regex: []
1010
remove_regex: []
1111
tag_format: '{id}-v{version}'
12+
- id: db-dtypes
13+
version: 1.5.0
14+
last_generated_commit: ""
15+
apis: []
16+
source_roots:
17+
- packages/db-dtypes
18+
preserve_regex: []
19+
remove_regex: []
20+
tag_format: '{id}-v{version}'
1221
- id: google-ads-admanager
1322
version: 0.8.0
1423
last_generated_commit: effe5c4fa816021e724ca856d5640f2e55b14a8b
@@ -222,6 +231,15 @@ libraries:
222231
remove_regex:
223232
- packages/google-area120-tables/
224233
tag_format: '{id}-v{version}'
234+
- id: google-auth
235+
version: 2.49.0
236+
last_generated_commit: ""
237+
apis: []
238+
source_roots:
239+
- packages/google-auth
240+
preserve_regex: []
241+
remove_regex: []
242+
tag_format: '{id}-v{version}'
225243
- id: google-auth-httplib2
226244
version: 0.3.0
227245
last_generated_commit: ""
@@ -287,8 +305,8 @@ libraries:
287305
- packages/google-cloud-advisorynotifications/
288306
tag_format: '{id}-v{version}'
289307
- id: google-cloud-alloydb
290-
version: 0.7.0
291-
last_generated_commit: d4a34bf03d617723146fe3ae15192c4d93981a27
308+
version: 0.8.0
309+
last_generated_commit: 5c9602dbb5ac6856c07daf83be1fbd001a972ef3
292310
apis:
293311
- path: google/cloud/alloydb/v1beta
294312
service_config: alloydb_v1beta.yaml
@@ -523,7 +541,7 @@ libraries:
523541
tag_format: '{id}-v{version}'
524542
- id: google-cloud-auditmanager
525543
version: 0.1.0
526-
last_generated_commit: 9eea40c74d97622bb0aa406dd313409a376cc73b
544+
last_generated_commit: 5c9602dbb5ac6856c07daf83be1fbd001a972ef3
527545
apis:
528546
- path: google/cloud/auditmanager/v1
529547
service_config: auditmanager_v1.yaml
@@ -1041,7 +1059,7 @@ libraries:
10411059
tag_format: '{id}-v{version}'
10421060
- id: google-cloud-commerce-consumer-procurement
10431061
version: 0.4.0
1044-
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
1062+
last_generated_commit: 5c9602dbb5ac6856c07daf83be1fbd001a972ef3
10451063
apis:
10461064
- path: google/cloud/commerce/consumer/procurement/v1
10471065
service_config: cloudcommerceconsumerprocurement_v1.yaml
@@ -1071,8 +1089,8 @@ libraries:
10711089
- packages/google-cloud-common/
10721090
tag_format: '{id}-v{version}'
10731091
- id: google-cloud-compute
1074-
version: 1.44.0
1075-
last_generated_commit: 69bf99a9d0910fa86c3c5867ea357aa004dfcc55
1092+
version: 1.45.0
1093+
last_generated_commit: e8a3d84236cc27875073b1f817e49d7faee11f0d
10761094
apis:
10771095
- path: google/cloud/compute/v1
10781096
service_config: compute_v1.yaml
@@ -1086,8 +1104,8 @@ libraries:
10861104
- packages/google-cloud-compute/
10871105
tag_format: '{id}-v{version}'
10881106
- id: google-cloud-compute-v1beta
1089-
version: 0.7.0
1090-
last_generated_commit: 69bf99a9d0910fa86c3c5867ea357aa004dfcc55
1107+
version: 0.8.0
1108+
last_generated_commit: e8a3d84236cc27875073b1f817e49d7faee11f0d
10911109
apis:
10921110
- path: google/cloud/compute/v1beta
10931111
service_config: compute_v1beta.yaml
@@ -1586,8 +1604,8 @@ libraries:
15861604
remove_regex: []
15871605
tag_format: '{id}-v{version}'
15881606
- id: google-cloud-documentai
1589-
version: 3.10.0
1590-
last_generated_commit: 9eea40c74d97622bb0aa406dd313409a376cc73b
1607+
version: 3.11.0
1608+
last_generated_commit: 5c9602dbb5ac6856c07daf83be1fbd001a972ef3
15911609
apis:
15921610
- path: google/cloud/documentai/v1beta3
15931611
service_config: documentai_v1beta3.yaml
@@ -1601,6 +1619,15 @@ libraries:
16011619
remove_regex:
16021620
- packages/google-cloud-documentai/
16031621
tag_format: '{id}-v{version}'
1622+
- id: google-cloud-documentai-toolbox
1623+
version: 0.15.1-alpha
1624+
last_generated_commit: ""
1625+
apis: []
1626+
source_roots:
1627+
- packages/google-cloud-documentai-toolbox
1628+
preserve_regex: []
1629+
remove_regex: []
1630+
tag_format: '{id}-v{version}'
16041631
- id: google-cloud-domains
16051632
version: 1.12.0
16061633
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
@@ -1767,15 +1794,15 @@ libraries:
17671794
- packages/google-cloud-financialservices/
17681795
tag_format: '{id}-v{version}'
17691796
- id: google-cloud-firestore
1770-
version: 2.23.0
1771-
last_generated_commit: d420134ab324c0cbe0f4ae06ad9697dac77f26ad
1797+
version: 2.24.0
1798+
last_generated_commit: 572d5d51926dfa9e7509e12ec61e98ce19650f7c
17721799
apis:
1773-
- path: google/firestore/v1
1774-
service_config: firestore_v1.yaml
17751800
- path: google/firestore/admin/v1
17761801
service_config: firestore_v1.yaml
17771802
- path: google/firestore/bundle
17781803
service_config: ""
1804+
- path: google/firestore/v1
1805+
service_config: firestore_v1.yaml
17791806
source_roots:
17801807
- packages/google-cloud-firestore
17811808
preserve_regex:
@@ -1969,11 +1996,13 @@ libraries:
19691996
- packages/google-cloud-gsuiteaddons
19701997
tag_format: '{id}-v{version}'
19711998
- id: google-cloud-hypercomputecluster
1972-
version: 0.2.0
1973-
last_generated_commit: c662840a94dbdf708caa44893a2d49119cdd391c
1999+
version: 0.3.0
2000+
last_generated_commit: 23ec7b6ee94a2fe364cdb5a212949f1cf37f85ad
19742001
apis:
19752002
- path: google/cloud/hypercomputecluster/v1beta
19762003
service_config: hypercomputecluster_v1beta.yaml
2004+
- path: google/cloud/hypercomputecluster/v1
2005+
service_config: hypercomputecluster_v1.yaml
19772006
source_roots:
19782007
- packages/google-cloud-hypercomputecluster
19792008
preserve_regex:
@@ -2140,7 +2169,7 @@ libraries:
21402169
- packages/google-cloud-locationfinder/
21412170
tag_format: '{id}-v{version}'
21422171
- id: google-cloud-logging
2143-
version: 3.13.0
2172+
version: 3.14.0
21442173
last_generated_commit: 69bf99a9d0910fa86c3c5867ea357aa004dfcc55
21452174
apis:
21462175
- path: google/logging/v2
@@ -2412,8 +2441,8 @@ libraries:
24122441
- packages/google-cloud-network-connectivity/
24132442
tag_format: '{id}-v{version}'
24142443
- id: google-cloud-network-management
2415-
version: 1.32.0
2416-
last_generated_commit: cfe62b3c5ceb9f81879c61480f26707980534462
2444+
version: 1.33.0
2445+
last_generated_commit: 5c9602dbb5ac6856c07daf83be1fbd001a972ef3
24172446
apis:
24182447
- path: google/cloud/networkmanagement/v1
24192448
service_config: networkmanagement_v1.yaml
@@ -3128,8 +3157,8 @@ libraries:
31283157
- packages/google-cloud-storage-transfer/
31293158
tag_format: '{id}-v{version}'
31303159
- id: google-cloud-storagebatchoperations
3131-
version: 0.4.0
3132-
last_generated_commit: 1133adb136f742df62864f1d9d307df25d451880
3160+
version: 0.5.0
3161+
last_generated_commit: 5c9602dbb5ac6856c07daf83be1fbd001a972ef3
31333162
apis:
31343163
- path: google/cloud/storagebatchoperations/v1
31353164
service_config: storagebatchoperations_v1.yaml
@@ -3306,8 +3335,8 @@ libraries:
33063335
- packages/google-cloud-translate/
33073336
tag_format: '{id}-v{version}'
33083337
- id: google-cloud-vectorsearch
3309-
version: 0.5.0
3310-
last_generated_commit: 45e46bdae3874d2b92a2ced22529fc7037a1878f
3338+
version: 0.6.0
3339+
last_generated_commit: 5c9602dbb5ac6856c07daf83be1fbd001a972ef3
33113340
apis:
33123341
- path: google/cloud/vectorsearch/v1beta
33133342
service_config: vectorsearch_v1beta.yaml
@@ -3951,8 +3980,8 @@ libraries:
39513980
- packages/google-shopping-type/
39523981
tag_format: '{id}-v{version}'
39533982
- id: googleapis-common-protos
3954-
version: 1.72.0
3955-
last_generated_commit: c662840a94dbdf708caa44893a2d49119cdd391c
3983+
version: 1.73.0
3984+
last_generated_commit: 5c9602dbb5ac6856c07daf83be1fbd001a972ef3
39563985
apis:
39573986
- path: google/api
39583987
service_config: serviceconfig.yaml

0 commit comments

Comments
 (0)