Skip to content

Commit

Permalink
Merge branch 'main' into cred_info
Browse files Browse the repository at this point in the history
  • Loading branch information
arithmetic1728 authored Jan 8, 2025
2 parents b4d4855 + 558e2e2 commit e82788a
Show file tree
Hide file tree
Showing 160 changed files with 35,018 additions and 17,632 deletions.
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:94bb690db96e6242b2567a4860a94d48fa48696d092e51b0884a1a2c0a79a407
# created: 2024-07-31T14:52:44.926548819Z
digest: sha256:8e3e7e18255c22d1489258d0374c901c01f9c4fd77a12088670cd73d580aa737
# created: 2024-12-17T00:59:58.625514486Z
1 change: 1 addition & 0 deletions .github/release-trigger.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
enabled: true
multiScmName: gapic-generator-python
22 changes: 20 additions & 2 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ branchProtectionRules:
- 'mypy (3.10)'
- 'mypy (3.11)'
- 'mypy (3.12)'
- 'mypy (3.13)'
- 'showcase (3.7, showcase)'
- 'showcase (3.12, showcase)'
- 'showcase (3.13, showcase)'
- 'showcase (3.7, showcase_alternative_templates)'
- 'showcase (3.12, showcase_alternative_templates)'
- 'showcase (3.13, showcase_alternative_templates)'
- 'showcase (3.7, showcase_w_rest_async)'
- 'showcase (3.13, showcase_w_rest_async)'
# TODO(dovs): reenable these when the mtls tests have been debugged and fixed
# See #1218 for details
# - 'showcase-mtls (showcase_mtls)'
Expand All @@ -28,28 +31,40 @@ branchProtectionRules:
- 'showcase-unit (3.10)'
- 'showcase-unit (3.11)'
- 'showcase-unit (3.12)'
- 'showcase-unit (3.13)'
- 'showcase-unit (3.7, _alternative_templates)'
- 'showcase-unit (3.8, _alternative_templates)'
- 'showcase-unit (3.9, _alternative_templates)'
- 'showcase-unit (3.10, _alternative_templates)'
- 'showcase-unit (3.11, _alternative_templates)'
- 'showcase-unit (3.12, _alternative_templates)'
- 'showcase-unit (3.13, _alternative_templates)'
- 'showcase-unit (3.7, _alternative_templates_mixins)'
- 'showcase-unit (3.8, _alternative_templates_mixins)'
- 'showcase-unit (3.9, _alternative_templates_mixins)'
- 'showcase-unit (3.10, _alternative_templates_mixins)'
- 'showcase-unit (3.11, _alternative_templates_mixins)'
- 'showcase-unit (3.12, _alternative_templates_mixins)'
- 'showcase-unit (3.13, _alternative_templates_mixins)'
- 'showcase-unit (3.7, _mixins)'
- 'showcase-unit (3.8, _mixins)'
- 'showcase-unit (3.9, _mixins)'
- 'showcase-unit (3.10, _mixins)'
- 'showcase-unit (3.11, _mixins)'
- 'showcase-unit (3.12, _mixins)'
- 'showcase-unit (3.13, _mixins)'
- 'showcase-unit (3.7, _w_rest_async)'
- 'showcase-unit (3.8, _w_rest_async)'
- 'showcase-unit (3.9, _w_rest_async)'
- 'showcase-unit (3.10, _w_rest_async)'
- 'showcase-unit (3.11, _w_rest_async)'
- 'showcase-unit (3.12, _w_rest_async)'
- 'showcase-unit (3.13, _w_rest_async)'
- 'showcase-unit-add-iam-methods'
- 'integration'
- 'goldens-lint'
- 'goldens-prerelease'
- 'goldens-unit'
- 'style-check'
- 'snippetgen'
- 'unit (3.7)'
Expand All @@ -58,18 +73,21 @@ branchProtectionRules:
- 'unit (3.10)'
- 'unit (3.11)'
- 'unit (3.12)'
- 'unit (3.13)'
- 'fragment (3.7)'
- 'fragment (3.8)'
- 'fragment (3.9)'
- 'fragment (3.10)'
- 'fragment (3.11)'
- 'fragment (3.12)'
- 'fragment (3.13)'
- 'fragment (3.7, _alternative_templates)'
- 'fragment (3.8, _alternative_templates)'
- 'fragment (3.9, _alternative_templates)'
- 'fragment (3.10, _alternative_templates)'
- 'fragment (3.11, _alternative_templates)'
- 'fragment (3.12, _alternative_templates)'
- 'fragment (3.13, _alternative_templates)'
- 'OwlBot Post Processor'
requiredApprovingReviewCount: 1
requiresCodeOwnerReviews: true
Expand Down
102 changes: 71 additions & 31 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
matrix:
# Run mypy on all of the supported python versions listed in setup.py
# https://github.com/python/mypy/blob/master/setup.py
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -55,9 +55,14 @@ jobs:
strategy:
# Run showcase tests on the lowest and highest supported runtimes
matrix:
python: ["3.7", "3.12"]
target: [showcase, showcase_alternative_templates]
runs-on: ubuntu-latest
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2121) Remove `showcase_w_rest_async` target when async rest is GA.
python: ["3.7", "3.13"]
target: [showcase, showcase_alternative_templates, showcase_w_rest_async]
logging_scope: ["", "google"]

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2303): use `ubuntu-latest` once this bug is fixed.
# Use ubuntu-22.04 until Python 3.7 is removed from the test matrix
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python "${{ matrix.python }}"
Expand Down Expand Up @@ -89,6 +94,9 @@ jobs:
unzip protoc-${PROTOC_VERSION}.zip
sudo ln -s /usr/src/protoc/bin/protoc /usr/local/bin/protoc
- name: Run showcase tests.
env:
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2286): Construct nox sessions with logging enabled.
GOOGLE_SDK_PYTHON_LOGGING_SCOPE: ${{ matrix.logging_scope }}
run: nox -s ${{ matrix.target }}-${{ matrix.python }}
showcase-mtls:
if: ${{ false }} # TODO(dovs): reenable when #1218 is fixed
Expand All @@ -103,10 +111,10 @@ jobs:
run: |
sudo mkdir -p /tmp/workspace/tests/cert/
sudo chown -R ${USER} /tmp/workspace/
- name: Set up Python "3.12"
- name: Set up Python "3.13"
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: 'pip'
- name: Copy mtls files
run: cp tests/cert/mtls.* /tmp/workspace/tests/cert/
Expand Down Expand Up @@ -139,10 +147,14 @@ jobs:
showcase-unit:
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2121) Remove `_w_rest_async` variant when async rest is GA.
variant: ['', _alternative_templates, _mixins, _alternative_templates_mixins, _w_rest_async]
runs-on: ubuntu-latest
logging_scope: ["", "google"]

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2303): use `ubuntu-latest` once this bug is fixed.
# Use ubuntu-22.04 until Python 3.7 is removed from the test matrix
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python "${{ matrix.python }}"
Expand All @@ -165,15 +177,18 @@ jobs:
- name: Install nox.
run: python -m pip install nox
- name: Run unit tests.
env:
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2286): Construct nox sessions with logging enabled.
GOOGLE_SDK_PYTHON_LOGGING_SCOPE: ${{ matrix.logging_scope }}
run: nox -s showcase_unit${{ matrix.variant }}-${{ matrix.python }}
showcase-unit-add-iam-methods:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python "3.12"
- name: Set up Python "3.13"
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: 'pip'
- name: Install system dependencies.
run: |
Expand All @@ -198,10 +213,10 @@ jobs:
variant: ['', _alternative_templates]
steps:
- uses: actions/checkout@v4
- name: Set up Python "3.12"
- name: Set up Python "3.13"
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: 'pip'
- name: Install system dependencies.
run: |
Expand All @@ -223,10 +238,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python "3.12"
- name: Set up Python "3.13"
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: 'pip'
- name: Install system dependencies.
run: |
Expand All @@ -239,8 +254,11 @@ jobs:
unit:
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2303): use `ubuntu-latest` once this bug is fixed.
# Use ubuntu-22.04 until Python 3.7 is removed from the test matrix
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
Expand All @@ -260,9 +278,12 @@ jobs:
fragment:
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
variant: ['', _alternative_templates]
runs-on: ubuntu-latest

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2303): use `ubuntu-latest` once this bug is fixed.
# Use ubuntu-22.04 until Python 3.7 is removed from the test matrix
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
Expand Down Expand Up @@ -312,29 +333,50 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: 'pip'
- name: Install nox.
run: |
python -m pip install nox
- name: Run blacken and lint on the generated output.
run: |
nox -f tests/integration/goldens/asset/noxfile.py -s mypy-3.12 blacken lint
nox -f tests/integration/goldens/credentials/noxfile.py -s mypy-3.12 blacken lint
nox -f tests/integration/goldens/eventarc/noxfile.py -s mypy-3.12 blacken lint
nox -f tests/integration/goldens/logging/noxfile.py -s mypy-3.12 blacken lint
nox -f tests/integration/goldens/redis/noxfile.py -s mypy-3.12 blacken lint
nox -f tests/integration/goldens/asset/noxfile.py -s mypy-3.13 blacken lint
nox -f tests/integration/goldens/credentials/noxfile.py -s mypy-3.13 blacken lint
nox -f tests/integration/goldens/eventarc/noxfile.py -s mypy-3.13 blacken lint
nox -f tests/integration/goldens/logging/noxfile.py -s mypy-3.13 blacken lint
nox -f tests/integration/goldens/redis/noxfile.py -s mypy-3.13 blacken lint
goldens-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: 'pip'
- name: Install nox.
run: |
python -m pip install nox
- name: Run the `unit` nox session
# Exclude testing for asset which requires dependency google-cloud-org-policy
# in order to run unit tests
# See https://github.com/googleapis/gapic-generator-python/issues/1806
run: |
nox -f tests/integration/goldens/credentials/noxfile.py -s unit-3.13
nox -f tests/integration/goldens/eventarc/noxfile.py -s unit-3.13
nox -f tests/integration/goldens/logging/noxfile.py -s unit-3.13
nox -f tests/integration/goldens/redis/noxfile.py -s unit-3.13
goldens-prerelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"
cache: 'pip'
- name: Install nox.
run: |
Expand All @@ -352,12 +394,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python "3.11"
- name: Set up Python "3.13"
uses: actions/setup-python@v5
with:
# Do not upgrade this check to python 3.12 until
# https://github.com/hhatto/autopep8/issues/712 is fixed
python-version: "3.11"
python-version: "3.13"
cache: 'pip'
- name: Install autopep8
run: |
Expand Down
Loading

0 comments on commit e82788a

Please sign in to comment.