Skip to content

Commit e77931f

Browse files
committed
Merge branch 'main' into owl-bot-copy
2 parents a2fa611 + 4492f9f commit e77931f

File tree

84 files changed

+9591
-156
lines changed

Some content is hidden

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

84 files changed

+9591
-156
lines changed

.cross_sync/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ CrossSync provides a set of annotations to mark up async classes, to guide the g
6262

6363
### Code Generation
6464

65-
Generation can be initiated using `python .cross_sync/generate.py .`
65+
Generation can be initiated using `nox -s generate_sync`
6666
from the root of the project. This will find all classes with the `__CROSS_SYNC_OUTPUT__ = "path/to/output"`
6767
annotation, and generate a sync version of classes marked with `@CrossSync.convert_sync` at the output path.
6868

69+
There is a unit test at `tests/unit/data/test_sync_up_to_date.py` that verifies that the generated code is up to date
70+
6971
## Architecture
7072

7173
CrossSync is made up of two parts:

.github/.OwlBot.lock.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:5cddfe2fb5019bbf78335bc55f15bc13e18354a56b3ff46e1834f8e540807f05
17-
# created: 2024-10-31T01:41:07.349286254Z
16+
digest: sha256:f016446d6e520e5fb552c45b110cba3f217bffdd3d06bdddd076e9e6d13266cf
17+
# created: 2025-02-21T19:32:52.01306189Z

.github/release-trigger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
enabled: true
2-
multiScmName:
2+
multiScmName: python-bigtable

.github/workflows/conformance.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ jobs:
2626
matrix:
2727
test-version: [ "v0.0.2" ]
2828
py-version: [ 3.8 ]
29-
client-type: [ "async", "legacy" ]
29+
client-type: [ "async", "sync", "legacy" ]
30+
include:
31+
- client-type: "sync"
32+
# sync client does not support concurrent streams
33+
test_args: "-skip _Generic_MultiStream"
34+
- client-type: "legacy"
35+
# legacy client is synchronous and does not support concurrent streams
36+
# legacy client does not expose mutate_row. Disable those tests
37+
test_args: "-skip _Generic_MultiStream -skip TestMutateRow_"
3038
fail-fast: false
3139
name: "${{ matrix.client-type }} client / python ${{ matrix.py-version }} / test tag ${{ matrix.test-version }}"
3240
steps:
@@ -53,4 +61,6 @@ jobs:
5361
env:
5462
CLIENT_TYPE: ${{ matrix.client-type }}
5563
PYTHONUNBUFFERED: 1
64+
TEST_ARGS: ${{ matrix.test_args }}
65+
PROXY_PORT: 9999
5666

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Python
1313
uses: actions/setup-python@v5
1414
with:
15-
python-version: "3.9"
15+
python-version: "3.10"
1616
- name: Install nox
1717
run: |
1818
python -m pip install --upgrade setuptools pip wheel

.github/workflows/unittest.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ on:
55
name: unittest
66
jobs:
77
unit:
8-
runs-on: ubuntu-latest
8+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2303): use `ubuntu-latest` once this bug is fixed.
9+
# Use ubuntu-22.04 until Python 3.7 is removed from the test matrix
10+
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
11+
runs-on: ubuntu-22.04
912
strategy:
1013
matrix:
1114
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

.kokoro/build.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515

1616
set -eo pipefail
1717

18+
CURRENT_DIR=$(dirname "${BASH_SOURCE[0]}")
19+
1820
if [[ -z "${PROJECT_ROOT:-}" ]]; then
19-
PROJECT_ROOT="github/python-bigtable"
21+
PROJECT_ROOT=$(realpath "${CURRENT_DIR}/..")
2022
fi
2123

22-
cd "${PROJECT_ROOT}"
24+
pushd "${PROJECT_ROOT}"
2325

2426
# Disable buffering, so that the logs stream through.
2527
export PYTHONUNBUFFERED=1
@@ -28,10 +30,16 @@ export PYTHONUNBUFFERED=1
2830
env | grep KOKORO
2931

3032
# Setup service account credentials.
31-
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
33+
if [[ -f "${KOKORO_GFILE_DIR}/service-account.json" ]]
34+
then
35+
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
36+
fi
3237

3338
# Setup project id.
34-
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
39+
if [[ -f "${KOKORO_GFILE_DIR}/project-id.json" ]]
40+
then
41+
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
42+
fi
3543

3644
# If this is a continuous build, send the test log to the FlakyBot.
3745
# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot.
@@ -46,7 +54,7 @@ fi
4654
# If NOX_SESSION is set, it only runs the specified session,
4755
# otherwise run all the sessions.
4856
if [[ -n "${NOX_SESSION:-}" ]]; then
49-
python3 -m nox -s ${NOX_SESSION:-}
57+
python3 -m nox -s ${NOX_SESSION:-}
5058
else
51-
python3 -m nox
59+
python3 -m nox
5260
fi

.kokoro/conformance.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,7 @@ set -eo pipefail
1919
## cd to the parent directory, i.e. the root of the git repo
2020
cd $(dirname $0)/..
2121

22-
PROXY_ARGS=""
23-
TEST_ARGS=""
24-
if [[ "${CLIENT_TYPE^^}" == "LEGACY" ]]; then
25-
echo "Using legacy client"
26-
# legacy client does not expose mutate_row. Disable those tests
27-
TEST_ARGS="-skip TestMutateRow_"
28-
fi
29-
3022
# Build and start the proxy in a separate process
31-
PROXY_PORT=9999
3223
pushd test_proxy
3324
nohup python test_proxy.py --port $PROXY_PORT --client_type=$CLIENT_TYPE &
3425
proxyPID=$!
@@ -42,6 +33,7 @@ function cleanup() {
4233
trap cleanup EXIT
4334

4435
# Run the conformance test
36+
echo "running tests with args: $TEST_ARGS"
4537
pushd cloud-bigtable-clients-test/tests
4638
eval "go test -v -proxy_addr=:$PROXY_PORT $TEST_ARGS"
4739
RETURN_CODE=$?
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
nox
2+
gcp-docuploader

0 commit comments

Comments
 (0)