Skip to content

Commit e625cd2

Browse files
committed
Merge branch 'main' into shuowei-deprecate-blob-api
2 parents b219d04 + e9c52b1 commit e625cd2

1,732 files changed

Lines changed: 240150 additions & 20438 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.

.gemini/config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Configure the behavior of the gemini code assist bot.
2+
# More info:
3+
# https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github
4+
have_fun: false
5+
code_review:
6+
pull_request_opened:
7+
help: false
8+
code_review: true
9+
include_drafts: true
10+
ignore_patterns:
11+
- "packages/**/services/**/client.py"

.generator/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ RUN unzip protoc-25.3-linux-x86_64.zip -d protoc
6666

6767
# Download/extract pandoc
6868
# Pandoc is required by gapic-generator-python for parsing documentation
69+
# version-scanner: ignore-next-line
6970
ENV PANDOC_VERSION=3.8.2
7071
RUN mkdir pandoc-binary
7172
RUN wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz

.generator/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def _run_post_processor(output: str, library_id: str, is_mono_repo: bool):
354354
# TODO(https://github.com/googleapis/google-cloud-python/issues/15538):
355355
# Investigate if a `target_version needs to be maintained
356356
# or can be eliminated.
357-
target_version = "py39"
357+
target_version = "py310"
358358
common_args = [
359359
f"--target-version={target_version}",
360360
"--line-length=88",

.generator/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ def test_run_individual_session_success(mocker, caplog, is_mono_repo):
741741
"cli.subprocess.run", return_value=MagicMock(returncode=0)
742742
)
743743

744-
test_session = "unit-3.9"
744+
test_session = "unit-3.10"
745745
test_library_id = "test-library"
746746
repo = "repo"
747747
_run_individual_session(test_session, test_library_id, repo, is_mono_repo)
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Deploy BigFrames docs to GitHub Pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["main"]
7+
paths:
8+
- "packages/bigframes/docs/**"
9+
- ".github/workflows/bigframes-docs-deploy.yaml"
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22+
concurrency:
23+
group: "pages"
24+
cancel-in-progress: false
25+
26+
jobs:
27+
# Build job
28+
build:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v6
33+
# Use a fetch-depth of 2 to avoid error `fatal: origin/main...HEAD: no merge base`
34+
# See https://github.com/googleapis/google-cloud-python/issues/12013
35+
# and https://github.com/actions/checkout#checkout-head.
36+
with:
37+
fetch-depth: 2
38+
- name: Setup Python
39+
uses: actions/setup-python@v6
40+
with:
41+
python-version: "3.10"
42+
- name: Install nox
43+
run: |
44+
python -m pip install --upgrade setuptools pip wheel
45+
python -m pip install nox
46+
- name: Run docs
47+
working-directory: ./packages/bigframes
48+
run: |
49+
nox -s docs
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v5
52+
with:
53+
path: packages/bigframes/docs/_build/html/
54+
55+
# Deployment job
56+
deploy:
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
runs-on: ubuntu-latest
61+
needs: build
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v5

.github/workflows/gapic-generator-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
SHOWCASE_VERSION: 0.35.0
1919
PROTOC_VERSION: 3.20.2
2020
LATEST_STABLE_PYTHON: 3.14
21-
ALL_PYTHON: "['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']"
21+
ALL_PYTHON: "['3.10', '3.11', '3.12', '3.13', '3.14']"
2222

