Skip to content

Commit 837fd13

Browse files
authored
Merge branch 'main' into migration.python-dns.migration.2026-02-09_17-15-38.migrate
2 parents 88e3080 + 9f6e8f5 commit 837fd13

File tree

581 files changed

+140804
-28814
lines changed

Some content is hidden

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

581 files changed

+140804
-28814
lines changed

.generator/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ RUN tar -xvf pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz -C pandoc-binary --stri
7575
# This needs to be a single command so that the git clone command is not cached
7676
RUN git clone https://github.com/googleapis/synthtool.git synthtool && \
7777
cd synthtool && \
78-
git checkout 6702a344265de050bceaff45d62358bb0023ba7d
78+
git checkout afd7725f32d522a95e964884e0fba6d0d6b4cb6a
7979

8080
# --- Final Stage ---
8181
# This stage creates the lightweight final image, copying only the

.generator/cli.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,22 @@ def _run_post_processor(output: str, library_id: str, is_mono_repo: bool):
348348
else:
349349
raise SYNTHTOOL_IMPORT_ERROR # pragma: NO COVER
350350

351-
# If there is no noxfile, run `isort`` and `black` on the output.
351+
# If there is no noxfile, run `ruff` on the output.
352352
# This is required for proto-only libraries which are not GAPIC.
353353
if not Path(f"{output}/{path_to_library}/noxfile.py").exists():
354-
subprocess.run(["isort", output])
355-
subprocess.run(["black", output])
354+
# TODO(https://github.com/googleapis/google-cloud-python/issues/15538):
355+
# Investigate if a `target_version needs to be maintained
356+
# or can be eliminated.
357+
target_version = "py37"
358+
common_args = [
359+
f"--target-version={target_version}",
360+
"--line-length=88",
361+
]
362+
# 1. Run Ruff to fix imports (replaces isort)
363+
subprocess.run(["ruff", "check", "--select", "I", "--fix", *common_args], check=True)
364+
365+
# 2. Run Ruff to format code (replaces black)
366+
subprocess.run(["ruff", "format", *common_args], check=True)
356367

357368
logger.info("Python post-processor ran successfully.")
358369

.generator/requirements-test.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ pytest-mock
1818
gcp-synthtool @ git+https://github.com/googleapis/synthtool@5aa438a342707842d11fbbb302c6277fbf9e4655
1919
starlark-pyo3>=2025.1
2020
build
21-
black==23.7.0
22-
isort==5.11.0
21+
ruff==0.14.14

.generator/requirements.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
click
2-
gapic-generator==1.30.7 # replace isort and black with ruff https://github.com/googleapis/gapic-generator-python/pull/2539
2+
gapic-generator==1.30.8 # fix mypy issue for __func__ type https://github.com/googleapis/gapic-generator-python/pull/2562
33
nox
44
starlark-pyo3>=2025.1
55
build
6-
black==23.7.0
7-
isort==5.11.0
6+
ruff==0.14.14

.kokoro/system.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ for dir in `find 'packages' -type d -wholename 'packages/*/tests/system'`; do
4646
# Get the path to the package by removing the suffix /tests/system
4747
package=$(echo $dir | cut -f -2 -d '/')
4848

49+
# Run system tests on every change to these libraries
4950
if [[ $package = @(*google-cloud-bigquery-storage*|*google-cloud-dns*|*google-cloud-testutils*) ]]; then
5051
files_to_check=${package}
5152
else

.librarian/generator-input/client-post-processing/remove-unused-imports.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ replacements:
2020
before: |
2121
import google.cloud.gkehub.configmanagement.v1.configmanagement_pb2 as configmanagement_pb2 # type: ignore
2222
import google.cloud.gkehub.multiclusteringress.v1.multiclusteringress_pb2 as multiclusteringress_pb2 # type: ignore
23+
import google.cloud.gkehub.rbacrolebindingactuation.v1.rbacrolebindingactuation_pb2 as rbacrolebindingactuation_pb2 # type: ignore
2324
after: ""
2425
count: 1
2526
- paths: [

.librarian/generator-input/client-post-processing/sub-api-versioned-namespace.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ replacements:
2020
before: |
2121
import google.cloud.gkehub.configmanagement.v1.configmanagement_pb2 as configmanagement_pb2 # type: ignore
2222
import google.cloud.gkehub.multiclusteringress.v1.multiclusteringress_pb2 as multiclusteringress_pb2 # type: ignore
23+
import google.cloud.gkehub.rbacrolebindingactuation.v1.rbacrolebindingactuation_pb2 as rbacrolebindingactuation_pb2 # type: ignore
2324
after: |
2425
from google.cloud.gkehub_v1 import configmanagement_v1 # type: ignore
2526
from google.cloud.gkehub_v1 import multiclusteringress_v1 # type: ignore
27+
from google.cloud.gkehub_v1 import rbacrolebindingactuation_v1 # type: ignore
2628
count: 1
2729
- paths: [
2830
packages/google-cloud-gke-hub/google/cloud/gkehub_v1/types/feature.py
@@ -36,6 +38,12 @@ replacements:
3638
before: google.cloud.gkehub.multiclusteringress.v1.multiclusteringress_pb2
3739
after: google.cloud.gkehub_v1.multiclusteringress_v1
3840
count: 1
41+
- paths: [
42+
packages/google-cloud-gke-hub/google/cloud/gkehub_v1/types/feature.py
43+
]
44+
before: google.cloud.gkehub.rbacrolebindingactuation.v1.rbacrolebindingactuation_pb2
45+
after: google.cloud.gkehub_v1.rbacrolebindingactuation_v1
46+
count: 1
3947
- paths: [
4048
packages/google-cloud-gke-hub/google/cloud/gkehub_v1/types/feature.py
4149
]
@@ -48,6 +56,12 @@ replacements:
4856
before: configmanagement_pb2
4957
after: configmanagement_v1
5058
count: 4
59+
- paths: [
60+
packages/google-cloud-gke-hub/google/cloud/gkehub_v1/types/feature.py
61+
]
62+
before: rbacrolebindingactuation_pb2
63+
after: rbacrolebindingactuation_v1
64+
count: 2
5165
- paths: [
5266
packages/google-cloud-gke-hub/docs/index.rst
5367
]
@@ -70,7 +84,9 @@ replacements:
7084
gkehub_v1/configmanagement_v1/services_
7185
gkehub_v1/configmanagement_v1/types_
7286
gkehub_v1/multiclusteringress_v1/services_
73-
gkehub_v1/multiclusteringress_v1/types_\n
87+
gkehub_v1/multiclusteringress_v1/types_
88+
gkehub_v1/rbacrolebindingactuation_v1/services_
89+
gkehub_v1/rbacrolebindingactuation_v1/types_\n
7490
count: 1
7591
- paths: [
7692
packages/google-cloud-workflows/docs/index.rst

0 commit comments

Comments
 (0)