Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/python-cloudbuild
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.2.1
Choose a base ref
...
head repository: googleapis/python-cloudbuild
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.3.0
Choose a head ref
  • 18 commits
  • 27 files changed
  • 6 contributors

Commits on May 18, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    70599bf View commit details

Commits on May 20, 2021

  1. chore: add cicd (devplat) team to codeowners (#104)

    * chore: move Makefile to repo root
    
    * chore: add cicd team to codeowners
    Shabirmean authored May 20, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cb2da4f View commit details

Commits on May 25, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e7e0695 View commit details

Commits on May 28, 2021

  1. chore: new owl bot post processor docker image (#105)

    gcr.io/repo-automation-bots/owlbot-python:latest@sha256:3c3a445b3ddc99ccd5d31edc4b4519729635d20693900db32c4f587ed51f7479
    gcf-owl-bot[bot] authored May 28, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ea14e4c View commit details
  2. chore: new owl bot post processor docker image (#106)

    gcr.io/repo-automation-bots/owlbot-python:latest@sha256:0856ca711da1fd5ec9d6d7da6c50aa0bbf550fb94acb47b55159a640791987bf
    gcf-owl-bot[bot] authored May 28, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a106b0d View commit details
  3. chore: new owl bot post processor docker image (#108)

    Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:c66ba3c8d7bc8566f47df841f98cd0097b28fff0b1864c86f5817f4c8c3e8600
    gcf-owl-bot[bot] authored May 28, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    358a5da View commit details

Commits on Jun 9, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ffd4b77 View commit details

Commits on Jun 10, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bf92d60 View commit details

Commits on Jun 17, 2021

  1. chore: new owl bot post processor docker image (#111)

    Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:58c7342b0bccf85028100adaa3d856cb4a871c22ca9c01960d996e66c40548ce
    gcf-owl-bot[bot] authored Jun 17, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c12c212 View commit details

Commits on Jun 19, 2021

  1. docs: omit mention of Python 2.7 in 'CONTRIBUTING.rst' (#1127) (#112)

    Closes #1126
    Source-Link: googleapis/synthtool@b91f129
    Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:b6169fc6a5207b11800a7c002d0c5c2bc6d82697185ca12e666f44031468cfcd
    gcf-owl-bot[bot] authored Jun 19, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e2420f8 View commit details

Commits on Jun 20, 2021

  1. chore: update precommit hook pre-commit/pre-commit-hooks to v4 (#1083) (

    #114)
    
    [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
    
    This PR contains the following updates:
    
    | Package | Type | Update | Change |
    |---|---|---|---|
    | [pre-commit/pre-commit-hooks](https://togithub.com/pre-commit/pre-commit-hooks) | repository | major | `v3.4.0` -> `v4.0.1` |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>pre-commit/pre-commit-hooks</summary>
    
    ### [`v4.0.1`](https://togithub.com/pre-commit/pre-commit-hooks/releases/v4.0.1)
    
    [Compare Source](https://togithub.com/pre-commit/pre-commit-hooks/compare/v4.0.0...v4.0.1)
    
    ##### Fixes
    
    -   `check-shebang-scripts-are-executable` fix entry point.
        -   [#&#8203;602](https://togithub.com/pre-commit/pre-commit-hooks/issues/602) issue by [@&#8203;Person-93](https://togithub.com/Person-93).
        -   [#&#8203;603](https://togithub.com/pre-commit/pre-commit-hooks/issues/603) PR by [@&#8203;scop](https://togithub.com/scop).
    
    ### [`v4.0.0`](https://togithub.com/pre-commit/pre-commit-hooks/releases/v4.0.0)
    
    [Compare Source](https://togithub.com/pre-commit/pre-commit-hooks/compare/v3.4.0...v4.0.0)
    
    ##### Features
    
    -   `check-json`: report duplicate keys.
        -   [#&#8203;558](https://togithub.com/pre-commit/pre-commit-hooks/issues/558) PR by [@&#8203;AdityaKhursale](https://togithub.com/AdityaKhursale).
        -   [#&#8203;554](https://togithub.com/pre-commit/pre-commit-hooks/issues/554) issue by [@&#8203;adamchainz](https://togithub.com/adamchainz).
    -   `no-commit-to-branch`: add `main` to default blocked branches.
        -   [#&#8203;565](https://togithub.com/pre-commit/pre-commit-hooks/issues/565) PR by [@&#8203;ndevenish](https://togithub.com/ndevenish).
    -   `check-case-conflict`: check conflicts in directory names as well.
        -   [#&#8203;575](https://togithub.com/pre-commit/pre-commit-hooks/issues/575) PR by [@&#8203;slsyy](https://togithub.com/slsyy).
        -   [#&#8203;70](https://togithub.com/pre-commit/pre-commit-hooks/issues/70) issue by [@&#8203;andyjack](https://togithub.com/andyjack).
    -   `check-vcs-permalinks`: forbid other branch names.
        -   [#&#8203;582](https://togithub.com/pre-commit/pre-commit-hooks/issues/582) PR by [@&#8203;jack1142](https://togithub.com/jack1142).
        -   [#&#8203;581](https://togithub.com/pre-commit/pre-commit-hooks/issues/581) issue by [@&#8203;jack1142](https://togithub.com/jack1142).
    -   `check-shebang-scripts-are-executable`: new hook which ensures shebang'd scripts are executable.
        -   [#&#8203;545](https://togithub.com/pre-commit/pre-commit-hooks/issues/545) PR by [@&#8203;scop](https://togithub.com/scop).
    
    ##### Fixes
    
    -   `check-executables-have-shebangs`: Short circuit shebang lookup on windows.
        -   [#&#8203;544](https://togithub.com/pre-commit/pre-commit-hooks/issues/544) PR by [@&#8203;scop](https://togithub.com/scop).
    -   `requirements-txt-fixer`: Fix comments which have indentation
        -   [#&#8203;549](https://togithub.com/pre-commit/pre-commit-hooks/issues/549) PR by [@&#8203;greshilov](https://togithub.com/greshilov).
        -   [#&#8203;548](https://togithub.com/pre-commit/pre-commit-hooks/issues/548) issue by [@&#8203;greshilov](https://togithub.com/greshilov).
    -   `pretty-format-json`: write to stdout using UTF-8 encoding.
        -   [#&#8203;571](https://togithub.com/pre-commit/pre-commit-hooks/issues/571) PR by [@&#8203;jack1142](https://togithub.com/jack1142).
        -   [#&#8203;570](https://togithub.com/pre-commit/pre-commit-hooks/issues/570) issue by [@&#8203;jack1142](https://togithub.com/jack1142).
    -   Use more inclusive language.
        -   [#&#8203;599](https://togithub.com/pre-commit/pre-commit-hooks/issues/599) PR by [@&#8203;asottile](https://togithub.com/asottile).
    
    ##### Breaking changes
    
    -   Remove deprecated hooks: `flake8`, `pyflakes`, `autopep8-wrapper`.
        -   [#&#8203;597](https://togithub.com/pre-commit/pre-commit-hooks/issues/597) PR by [@&#8203;asottile](https://togithub.com/asottile).
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻️ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.
    
    ---
    
    This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/synthtool).
    Source-Link: googleapis/synthtool@333fd90
    Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:b8c131c558606d3cea6e18f8e87befbd448c1482319b0db3c5d5388fa6ea72e3
    gcf-owl-bot[bot] authored Jun 20, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    04e616d View commit details

Commits on Jun 22, 2021

  1. chore: add kokoro 3.9 config templates (#116)

    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jun 22, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    36c4a83 View commit details

Commits on Jun 23, 2021

  1. feat: add always_use_jwt_access (#118)

    ... chore: update gapic-generator-ruby to the latest commit chore: release gapic-generator-typescript 1.5.0
    
    Committer: @miraleung
    PiperOrigin-RevId: 380641501
    
    Source-Link: googleapis/googleapis@076f7e9
    
    Source-Link: https://github.com/googleapis/googleapis-gen/commit/27e4c88b4048e5f56508d4e1aa417d60a3380892
    gcf-owl-bot[bot] authored Jun 23, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6414a3b View commit details

Commits on Jun 25, 2021

  1. chore(python): simplify nox steps in CONTRIBUTING.rst (#120)

    Source-Link: googleapis/synthtool@26558ba
    Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:99d90d097e4a4710cc8658ee0b5b963f4426d0e424819787c3ac1405c9a26719
    gcf-owl-bot[bot] authored Jun 25, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c93b299 View commit details

Commits on Jun 26, 2021

  1. chore(deps): update dependency google-auth to v1.32.0 (#117)

    [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
    
    This PR contains the following updates:
    
    | Package | Change | Age | Adoption | Passing | Confidence |
    |---|---|---|---|---|---|
    | [google-auth](https://togithub.com/googleapis/google-auth-library-python) | `==1.31.0` -> `==1.32.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-auth/1.32.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-auth/1.32.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-auth/1.32.0/compatibility-slim/1.31.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-auth/1.32.0/confidence-slim/1.31.0)](https://docs.renovatebot.com/merge-confidence/) |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>googleapis/google-auth-library-python</summary>
    
    ### [`v1.32.0`](https://togithub.com/googleapis/google-auth-library-python/blob/master/CHANGELOG.md#&#8203;1320-httpswwwgithubcomgoogleapisgoogle-auth-library-pythoncomparev1310v1320-2021-06-16)
    
    [Compare Source](https://togithub.com/googleapis/google-auth-library-python/compare/v1.31.0...v1.32.0)
    
    ##### Features
    
    -   allow scopes for self signed jwt ([#&#8203;776](https://www.github.com/googleapis/google-auth-library-python/issues/776)) ([2cfe655](https://www.github.com/googleapis/google-auth-library-python/commit/2cfe655bba837170abc07701557a1a5e0fe3294e))
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.
    
    ---
    
    This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-cloudbuild).
    renovate-bot authored Jun 26, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    021a1c4 View commit details

Commits on Jun 30, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5962e0e View commit details
  2. fix: disable always_use_jwt_access (#123)

    * chore: use gapic-generator-python 0.50.3
    
    fix: disable always_use_jwt_access
    
    Committer: @busunkim96
    PiperOrigin-RevId: 382142900
    
    Source-Link: googleapis/googleapis@513440f
    
    Source-Link: https://github.com/googleapis/googleapis-gen/commit/7b1e2c31233f79a704ec21ca410bf661d6bc68d0
    
    * 🦉 Updates from OwlBot
    
    See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md
    
    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    Co-authored-by: Dina Graves Portman <dinagraves@google.com>
    3 people authored Jun 30, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c1c9608 View commit details

Commits on Jul 1, 2021

  1. chore: release 3.3.0 (#119)

    Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
    release-please[bot] authored Jul 1, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    00988bf View commit details
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker:
image: gcr.io/repo-automation-bots/owlbot-python:latest
digest: sha256:4c981a6b6f2b8914a448d7b3a01688365be03e3ed26dfee399a6aa77fb112eaa
digest: sha256:99d90d097e4a4710cc8658ee0b5b963f4426d0e424819787c3ac1405c9a26719
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -8,4 +8,4 @@
* @googleapis/yoshi-python @googleapis/cicd

# The python-samples-reviewers team is the default owner for samples changes
/samples/ @googleapis/python-samples-owners
/samples/ @googleapis/python-samples-owners @googleapis/cicd
40 changes: 40 additions & 0 deletions .kokoro/samples/python3.9/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Specify which tests to run
env_vars: {
key: "RUN_TESTS_SESSION"
value: "py-3.9"
}

# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "python-docs-samples-tests-py39"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-cloudbuild/.kokoro/test-samples.sh"
}

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
}

# Download secrets for samples
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "python-cloudbuild/.kokoro/trampoline.sh"
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.9/continuous.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}
11 changes: 11 additions & 0 deletions .kokoro/samples/python3.9/periodic-head.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-pubsub/.kokoro/test-samples-against-head.sh"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.9/periodic.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "False"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.9/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
3 changes: 2 additions & 1 deletion .repo-metadata.json
Original file line number Diff line number Diff line change
@@ -10,5 +10,6 @@
"repo": "googleapis/python-cloudbuild",
"distribution_name": "google-cloud-build",
"api_id": "cloudbuild.googleapis.com",
"codeowner_team": "@googleapis/cicd",
"requires_billing": false
}
}
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,23 @@

[1]: https://pypi.org/project/google-cloud-build/#history

## [3.3.0](https://www.github.com/googleapis/python-cloudbuild/compare/v3.2.1...v3.3.0) (2021-06-30)


### Features

* add always_use_jwt_access ([#118](https://www.github.com/googleapis/python-cloudbuild/issues/118)) ([6414a3b](https://www.github.com/googleapis/python-cloudbuild/commit/6414a3bcc27baa4e60b2bf7cf2f7d9f776ad6843))


### Bug Fixes

* disable always_use_jwt_access ([#123](https://www.github.com/googleapis/python-cloudbuild/issues/123)) ([c1c9608](https://www.github.com/googleapis/python-cloudbuild/commit/c1c960894dc401b0a125801b08ef1a4fee659abe))


### Documentation

* omit mention of Python 2.7 in 'CONTRIBUTING.rst' ([#1127](https://www.github.com/googleapis/python-cloudbuild/issues/1127)) ([#112](https://www.github.com/googleapis/python-cloudbuild/issues/112)) ([e2420f8](https://www.github.com/googleapis/python-cloudbuild/commit/e2420f8ad5630aedff0d52e3cc4facbb11300b72)), closes [#1126](https://www.github.com/googleapis/python-cloudbuild/issues/1126)

### [3.2.1](https://www.github.com/googleapis/python-cloudbuild/compare/v3.2.0...v3.2.1) (2021-05-16)


21 changes: 8 additions & 13 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -68,15 +68,12 @@ Using ``nox``
We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.

- To test your changes, run unit tests with ``nox``::
$ nox -s unit

$ nox -s unit-2.7
$ nox -s unit-3.8
$ ...
- To run a single unit test::

- Args to pytest can be passed through the nox command separated by a `--`. For
example, to run a single test::
$ nox -s unit-3.9 -- -k <name of test>

$ nox -s unit-3.8 -- -k <name of test>

.. note::

@@ -143,18 +140,16 @@ Running System Tests
- To run system tests, you can execute::

# Run all system tests
$ nox -s system-3.8
$ nox -s system-2.7
$ nox -s system

# Run a single system test
$ nox -s system-3.8 -- -k <name of test>


.. note::

System tests are only configured to run under Python 2.7 and
Python 3.8. For expediency, we do not run them in older versions
of Python 3.
System tests are only configured to run under Python 3.8.
For expediency, we do not run them in older versions of Python 3.

This alone will not run the tests. You'll need to change some local
auth settings and change some configuration in your project to
@@ -218,8 +213,8 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
.. _config: https://github.com/googleapis/python-cloudbuild/blob/master/noxfile.py


We also explicitly decided to support Python 3 beginning with version
3.6. Reasons for this include:
We also explicitly decided to support Python 3 beginning with version 3.6.
Reasons for this include:

- Encouraging use of newest versions of Python 3
- Taking the lead of `prominent`_ open-source `projects`_
19 changes: 7 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -80,9 +80,9 @@
master_doc = "index"

# General information about the project.
project = u"google-cloud-build"
copyright = u"2019, Google"
author = u"Google APIs"
project = "google-cloud-build"
copyright = "2019, Google"
author = "Google APIs"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -281,7 +281,7 @@
(
master_doc,
"google-cloud-build.tex",
u"google-cloud-build Documentation",
"google-cloud-build Documentation",
author,
"manual",
)
@@ -313,13 +313,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(
master_doc,
"google-cloud-build",
u"google-cloud-build Documentation",
[author],
1,
)
(master_doc, "google-cloud-build", "google-cloud-build Documentation", [author], 1,)
]

# If true, show URL addresses after external links.
@@ -335,7 +329,7 @@
(
master_doc,
"google-cloud-build",
u"google-cloud-build Documentation",
"google-cloud-build Documentation",
author,
"google-cloud-build",
"google-cloud-build Library",
@@ -363,6 +357,7 @@
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"grpc": ("https://grpc.github.io/grpc/python/", None),
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),
}


4 changes: 2 additions & 2 deletions docs/multiprocessing.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. note::

Because this client uses :mod:`grpcio` library, it is safe to
Because this client uses :mod:`grpc` library, it is safe to
share instances across threads. In multiprocessing scenarios, the best
practice is to create client instances *after* the invocation of
:func:`os.fork` by :class:`multiprocessing.Pool` or
:func:`os.fork` by :class:`multiprocessing.pool.Pool` or
:class:`multiprocessing.Process`.
2 changes: 2 additions & 0 deletions google/cloud/devtools/cloudbuild/__init__.py
Original file line number Diff line number Diff line change
@@ -83,6 +83,7 @@
)
from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import UpdateWorkerPoolRequest
from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import Volume
from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import WebhookConfig
from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import WorkerConfig
from google.cloud.devtools.cloudbuild_v1.types.cloudbuild import WorkerPool

@@ -137,6 +138,7 @@
"UpdateBuildTriggerRequest",
"UpdateWorkerPoolRequest",
"Volume",
"WebhookConfig",
"WorkerConfig",
"WorkerPool",
)
2 changes: 2 additions & 0 deletions google/cloud/devtools/cloudbuild_v1/__init__.py
Original file line number Diff line number Diff line change
@@ -65,6 +65,7 @@
from .types.cloudbuild import UpdateBuildTriggerRequest
from .types.cloudbuild import UpdateWorkerPoolRequest
from .types.cloudbuild import Volume
from .types.cloudbuild import WebhookConfig
from .types.cloudbuild import WorkerConfig
from .types.cloudbuild import WorkerPool

@@ -119,6 +120,7 @@
"UpdateBuildTriggerRequest",
"UpdateWorkerPoolRequest",
"Volume",
"WebhookConfig",
"WorkerConfig",
"WorkerPool",
)
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@
from google.api_core import retry as retries # type: ignore
from google.api_core import operations_v1 # type: ignore
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore

from google.cloud.devtools.cloudbuild_v1.types import cloudbuild
from google.longrunning import operations_pb2 # type: ignore
@@ -48,8 +49,6 @@
except pkg_resources.DistributionNotFound: # pragma: NO COVER
_GOOGLE_AUTH_VERSION = None

_API_CORE_VERSION = google.api_core.__version__


class CloudBuildTransport(abc.ABC):
"""Abstract transport class for CloudBuild."""
@@ -67,6 +66,7 @@ def __init__(
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
**kwargs,
) -> None:
"""Instantiate the transport.
@@ -90,6 +90,8 @@ def __init__(
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
your own client library.
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
@@ -99,7 +101,7 @@ def __init__(
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)

# Save the scopes.
self._scopes = scopes or self.AUTH_SCOPES
self._scopes = scopes

# If no credentials are provided, then determine the appropriate
# defaults.
@@ -118,13 +120,20 @@ def __init__(
**scopes_kwargs, quota_project_id=quota_project_id
)

# If the credentials is service account credentials, then always try to use self signed JWT.
if (
always_use_jwt_access
and isinstance(credentials, service_account.Credentials)
and hasattr(service_account.Credentials, "with_always_use_jwt_access")
):
credentials = credentials.with_always_use_jwt_access(True)

# Save the credentials.
self._credentials = credentials

# TODO(busunkim): These two class methods are in the base transport
# TODO(busunkim): This method is in the base transport
# to avoid duplicating code across the transport classes. These functions
# should be deleted once the minimum required versions of google-api-core
# and google-auth are increased.
# should be deleted once the minimum required versions of google-auth is increased.

# TODO: Remove this function once google-auth >= 1.25.0 is required
@classmethod
@@ -145,27 +154,6 @@ def _get_scopes_kwargs(

return scopes_kwargs

# TODO: Remove this function once google-api-core >= 1.26.0 is required
@classmethod
def _get_self_signed_jwt_kwargs(
cls, host: str, scopes: Optional[Sequence[str]]
) -> Dict[str, Union[Optional[Sequence[str]], str]]:
"""Returns kwargs to pass to grpc_helpers.create_channel depending on the google-api-core version"""

self_signed_jwt_kwargs: Dict[str, Union[Optional[Sequence[str]], str]] = {}

if _API_CORE_VERSION and (
packaging.version.parse(_API_CORE_VERSION)
>= packaging.version.parse("1.26.0")
):
self_signed_jwt_kwargs["default_scopes"] = cls.AUTH_SCOPES
self_signed_jwt_kwargs["scopes"] = scopes
self_signed_jwt_kwargs["default_host"] = cls.DEFAULT_HOST
else:
self_signed_jwt_kwargs["scopes"] = scopes or cls.AUTH_SCOPES

return self_signed_jwt_kwargs

def _prep_wrapped_messages(self, client_info):
# Precompute the wrapped methods.
self._wrapped_methods = {
Loading