2323
jobs:
2424
check_changes:
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: check that Librarian and legacylibrarian configs are consistent
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
permissions:
8+
contents: read
9+
jobs:
10+
config-check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v6
14+
# Use this action, rather than a file filter so that we can make this
15+
# mandatory.
16+
# See https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-including-branches
17+
# for more details.
18+
- uses: dorny/paths-filter@v4
19+
id: filter
20+
with:
21+
filters: |
22+
librarian:
23+
- 'librarian.yaml'
24+
- '.librarian/config.yaml'
25+
- '.librarian/state.yaml'
26+
- name: Config check
27+
id: config-check
28+
if: steps.filter.outputs.librarian == 'true'
29+
run: |
30+
V=$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
31+
go run "github.com/googleapis/librarian/tool/cmd/configcheck@${V}" .
32+
- name: Report any failures
33+
if: failure() && steps.config-check.outcome == 'failure'
34+
run: |
35+
echo "Library configuration is different between state.yaml and librarian.yaml.
36+
Update library configuration in the configs according to the error message and
37+
regenerate libraries using:
38+
39+
V=\$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
40+
go run github.com/googleapis/librarian/cmd/librarian@\${V} generate --all
41+
"
42+
# Make sure this step fails too, so that it's highlighted in the action logs.
43+
exit 1
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Regenerate all packages after merging to main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
issues: write
11+
12+
jobs:
13+
regenerate:
14+
runs-on: ubuntu-latest
15+
env:
16+
PANDOC_VERSION: 3.8.2
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v6
21+
22+
- name: Install Go
23+
uses: actions/setup-go@v6
24+
with:
25+
go-version: '1.26.x'
26+
27+
- name: Install protoc
28+
uses: arduino/setup-protoc@v3
29+
with:
30+
version: "25.3"
31+
32+
- name: Install pandoc
33+
run: |
34+
mkdir /tmp/pandoc
35+
curl -fsSL --retry 5 --retry-delay 15 -o /tmp/pandoc.tar.gz \
36+
https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz
37+
tar -xvf /tmp/pandoc.tar.gz -C /tmp/pandoc --strip-components=1
38+
39+
- name: Install Python packages for Librarian
40+
run: |
41+
version=$(sed -n 's/^version: *//p' librarian.yaml)
42+
go run "github.com/googleapis/librarian/cmd/librarian@${version}" install
43+
44+
- name: Regenerate
45+
run: |
46+
version=$(sed -n 's/^version: *//p' librarian.yaml)
47+
PATH=$PATH:/tmp/pandoc/bin
48+
go run "github.com/googleapis/librarian/cmd/librarian@${version}" generate -all -v
49+
50+
- name: Create issue on diff
51+
env:
52+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
run: |
54+
if [ -n "$(git status --porcelain)" ]; then
55+
TITLE="Regeneration check found diff"
56+
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
57+
DIFF_STAT=$(git diff --stat)
58+
BODY="The post-submit [regeneration check]($RUN_URL) found a diff.
59+
60+
Diff summary:
61+
\`\`\`
62+
$DIFF_STAT
63+
\`\`\`"
64+
65+
EXISTING_ISSUE=$(gh issue list --state open --search "in:title \"$TITLE\"" --json number --jq '.[0].number')
66+
if [ -z "$EXISTING_ISSUE" ]; then
67+
gh issue create --title "$TITLE" --body "$BODY"
68+
else
69+
echo "Issue #$EXISTING_ISSUE already exists, adding a comment."
70+
gh issue comment "$EXISTING_ISSUE" --body "Another failure with diff occurred: $RUN_URL"
71+
fi
72+
fi
73+
- name: Create issue on generation failure
74+
if: failure()
75+
env:
76+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
run: |
78+
TITLE="Regeneration failed"
79+
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
80+
BODY="The post-submit [regeneration check]($RUN_URL) failed."
81+
EXISTING_ISSUE=$(gh issue list --state open --search "in:title \"$TITLE\"" --json number --jq '.[0].number')
82+
if [ -z "$EXISTING_ISSUE" ]; then
83+
gh issue create --title "$TITLE" --body "$BODY"
84+
else
85+
echo "Issue #$EXISTING_ISSUE already exists, adding a comment."
86+
gh issue comment "$EXISTING_ISSUE" --body "Another regeneration failure occurred: $RUN_URL"
87+
fi

.kokoro/system.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,24 @@ for path in `find 'packages' \
133133
package_path="packages/${package_name}"
134134

135135
# Determine if we should skip based on git diff
136-
files_to_check="${package_path}/CHANGELOG.md"
136+
# We always check for changes in these specific versioning/config files
137+
files_to_check=(
138+
"${package_path}/CHANGELOG.md"
139+
"${package_path}/setup.py"
140+
"${package_path}/pyproject.toml"
141+
"${package_path}/**/gapic_version.py"
142+
"${package_path}/**/version.py"
143+
)
144+
145+
# If the package is in our "always run full system tests" list, check the whole directory
137146
if [[ $package_name == @($packages_with_system_tests_pattern) ]]; then
138-
files_to_check="${package_path}"
147+
files_to_check=("${package_path}")
139148
fi
140149

141-
echo "checking changes with 'git diff "${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH}...${KOKORO_GITHUB_PULL_REQUEST_COMMIT}" -- ${files_to_check}'"
150+
echo "checking changes with 'git diff ${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH}...${KOKORO_GITHUB_PULL_REQUEST_COMMIT} -- ${files_to_check[*]}'"
142151
set +e
143-
package_modified=$(git diff "${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH}...${KOKORO_GITHUB_PULL_REQUEST_COMMIT}" -- ${files_to_check} | wc -l)
152+
# Passing the array expanded as arguments to git diff
153+
package_modified=$(git diff "${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH}...${KOKORO_GITHUB_PULL_REQUEST_COMMIT}" -- "${files_to_check[@]}" | wc -l)
144154
set -e
145155

146156
if [[ "${package_modified}" -gt 0 || "$KOKORO_BUILD_ARTIFACTS_SUBDIR" == *"continuous"* ]]; then

.librarian/config.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,18 @@ libraries:
2727
# Allow release for google-crc32c once this bug is fixed.
2828
- id: "google-crc32c"
2929
release_blocked: true
30-
# TODO(https://github.com/googleapis/google-cloud-python/issues/16780):
31-
# Allow release for google-cloud-compute (and beta) after we've checked that
32-
# the gRPC service config is okay.
30+
# TODO(b/501132869): Disabling automatic releases until resolved.
31+
- id: "google-cloud-bigtable"
32+
release_blocked: true
33+
# TODO(https://github.com/googleapis/google-cloud-python/issues/16780): Disabling automatic releases until resolved.
3334
- id: "google-cloud-compute"
3435
release_blocked: true
35-
- id: "google-cloud-compute-v1beta"
36+
# TODO(https://github.com/googleapis/google-cloud-python/issues/16962):
37+
# Disable automatic releases until tests stabilize.
38+
- id: "pandas-gbq"
3639
release_blocked: true
37-
# TODO(b/501132869): Disabling automatic releases until resolved.
38-
- id: "google-cloud-bigtable"
40+
# TODO(https://github.com/googleapis/google-cloud-python/issues/16970):
41+
# Disable automatic releases until system tests are sped up or reorganized.
42+
- id: "google-cloud-firestore"
3943
release_blocked: true
44+

0 commit comments

Comments
 (0)