Skip to content

Commit 4f69499

Browse files
committed
Merge branch 'main' into test-librarian-with-new-wrkflw
2 parents 1fc5edc + fd8cef6 commit 4f69499

993 files changed

Lines changed: 101149 additions & 15693 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.

.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/continuous/continuous-bigframes.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ env_vars: {
55
key: "NOX_SESSION"
66
value: "e2e load system_prerelease notebook system_noextras"
77
}
8+
9+
env_vars: {
10+
key: "BIGFRAMES_TEST_PROJECT"
11+
value: "bigframes-load-testing"
12+
}

.kokoro/continuous/prerelease.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ env_vars: {
55
key: "NOX_SESSION"
66
value: "prerelease_deps"
77
}
8+
9+
env_vars: {
10+
key: "BIGFRAMES_TEST_PROJECT"
11+
value: "bigframes-load-testing"
12+
}

.kokoro/continuous/system.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ env_vars: {
55
key: "NOX_SESSION"
66
value: "system-3.12"
77
}
8+
9+
env_vars: {
10+
key: "BIGFRAMES_TEST_PROJECT"
11+
value: "bigframes-load-testing"
12+
}

0 commit comments

Comments
 (0)