Skip to content

Commit 481c8d6

Browse files
partheagcf-owl-bot[bot]daniel-sanche
authored
chore: update templated files (#986)
* chore: update templated files * update replacement in owlbot.py * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * upgrade place_before owlbot functionality * Revert "upgrade place_before owlbot functionality" This reverts commit e29fdec. * fixed replacement for docfx patch * fix missing close quote * fixed quote style * added line breaks * remove escape * Add 'OwlBot Post Processor' as a required check * remove noxfile from owlbot control * removed experimental_v3 branch customized protection settings * added test tag requirement --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Daniel Sanche <[email protected]>
1 parent a2ed2ab commit 481c8d6

24 files changed

+339
-441
lines changed

.flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2023 Google LLC
3+
# Copyright 2024 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

.github/.OwlBot.lock.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:5a4c19d17e597b92d786e569be101e636c9c2817731f80a5adec56b2aa8fe070
17-
# created: 2024-04-12T11:35:58.922854369Z
16+
digest: sha256:5651442a6336971a2fb2df40fb56b3337df67cafa14c0809cc89cb34ccee1b8e

.github/auto-label.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 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.

.github/sync-repo-settings.yaml

+2-18
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,8 @@ branchProtectionRules:
3131
- 'Kokoro'
3232
- 'Kokoro system-3.8'
3333
- 'cla/google'
34-
- pattern: experimental_v3
35-
# Can admins overwrite branch protection.
36-
# Defaults to `true`
37-
isAdminEnforced: false
38-
# Number of approving reviews required to update matching branches.
39-
# Defaults to `1`
40-
requiredApprovingReviewCount: 1
41-
# Are reviews from code owners required to update matching branches.
42-
# Defaults to `false`
43-
requiresCodeOwnerReviews: false
44-
# Require up to date branches
45-
requiresStrictStatusChecks: false
46-
# List of required status check contexts that must pass for commits to be accepted to matching branches.
47-
requiredStatusCheckContexts:
48-
- 'Kokoro'
49-
- 'Kokoro system-3.8'
50-
- 'cla/google'
51-
- 'Conformance / Async v3 Client / Python 3.8'
34+
- 'Conformance / Async v3 Client / Python 3.8 / Test Tag v0.0.2'
35+
- 'OwlBot Post Processor'
5236
# List of explicit permissions to add (additive only)
5337
permissionRules:
5438
# Team slug to add to repository permissions

.kokoro/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/docker/docs/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 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.

.kokoro/populate-secrets.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC.
2+
# Copyright 2024 Google LLC.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/publish-docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/requirements.txt

+266-243
Large diffs are not rendered by default.

.kokoro/test-samples-against-head.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/test-samples-impl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/test-samples.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/trampoline.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/trampoline_v2.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 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.

.trampolinerc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 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.

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2023 Google LLC
3+
# Copyright 2024 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

noxfile.py

+43-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2023 Google LLC
3+
# Copyright 2024 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -185,14 +185,28 @@ def install_unittest_dependencies(session, *constraints):
185185
session.install("-e", ".", *constraints)
186186

187187

188-
def default(session):
188+
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
189+
@nox.parametrize(
190+
"protobuf_implementation",
191+
["python", "upb", "cpp"],
192+
)
193+
def unit(session, protobuf_implementation):
189194
# Install all test dependencies, then install this package in-place.
190195

196+
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12"):
197+
session.skip("cpp implementation is not supported in python 3.11+")
198+
191199
constraints_path = str(
192200
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
193201
)
194202
install_unittest_dependencies(session, "-c", constraints_path)
195203

204+
# TODO(https://github.com/googleapis/synthtool/issues/1976):
205+
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
206+
# The 'cpp' implementation requires Protobuf<4.
207+
if protobuf_implementation == "cpp":
208+
session.install("protobuf<4")
209+
196210
# Run py.test against the unit tests.
197211
session.run(
198212
"py.test",
@@ -206,15 +220,12 @@ def default(session):
206220
"--cov-fail-under=0",
207221
os.path.join("tests", "unit"),
208222
*session.posargs,
223+
env={
224+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
225+
},
209226
)
210227

211228

212-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
213-
def unit(session):
214-
"""Run the unit test suite."""
215-
default(session)
216-
217-
218229
def install_systemtest_dependencies(session, *constraints):
219230
# Use pre-release gRPC for system tests.
220231
# Exclude version 1.52.0rc1 which has a known issue.
@@ -430,10 +441,17 @@ def docfx(session):
430441
session.run("python", "docs/scripts/patch_devsite_toc.py")
431442

432443

433-
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
434-
def prerelease_deps(session):
444+
@nox.session(python="3.12")
445+
@nox.parametrize(
446+
"protobuf_implementation",
447+
["python", "upb", "cpp"],
448+
)
449+
def prerelease_deps(session, protobuf_implementation):
435450
"""Run all tests with prerelease versions of dependencies installed."""
436451

452+
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12"):
453+
session.skip("cpp implementation is not supported in python 3.11+")
454+
437455
# Install all dependencies
438456
session.install("-e", ".[all, tests, tracing]")
439457
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
@@ -468,9 +486,9 @@ def prerelease_deps(session):
468486
"protobuf",
469487
# dependency of grpc
470488
"six",
489+
"grpc-google-iam-v1",
471490
"googleapis-common-protos",
472-
# Exclude version 1.52.0rc1 which has a known issue. See https://github.com/grpc/grpc/issues/32163
473-
"grpcio!=1.52.0rc1",
491+
"grpcio",
474492
"grpcio-status",
475493
"google-api-core",
476494
"google-auth",
@@ -496,7 +514,13 @@ def prerelease_deps(session):
496514
session.run("python", "-c", "import grpc; print(grpc.__version__)")
497515
session.run("python", "-c", "import google.auth; print(google.auth.__version__)")
498516

499-
session.run("py.test", "tests/unit")
517+
session.run(
518+
"py.test",
519+
"tests/unit",
520+
env={
521+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
522+
},
523+
)
500524

501525
system_test_path = os.path.join("tests", "system.py")
502526
system_test_folder_path = os.path.join("tests", "system")
@@ -509,6 +533,9 @@ def prerelease_deps(session):
509533
f"--junitxml=system_{session.python}_sponge_log.xml",
510534
system_test_path,
511535
*session.posargs,
536+
env={
537+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
538+
},
512539
)
513540
if os.path.exists(system_test_folder_path):
514541
session.run(
@@ -517,4 +544,7 @@ def prerelease_deps(session):
517544
f"--junitxml=system_{session.python}_sponge_log.xml",
518545
system_test_folder_path,
519546
*session.posargs,
547+
env={
548+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
549+
},
520550
)

0 commit comments

Comments
 (0)