From 46fd6a96317b9b2d1a80c9fc159e2f8965389a1d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 14 Apr 2022 18:42:47 +0200 Subject: [PATCH 01/15] chore(deps): update dependency google-cloud-bigtable to v2.9.0 (#570) --- samples/beam/requirements.txt | 2 +- samples/hello/requirements.txt | 2 +- samples/instanceadmin/requirements.txt | 2 +- samples/metricscaler/requirements.txt | 2 +- samples/quickstart/requirements.txt | 2 +- samples/snippets/filters/requirements.txt | 2 +- samples/snippets/reads/requirements.txt | 2 +- samples/snippets/writes/requirements.txt | 2 +- samples/tableadmin/requirements.txt | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/samples/beam/requirements.txt b/samples/beam/requirements.txt index 4805140e7..a3c7e462b 100644 --- a/samples/beam/requirements.txt +++ b/samples/beam/requirements.txt @@ -1,3 +1,3 @@ apache-beam==2.37.0 -google-cloud-bigtable==2.8.1 +google-cloud-bigtable==2.9.0 google-cloud-core==2.3.0 diff --git a/samples/hello/requirements.txt b/samples/hello/requirements.txt index 0ba29dd99..7dcdef580 100644 --- a/samples/hello/requirements.txt +++ b/samples/hello/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-bigtable==2.8.1 +google-cloud-bigtable==2.9.0 google-cloud-core==2.3.0 diff --git a/samples/instanceadmin/requirements.txt b/samples/instanceadmin/requirements.txt index f0d4e821a..70fe65d74 100644 --- a/samples/instanceadmin/requirements.txt +++ b/samples/instanceadmin/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-bigtable==2.8.1 +google-cloud-bigtable==2.9.0 backoff==1.11.1 diff --git a/samples/metricscaler/requirements.txt b/samples/metricscaler/requirements.txt index b1de8c9a3..070d47be5 100644 --- a/samples/metricscaler/requirements.txt +++ b/samples/metricscaler/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-bigtable==2.8.1 +google-cloud-bigtable==2.9.0 google-cloud-monitoring==2.9.1 diff --git a/samples/quickstart/requirements.txt b/samples/quickstart/requirements.txt index e9a9c1753..a555cf279 100644 --- a/samples/quickstart/requirements.txt +++ b/samples/quickstart/requirements.txt @@ -1 +1 @@ -google-cloud-bigtable==2.8.1 +google-cloud-bigtable==2.9.0 diff --git a/samples/snippets/filters/requirements.txt b/samples/snippets/filters/requirements.txt index a6e307e50..d74172ad3 100644 --- a/samples/snippets/filters/requirements.txt +++ b/samples/snippets/filters/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-bigtable==2.8.1 +google-cloud-bigtable==2.9.0 snapshottest==0.6.0 \ No newline at end of file diff --git a/samples/snippets/reads/requirements.txt b/samples/snippets/reads/requirements.txt index a6e307e50..d74172ad3 100644 --- a/samples/snippets/reads/requirements.txt +++ b/samples/snippets/reads/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-bigtable==2.8.1 +google-cloud-bigtable==2.9.0 snapshottest==0.6.0 \ No newline at end of file diff --git a/samples/snippets/writes/requirements.txt b/samples/snippets/writes/requirements.txt index ceaefad7e..3d3bebbaf 100644 --- a/samples/snippets/writes/requirements.txt +++ b/samples/snippets/writes/requirements.txt @@ -1 +1 @@ -google-cloud-bigtable==2.8.1 \ No newline at end of file +google-cloud-bigtable==2.9.0 \ No newline at end of file diff --git a/samples/tableadmin/requirements.txt b/samples/tableadmin/requirements.txt index e9a9c1753..a555cf279 100644 --- a/samples/tableadmin/requirements.txt +++ b/samples/tableadmin/requirements.txt @@ -1 +1 @@ -google-cloud-bigtable==2.8.1 +google-cloud-bigtable==2.9.0 From a0fe7bcc87c2e06a086f9ca3b75a8d24a29384e7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 20:14:28 -0400 Subject: [PATCH 02/15] chore(python): add nox session to sort python imports (#572) Source-Link: https://github.com/googleapis/synthtool/commit/1b71c10e20de7ed3f97f692f99a0e3399b67049f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 ++-- noxfile.py | 27 ++++++++++++++++++++++--- samples/beam/noxfile.py | 21 +++++++++++++++++++ samples/hello/noxfile.py | 21 +++++++++++++++++++ samples/hello_happybase/noxfile.py | 21 +++++++++++++++++++ samples/instanceadmin/noxfile.py | 21 +++++++++++++++++++ samples/metricscaler/noxfile.py | 21 +++++++++++++++++++ samples/quickstart/noxfile.py | 21 +++++++++++++++++++ samples/quickstart_happybase/noxfile.py | 21 +++++++++++++++++++ samples/snippets/filters/noxfile.py | 21 +++++++++++++++++++ samples/snippets/reads/noxfile.py | 21 +++++++++++++++++++ samples/snippets/writes/noxfile.py | 21 +++++++++++++++++++ samples/tableadmin/noxfile.py | 21 +++++++++++++++++++ 13 files changed, 257 insertions(+), 5 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index bc893c979..7c454abf7 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163 -# created: 2022-04-06T10:30:21.687684602Z + digest: sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 +# created: 2022-04-20T23:42:53.970438194Z diff --git a/noxfile.py b/noxfile.py index 9d1df22ae..740697a02 100644 --- a/noxfile.py +++ b/noxfile.py @@ -25,7 +25,8 @@ import nox BLACK_VERSION = "black==22.3.0" -BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] +ISORT_VERSION = "isort==5.10.1" +LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.8" @@ -85,7 +86,7 @@ def lint(session): session.run( "black", "--check", - *BLACK_PATHS, + *LINT_PATHS, ) session.run("flake8", "google", "tests") @@ -96,7 +97,27 @@ def blacken(session): session.install(BLACK_VERSION) session.run( "black", - *BLACK_PATHS, + *LINT_PATHS, + ) + + +@nox.session(python=DEFAULT_PYTHON_VERSION) +def format(session): + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run( + "isort", + "--fss", + *LINT_PATHS, + ) + session.run( + "black", + *LINT_PATHS, ) diff --git a/samples/beam/noxfile.py b/samples/beam/noxfile.py index 05df27cdb..960a011c2 100644 --- a/samples/beam/noxfile.py +++ b/samples/beam/noxfile.py @@ -30,6 +30,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING BLACK_VERSION = "black==22.3.0" +ISORT_VERSION = "isort==5.10.1" # Copy `noxfile_config.py` to your directory and modify it instead. @@ -166,12 +167,32 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: + """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) +# +# format = isort + black +# + +@nox.session +def format(session: nox.sessions.Session) -> None: + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run("isort", "--fss", *python_files) + session.run("black", *python_files) + + # # Sample Tests # diff --git a/samples/hello/noxfile.py b/samples/hello/noxfile.py index 949e0fde9..38bb0a572 100644 --- a/samples/hello/noxfile.py +++ b/samples/hello/noxfile.py @@ -30,6 +30,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING BLACK_VERSION = "black==22.3.0" +ISORT_VERSION = "isort==5.10.1" # Copy `noxfile_config.py` to your directory and modify it instead. @@ -168,12 +169,32 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: + """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) +# +# format = isort + black +# + +@nox.session +def format(session: nox.sessions.Session) -> None: + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run("isort", "--fss", *python_files) + session.run("black", *python_files) + + # # Sample Tests # diff --git a/samples/hello_happybase/noxfile.py b/samples/hello_happybase/noxfile.py index 949e0fde9..38bb0a572 100644 --- a/samples/hello_happybase/noxfile.py +++ b/samples/hello_happybase/noxfile.py @@ -30,6 +30,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING BLACK_VERSION = "black==22.3.0" +ISORT_VERSION = "isort==5.10.1" # Copy `noxfile_config.py` to your directory and modify it instead. @@ -168,12 +169,32 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: + """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) +# +# format = isort + black +# + +@nox.session +def format(session: nox.sessions.Session) -> None: + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run("isort", "--fss", *python_files) + session.run("black", *python_files) + + # # Sample Tests # diff --git a/samples/instanceadmin/noxfile.py b/samples/instanceadmin/noxfile.py index 949e0fde9..38bb0a572 100644 --- a/samples/instanceadmin/noxfile.py +++ b/samples/instanceadmin/noxfile.py @@ -30,6 +30,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING BLACK_VERSION = "black==22.3.0" +ISORT_VERSION = "isort==5.10.1" # Copy `noxfile_config.py` to your directory and modify it instead. @@ -168,12 +169,32 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: + """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) +# +# format = isort + black +# + +@nox.session +def format(session: nox.sessions.Session) -> None: + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run("isort", "--fss", *python_files) + session.run("black", *python_files) + + # # Sample Tests # diff --git a/samples/metricscaler/noxfile.py b/samples/metricscaler/noxfile.py index 949e0fde9..38bb0a572 100644 --- a/samples/metricscaler/noxfile.py +++ b/samples/metricscaler/noxfile.py @@ -30,6 +30,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING BLACK_VERSION = "black==22.3.0" +ISORT_VERSION = "isort==5.10.1" # Copy `noxfile_config.py` to your directory and modify it instead. @@ -168,12 +169,32 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: + """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) +# +# format = isort + black +# + +@nox.session +def format(session: nox.sessions.Session) -> None: + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run("isort", "--fss", *python_files) + session.run("black", *python_files) + + # # Sample Tests # diff --git a/samples/quickstart/noxfile.py b/samples/quickstart/noxfile.py index 949e0fde9..38bb0a572 100644 --- a/samples/quickstart/noxfile.py +++ b/samples/quickstart/noxfile.py @@ -30,6 +30,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING BLACK_VERSION = "black==22.3.0" +ISORT_VERSION = "isort==5.10.1" # Copy `noxfile_config.py` to your directory and modify it instead. @@ -168,12 +169,32 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: + """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) +# +# format = isort + black +# + +@nox.session +def format(session: nox.sessions.Session) -> None: + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run("isort", "--fss", *python_files) + session.run("black", *python_files) + + # # Sample Tests # diff --git a/samples/quickstart_happybase/noxfile.py b/samples/quickstart_happybase/noxfile.py index 949e0fde9..38bb0a572 100644 --- a/samples/quickstart_happybase/noxfile.py +++ b/samples/quickstart_happybase/noxfile.py @@ -30,6 +30,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING BLACK_VERSION = "black==22.3.0" +ISORT_VERSION = "isort==5.10.1" # Copy `noxfile_config.py` to your directory and modify it instead. @@ -168,12 +169,32 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: + """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) +# +# format = isort + black +# + +@nox.session +def format(session: nox.sessions.Session) -> None: + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run("isort", "--fss", *python_files) + session.run("black", *python_files) + + # # Sample Tests # diff --git a/samples/snippets/filters/noxfile.py b/samples/snippets/filters/noxfile.py index 949e0fde9..38bb0a572 100644 --- a/samples/snippets/filters/noxfile.py +++ b/samples/snippets/filters/noxfile.py @@ -30,6 +30,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING BLACK_VERSION = "black==22.3.0" +ISORT_VERSION = "isort==5.10.1" # Copy `noxfile_config.py` to your directory and modify it instead. @@ -168,12 +169,32 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: + """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) +# +# format = isort + black +# + +@nox.session +def format(session: nox.sessions.Session) -> None: + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run("isort", "--fss", *python_files) + session.run("black", *python_files) + + # # Sample Tests # diff --git a/samples/snippets/reads/noxfile.py b/samples/snippets/reads/noxfile.py index 949e0fde9..38bb0a572 100644 --- a/samples/snippets/reads/noxfile.py +++ b/samples/snippets/reads/noxfile.py @@ -30,6 +30,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING BLACK_VERSION = "black==22.3.0" +ISORT_VERSION = "isort==5.10.1" # Copy `noxfile_config.py` to your directory and modify it instead. @@ -168,12 +169,32 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: + """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) +# +# format = isort + black +# + +@nox.session +def format(session: nox.sessions.Session) -> None: + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run("isort", "--fss", *python_files) + session.run("black", *python_files) + + # # Sample Tests # diff --git a/samples/snippets/writes/noxfile.py b/samples/snippets/writes/noxfile.py index 949e0fde9..38bb0a572 100644 --- a/samples/snippets/writes/noxfile.py +++ b/samples/snippets/writes/noxfile.py @@ -30,6 +30,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING BLACK_VERSION = "black==22.3.0" +ISORT_VERSION = "isort==5.10.1" # Copy `noxfile_config.py` to your directory and modify it instead. @@ -168,12 +169,32 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: + """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) +# +# format = isort + black +# + +@nox.session +def format(session: nox.sessions.Session) -> None: + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run("isort", "--fss", *python_files) + session.run("black", *python_files) + + # # Sample Tests # diff --git a/samples/tableadmin/noxfile.py b/samples/tableadmin/noxfile.py index 949e0fde9..38bb0a572 100644 --- a/samples/tableadmin/noxfile.py +++ b/samples/tableadmin/noxfile.py @@ -30,6 +30,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING BLACK_VERSION = "black==22.3.0" +ISORT_VERSION = "isort==5.10.1" # Copy `noxfile_config.py` to your directory and modify it instead. @@ -168,12 +169,32 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: + """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) +# +# format = isort + black +# + +@nox.session +def format(session: nox.sessions.Session) -> None: + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run("isort", "--fss", *python_files) + session.run("black", *python_files) + + # # Sample Tests # From e6ac97e38bdd70ed085b5545135501756d72e539 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Apr 2022 03:33:15 +0200 Subject: [PATCH 03/15] chore(deps): update dependency apache-beam to v2.38.0 (#573) --- samples/beam/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/beam/requirements.txt b/samples/beam/requirements.txt index a3c7e462b..ce89af087 100644 --- a/samples/beam/requirements.txt +++ b/samples/beam/requirements.txt @@ -1,3 +1,3 @@ -apache-beam==2.37.0 +apache-beam==2.38.0 google-cloud-bigtable==2.9.0 google-cloud-core==2.3.0 From f14e64f17cb73d4559822c222c2d25cb9555bcbe Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 18:02:22 +0000 Subject: [PATCH 04/15] chore(python): use ubuntu 22.04 in docs image (#575) Source-Link: https://github.com/googleapis/synthtool/commit/f15cc72fb401b4861cedebb10af74afe428fb1f8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:bc5eed3804aec2f05fad42aacf973821d9500c174015341f721a984a0825b6fd --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/docker/docs/Dockerfile | 20 ++++++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 7c454abf7..64f82d6bf 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 -# created: 2022-04-20T23:42:53.970438194Z + digest: sha256:bc5eed3804aec2f05fad42aacf973821d9500c174015341f721a984a0825b6fd +# created: 2022-04-21T15:43:16.246106921Z diff --git a/.kokoro/docker/docs/Dockerfile b/.kokoro/docker/docs/Dockerfile index 4e1b1fb8b..238b87b9d 100644 --- a/.kokoro/docker/docs/Dockerfile +++ b/.kokoro/docker/docs/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from ubuntu:20.04 +from ubuntu:22.04 ENV DEBIAN_FRONTEND noninteractive @@ -60,8 +60,24 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && rm -f /var/cache/apt/archives/*.deb +###################### Install python 3.8.11 + +# Download python 3.8.11 +RUN wget https://www.python.org/ftp/python/3.8.11/Python-3.8.11.tgz + +# Extract files +RUN tar -xvf Python-3.8.11.tgz + +# Install python 3.8.11 +RUN ./Python-3.8.11/configure --enable-optimizations +RUN make altinstall + +###################### Install pip RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ - && python3.8 /tmp/get-pip.py \ + && python3 /tmp/get-pip.py \ && rm /tmp/get-pip.py +# Test pip +RUN python3 -m pip + CMD ["python3.8"] From 1e92e25ad71adfb54cee494106e1eb38dc050055 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Apr 2022 17:00:15 +0200 Subject: [PATCH 05/15] chore(deps): update dependency pytest to v7.1.2 (#576) --- samples/beam/requirements-test.txt | 2 +- samples/hello/requirements-test.txt | 2 +- samples/hello_happybase/requirements-test.txt | 2 +- samples/instanceadmin/requirements-test.txt | 2 +- samples/metricscaler/requirements-test.txt | 2 +- samples/quickstart/requirements-test.txt | 2 +- samples/quickstart_happybase/requirements-test.txt | 2 +- samples/snippets/filters/requirements-test.txt | 2 +- samples/snippets/reads/requirements-test.txt | 2 +- samples/snippets/writes/requirements-test.txt | 2 +- samples/tableadmin/requirements-test.txt | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/samples/beam/requirements-test.txt b/samples/beam/requirements-test.txt index 4f6bf643f..d00689e06 100644 --- a/samples/beam/requirements-test.txt +++ b/samples/beam/requirements-test.txt @@ -1 +1 @@ -pytest==7.1.1 +pytest==7.1.2 diff --git a/samples/hello/requirements-test.txt b/samples/hello/requirements-test.txt index 4f6bf643f..d00689e06 100644 --- a/samples/hello/requirements-test.txt +++ b/samples/hello/requirements-test.txt @@ -1 +1 @@ -pytest==7.1.1 +pytest==7.1.2 diff --git a/samples/hello_happybase/requirements-test.txt b/samples/hello_happybase/requirements-test.txt index 4f6bf643f..d00689e06 100644 --- a/samples/hello_happybase/requirements-test.txt +++ b/samples/hello_happybase/requirements-test.txt @@ -1 +1 @@ -pytest==7.1.1 +pytest==7.1.2 diff --git a/samples/instanceadmin/requirements-test.txt b/samples/instanceadmin/requirements-test.txt index 4f6bf643f..d00689e06 100644 --- a/samples/instanceadmin/requirements-test.txt +++ b/samples/instanceadmin/requirements-test.txt @@ -1 +1 @@ -pytest==7.1.1 +pytest==7.1.2 diff --git a/samples/metricscaler/requirements-test.txt b/samples/metricscaler/requirements-test.txt index fe1569ff4..7292f2245 100644 --- a/samples/metricscaler/requirements-test.txt +++ b/samples/metricscaler/requirements-test.txt @@ -1,3 +1,3 @@ -pytest==7.1.1 +pytest==7.1.2 mock==4.0.3 google-cloud-testutils diff --git a/samples/quickstart/requirements-test.txt b/samples/quickstart/requirements-test.txt index 4f6bf643f..d00689e06 100644 --- a/samples/quickstart/requirements-test.txt +++ b/samples/quickstart/requirements-test.txt @@ -1 +1 @@ -pytest==7.1.1 +pytest==7.1.2 diff --git a/samples/quickstart_happybase/requirements-test.txt b/samples/quickstart_happybase/requirements-test.txt index 4f6bf643f..d00689e06 100644 --- a/samples/quickstart_happybase/requirements-test.txt +++ b/samples/quickstart_happybase/requirements-test.txt @@ -1 +1 @@ -pytest==7.1.1 +pytest==7.1.2 diff --git a/samples/snippets/filters/requirements-test.txt b/samples/snippets/filters/requirements-test.txt index 4f6bf643f..d00689e06 100644 --- a/samples/snippets/filters/requirements-test.txt +++ b/samples/snippets/filters/requirements-test.txt @@ -1 +1 @@ -pytest==7.1.1 +pytest==7.1.2 diff --git a/samples/snippets/reads/requirements-test.txt b/samples/snippets/reads/requirements-test.txt index 4f6bf643f..d00689e06 100644 --- a/samples/snippets/reads/requirements-test.txt +++ b/samples/snippets/reads/requirements-test.txt @@ -1 +1 @@ -pytest==7.1.1 +pytest==7.1.2 diff --git a/samples/snippets/writes/requirements-test.txt b/samples/snippets/writes/requirements-test.txt index 678dbc8ef..e29e011b3 100644 --- a/samples/snippets/writes/requirements-test.txt +++ b/samples/snippets/writes/requirements-test.txt @@ -1,2 +1,2 @@ backoff==1.11.1 -pytest==7.1.1 +pytest==7.1.2 diff --git a/samples/tableadmin/requirements-test.txt b/samples/tableadmin/requirements-test.txt index e3434bfa8..69a7581b6 100644 --- a/samples/tableadmin/requirements-test.txt +++ b/samples/tableadmin/requirements-test.txt @@ -1,2 +1,2 @@ -pytest==7.1.1 +pytest==7.1.2 google-cloud-testutils==1.3.1 From e2467726cd662683c69a8e1e70aca1693f95d1a2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Apr 2022 20:05:03 +0200 Subject: [PATCH 06/15] chore(deps): update dependency backoff to v2 (#577) --- samples/instanceadmin/requirements.txt | 2 +- samples/snippets/writes/requirements-test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/instanceadmin/requirements.txt b/samples/instanceadmin/requirements.txt index 70fe65d74..3600abf71 100644 --- a/samples/instanceadmin/requirements.txt +++ b/samples/instanceadmin/requirements.txt @@ -1,2 +1,2 @@ google-cloud-bigtable==2.9.0 -backoff==1.11.1 +backoff==2.0.0 diff --git a/samples/snippets/writes/requirements-test.txt b/samples/snippets/writes/requirements-test.txt index e29e011b3..81c3a60c1 100644 --- a/samples/snippets/writes/requirements-test.txt +++ b/samples/snippets/writes/requirements-test.txt @@ -1,2 +1,2 @@ -backoff==1.11.1 +backoff==2.0.0 pytest==7.1.2 From 57a2f26b83055033a3ccd14ae66f3179043cecc6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Apr 2022 19:30:52 +0200 Subject: [PATCH 07/15] chore(deps): update dependency backoff to v2.0.1 (#579) --- samples/instanceadmin/requirements.txt | 2 +- samples/snippets/writes/requirements-test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/instanceadmin/requirements.txt b/samples/instanceadmin/requirements.txt index 3600abf71..90da13ba0 100644 --- a/samples/instanceadmin/requirements.txt +++ b/samples/instanceadmin/requirements.txt @@ -1,2 +1,2 @@ google-cloud-bigtable==2.9.0 -backoff==2.0.0 +backoff==2.0.1 diff --git a/samples/snippets/writes/requirements-test.txt b/samples/snippets/writes/requirements-test.txt index 81c3a60c1..4d92cc9aa 100644 --- a/samples/snippets/writes/requirements-test.txt +++ b/samples/snippets/writes/requirements-test.txt @@ -1,2 +1,2 @@ -backoff==2.0.0 +backoff==2.0.1 pytest==7.1.2 From c11dbd5e866886d08a88936c39f387c230755c25 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 28 Apr 2022 07:22:00 -0400 Subject: [PATCH 08/15] chore: use gapic-generator-python 0.65.2 (#578) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.65.2 PiperOrigin-RevId: 444333013 Source-Link: https://github.com/googleapis/googleapis/commit/f91b6cf82e929280f6562f6110957c654bd9e2e6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/16eb36095c294e712c74a1bf23550817b42174e5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../test_bigtable_instance_admin.py | 172 ++++++++--------- .../test_bigtable_table_admin.py | 182 +++++++++--------- 2 files changed, 177 insertions(+), 177 deletions(-) diff --git a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py index 3f6013fc5..df770db6b 100644 --- a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py +++ b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py @@ -787,7 +787,7 @@ def test_create_instance_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.CreateInstanceRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_instance), "__call__") as call: @@ -803,7 +803,7 @@ def test_create_instance_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -817,7 +817,7 @@ async def test_create_instance_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.CreateInstanceRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_instance), "__call__") as call: @@ -835,7 +835,7 @@ async def test_create_instance_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1062,7 +1062,7 @@ def test_get_instance_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.GetInstanceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_instance), "__call__") as call: @@ -1078,7 +1078,7 @@ def test_get_instance_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1092,7 +1092,7 @@ async def test_get_instance_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.GetInstanceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_instance), "__call__") as call: @@ -1108,7 +1108,7 @@ async def test_get_instance_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1296,7 +1296,7 @@ def test_list_instances_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.ListInstancesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_instances), "__call__") as call: @@ -1312,7 +1312,7 @@ def test_list_instances_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1326,7 +1326,7 @@ async def test_list_instances_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.ListInstancesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_instances), "__call__") as call: @@ -1344,7 +1344,7 @@ async def test_list_instances_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1540,7 +1540,7 @@ def test_update_instance_field_headers(): # a field header. Set these to a non-empty value. request = instance.Instance() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_instance), "__call__") as call: @@ -1556,7 +1556,7 @@ def test_update_instance_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1570,7 +1570,7 @@ async def test_update_instance_field_headers_async(): # a field header. Set these to a non-empty value. request = instance.Instance() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_instance), "__call__") as call: @@ -1586,7 +1586,7 @@ async def test_update_instance_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1689,7 +1689,7 @@ def test_partial_update_instance_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.PartialUpdateInstanceRequest() - request.instance.name = "instance.name/value" + request.instance.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1707,7 +1707,7 @@ def test_partial_update_instance_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "instance.name=instance.name/value", + "instance.name=name_value", ) in kw["metadata"] @@ -1721,7 +1721,7 @@ async def test_partial_update_instance_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.PartialUpdateInstanceRequest() - request.instance.name = "instance.name/value" + request.instance.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1741,7 +1741,7 @@ async def test_partial_update_instance_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "instance.name=instance.name/value", + "instance.name=name_value", ) in kw["metadata"] @@ -1932,7 +1932,7 @@ def test_delete_instance_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.DeleteInstanceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_instance), "__call__") as call: @@ -1948,7 +1948,7 @@ def test_delete_instance_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1962,7 +1962,7 @@ async def test_delete_instance_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.DeleteInstanceRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_instance), "__call__") as call: @@ -1978,7 +1978,7 @@ async def test_delete_instance_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2155,7 +2155,7 @@ def test_create_cluster_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.CreateClusterRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_cluster), "__call__") as call: @@ -2171,7 +2171,7 @@ def test_create_cluster_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2185,7 +2185,7 @@ async def test_create_cluster_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.CreateClusterRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_cluster), "__call__") as call: @@ -2203,7 +2203,7 @@ async def test_create_cluster_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2429,7 +2429,7 @@ def test_get_cluster_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.GetClusterRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_cluster), "__call__") as call: @@ -2445,7 +2445,7 @@ def test_get_cluster_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2459,7 +2459,7 @@ async def test_get_cluster_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.GetClusterRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_cluster), "__call__") as call: @@ -2475,7 +2475,7 @@ async def test_get_cluster_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2663,7 +2663,7 @@ def test_list_clusters_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.ListClustersRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_clusters), "__call__") as call: @@ -2679,7 +2679,7 @@ def test_list_clusters_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2693,7 +2693,7 @@ async def test_list_clusters_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.ListClustersRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_clusters), "__call__") as call: @@ -2711,7 +2711,7 @@ async def test_list_clusters_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -2889,7 +2889,7 @@ def test_update_cluster_field_headers(): # a field header. Set these to a non-empty value. request = instance.Cluster() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_cluster), "__call__") as call: @@ -2905,7 +2905,7 @@ def test_update_cluster_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2919,7 +2919,7 @@ async def test_update_cluster_field_headers_async(): # a field header. Set these to a non-empty value. request = instance.Cluster() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_cluster), "__call__") as call: @@ -2937,7 +2937,7 @@ async def test_update_cluster_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3040,7 +3040,7 @@ def test_partial_update_cluster_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.PartialUpdateClusterRequest() - request.cluster.name = "cluster.name/value" + request.cluster.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3058,7 +3058,7 @@ def test_partial_update_cluster_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "cluster.name=cluster.name/value", + "cluster.name=name_value", ) in kw["metadata"] @@ -3072,7 +3072,7 @@ async def test_partial_update_cluster_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.PartialUpdateClusterRequest() - request.cluster.name = "cluster.name/value" + request.cluster.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3092,7 +3092,7 @@ async def test_partial_update_cluster_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "cluster.name=cluster.name/value", + "cluster.name=name_value", ) in kw["metadata"] @@ -3283,7 +3283,7 @@ def test_delete_cluster_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.DeleteClusterRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_cluster), "__call__") as call: @@ -3299,7 +3299,7 @@ def test_delete_cluster_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3313,7 +3313,7 @@ async def test_delete_cluster_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.DeleteClusterRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_cluster), "__call__") as call: @@ -3329,7 +3329,7 @@ async def test_delete_cluster_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3529,7 +3529,7 @@ def test_create_app_profile_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.CreateAppProfileRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3547,7 +3547,7 @@ def test_create_app_profile_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3561,7 +3561,7 @@ async def test_create_app_profile_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.CreateAppProfileRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -3579,7 +3579,7 @@ async def test_create_app_profile_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3797,7 +3797,7 @@ def test_get_app_profile_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.GetAppProfileRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_app_profile), "__call__") as call: @@ -3813,7 +3813,7 @@ def test_get_app_profile_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3827,7 +3827,7 @@ async def test_get_app_profile_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.GetAppProfileRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_app_profile), "__call__") as call: @@ -3843,7 +3843,7 @@ async def test_get_app_profile_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4036,7 +4036,7 @@ def test_list_app_profiles_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.ListAppProfilesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4054,7 +4054,7 @@ def test_list_app_profiles_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4068,7 +4068,7 @@ async def test_list_app_profiles_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.ListAppProfilesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4088,7 +4088,7 @@ async def test_list_app_profiles_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4225,7 +4225,7 @@ def test_list_app_profiles_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, instance.AppProfile) for i in results) @@ -4473,7 +4473,7 @@ def test_update_app_profile_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.UpdateAppProfileRequest() - request.app_profile.name = "app_profile.name/value" + request.app_profile.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4491,7 +4491,7 @@ def test_update_app_profile_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "app_profile.name=app_profile.name/value", + "app_profile.name=name_value", ) in kw["metadata"] @@ -4505,7 +4505,7 @@ async def test_update_app_profile_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.UpdateAppProfileRequest() - request.app_profile.name = "app_profile.name/value" + request.app_profile.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4525,7 +4525,7 @@ async def test_update_app_profile_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "app_profile.name=app_profile.name/value", + "app_profile.name=name_value", ) in kw["metadata"] @@ -4722,7 +4722,7 @@ def test_delete_app_profile_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.DeleteAppProfileRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4740,7 +4740,7 @@ def test_delete_app_profile_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4754,7 +4754,7 @@ async def test_delete_app_profile_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.DeleteAppProfileRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -4772,7 +4772,7 @@ async def test_delete_app_profile_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4962,7 +4962,7 @@ def test_get_iam_policy_field_headers(): # a field header. Set these to a non-empty value. request = iam_policy_pb2.GetIamPolicyRequest() - request.resource = "resource/value" + request.resource = "resource_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_iam_policy), "__call__") as call: @@ -4978,7 +4978,7 @@ def test_get_iam_policy_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "resource=resource/value", + "resource=resource_value", ) in kw["metadata"] @@ -4992,7 +4992,7 @@ async def test_get_iam_policy_field_headers_async(): # a field header. Set these to a non-empty value. request = iam_policy_pb2.GetIamPolicyRequest() - request.resource = "resource/value" + request.resource = "resource_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_iam_policy), "__call__") as call: @@ -5008,7 +5008,7 @@ async def test_get_iam_policy_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "resource=resource/value", + "resource=resource_value", ) in kw["metadata"] @@ -5211,7 +5211,7 @@ def test_set_iam_policy_field_headers(): # a field header. Set these to a non-empty value. request = iam_policy_pb2.SetIamPolicyRequest() - request.resource = "resource/value" + request.resource = "resource_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.set_iam_policy), "__call__") as call: @@ -5227,7 +5227,7 @@ def test_set_iam_policy_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "resource=resource/value", + "resource=resource_value", ) in kw["metadata"] @@ -5241,7 +5241,7 @@ async def test_set_iam_policy_field_headers_async(): # a field header. Set these to a non-empty value. request = iam_policy_pb2.SetIamPolicyRequest() - request.resource = "resource/value" + request.resource = "resource_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.set_iam_policy), "__call__") as call: @@ -5257,7 +5257,7 @@ async def test_set_iam_policy_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "resource=resource/value", + "resource=resource_value", ) in kw["metadata"] @@ -5464,7 +5464,7 @@ def test_test_iam_permissions_field_headers(): # a field header. Set these to a non-empty value. request = iam_policy_pb2.TestIamPermissionsRequest() - request.resource = "resource/value" + request.resource = "resource_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5482,7 +5482,7 @@ def test_test_iam_permissions_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "resource=resource/value", + "resource=resource_value", ) in kw["metadata"] @@ -5496,7 +5496,7 @@ async def test_test_iam_permissions_field_headers_async(): # a field header. Set these to a non-empty value. request = iam_policy_pb2.TestIamPermissionsRequest() - request.resource = "resource/value" + request.resource = "resource_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -5516,7 +5516,7 @@ async def test_test_iam_permissions_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "resource=resource/value", + "resource=resource_value", ) in kw["metadata"] @@ -5734,7 +5734,7 @@ def test_list_hot_tablets_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.ListHotTabletsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_hot_tablets), "__call__") as call: @@ -5750,7 +5750,7 @@ def test_list_hot_tablets_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5764,7 +5764,7 @@ async def test_list_hot_tablets_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_instance_admin.ListHotTabletsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_hot_tablets), "__call__") as call: @@ -5782,7 +5782,7 @@ async def test_list_hot_tablets_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5913,7 +5913,7 @@ def test_list_hot_tablets_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, instance.HotTablet) for i in results) diff --git a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py index b706a87d2..2e89585c7 100644 --- a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py +++ b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py @@ -790,7 +790,7 @@ def test_create_table_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.CreateTableRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_table), "__call__") as call: @@ -806,7 +806,7 @@ def test_create_table_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -820,7 +820,7 @@ async def test_create_table_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.CreateTableRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_table), "__call__") as call: @@ -836,7 +836,7 @@ async def test_create_table_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1039,7 +1039,7 @@ def test_create_table_from_snapshot_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.CreateTableFromSnapshotRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1057,7 +1057,7 @@ def test_create_table_from_snapshot_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1071,7 +1071,7 @@ async def test_create_table_from_snapshot_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.CreateTableFromSnapshotRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -1091,7 +1091,7 @@ async def test_create_table_from_snapshot_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1299,7 +1299,7 @@ def test_list_tables_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.ListTablesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_tables), "__call__") as call: @@ -1315,7 +1315,7 @@ def test_list_tables_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1329,7 +1329,7 @@ async def test_list_tables_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.ListTablesRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_tables), "__call__") as call: @@ -1347,7 +1347,7 @@ async def test_list_tables_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -1478,7 +1478,7 @@ def test_list_tables_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, table.Table) for i in results) @@ -1723,7 +1723,7 @@ def test_get_table_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.GetTableRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_table), "__call__") as call: @@ -1739,7 +1739,7 @@ def test_get_table_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1753,7 +1753,7 @@ async def test_get_table_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.GetTableRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_table), "__call__") as call: @@ -1769,7 +1769,7 @@ async def test_get_table_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1944,7 +1944,7 @@ def test_delete_table_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.DeleteTableRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_table), "__call__") as call: @@ -1960,7 +1960,7 @@ def test_delete_table_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -1974,7 +1974,7 @@ async def test_delete_table_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.DeleteTableRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_table), "__call__") as call: @@ -1990,7 +1990,7 @@ async def test_delete_table_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2183,7 +2183,7 @@ def test_modify_column_families_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.ModifyColumnFamiliesRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2201,7 +2201,7 @@ def test_modify_column_families_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2215,7 +2215,7 @@ async def test_modify_column_families_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.ModifyColumnFamiliesRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2233,7 +2233,7 @@ async def test_modify_column_families_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2442,7 +2442,7 @@ def test_drop_row_range_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.DropRowRangeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.drop_row_range), "__call__") as call: @@ -2458,7 +2458,7 @@ def test_drop_row_range_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2472,7 +2472,7 @@ async def test_drop_row_range_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.DropRowRangeRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.drop_row_range), "__call__") as call: @@ -2488,7 +2488,7 @@ async def test_drop_row_range_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2597,7 +2597,7 @@ def test_generate_consistency_token_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.GenerateConsistencyTokenRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2615,7 +2615,7 @@ def test_generate_consistency_token_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2629,7 +2629,7 @@ async def test_generate_consistency_token_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.GenerateConsistencyTokenRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2649,7 +2649,7 @@ async def test_generate_consistency_token_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2844,7 +2844,7 @@ def test_check_consistency_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.CheckConsistencyRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2862,7 +2862,7 @@ def test_check_consistency_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -2876,7 +2876,7 @@ async def test_check_consistency_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.CheckConsistencyRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -2896,7 +2896,7 @@ async def test_check_consistency_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3089,7 +3089,7 @@ def test_snapshot_table_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.SnapshotTableRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.snapshot_table), "__call__") as call: @@ -3105,7 +3105,7 @@ def test_snapshot_table_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3119,7 +3119,7 @@ async def test_snapshot_table_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.SnapshotTableRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.snapshot_table), "__call__") as call: @@ -3137,7 +3137,7 @@ async def test_snapshot_table_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3364,7 +3364,7 @@ def test_get_snapshot_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.GetSnapshotRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_snapshot), "__call__") as call: @@ -3380,7 +3380,7 @@ def test_get_snapshot_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3394,7 +3394,7 @@ async def test_get_snapshot_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.GetSnapshotRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_snapshot), "__call__") as call: @@ -3410,7 +3410,7 @@ async def test_get_snapshot_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -3593,7 +3593,7 @@ def test_list_snapshots_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.ListSnapshotsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_snapshots), "__call__") as call: @@ -3609,7 +3609,7 @@ def test_list_snapshots_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3623,7 +3623,7 @@ async def test_list_snapshots_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.ListSnapshotsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_snapshots), "__call__") as call: @@ -3641,7 +3641,7 @@ async def test_list_snapshots_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -3772,7 +3772,7 @@ def test_list_snapshots_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, table.Snapshot) for i in results) @@ -4006,7 +4006,7 @@ def test_delete_snapshot_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.DeleteSnapshotRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_snapshot), "__call__") as call: @@ -4022,7 +4022,7 @@ def test_delete_snapshot_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4036,7 +4036,7 @@ async def test_delete_snapshot_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.DeleteSnapshotRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_snapshot), "__call__") as call: @@ -4052,7 +4052,7 @@ async def test_delete_snapshot_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4229,7 +4229,7 @@ def test_create_backup_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.CreateBackupRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_backup), "__call__") as call: @@ -4245,7 +4245,7 @@ def test_create_backup_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4259,7 +4259,7 @@ async def test_create_backup_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.CreateBackupRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.create_backup), "__call__") as call: @@ -4277,7 +4277,7 @@ async def test_create_backup_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -4493,7 +4493,7 @@ def test_get_backup_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.GetBackupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_backup), "__call__") as call: @@ -4509,7 +4509,7 @@ def test_get_backup_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4523,7 +4523,7 @@ async def test_get_backup_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.GetBackupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_backup), "__call__") as call: @@ -4539,7 +4539,7 @@ async def test_get_backup_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4734,7 +4734,7 @@ def test_update_backup_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.UpdateBackupRequest() - request.backup.name = "backup.name/value" + request.backup.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_backup), "__call__") as call: @@ -4750,7 +4750,7 @@ def test_update_backup_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "backup.name=backup.name/value", + "backup.name=name_value", ) in kw["metadata"] @@ -4764,7 +4764,7 @@ async def test_update_backup_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.UpdateBackupRequest() - request.backup.name = "backup.name/value" + request.backup.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.update_backup), "__call__") as call: @@ -4780,7 +4780,7 @@ async def test_update_backup_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "backup.name=backup.name/value", + "backup.name=name_value", ) in kw["metadata"] @@ -4965,7 +4965,7 @@ def test_delete_backup_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.DeleteBackupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_backup), "__call__") as call: @@ -4981,7 +4981,7 @@ def test_delete_backup_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -4995,7 +4995,7 @@ async def test_delete_backup_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.DeleteBackupRequest() - request.name = "name/value" + request.name = "name_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.delete_backup), "__call__") as call: @@ -5011,7 +5011,7 @@ async def test_delete_backup_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "name=name/value", + "name=name_value", ) in kw["metadata"] @@ -5194,7 +5194,7 @@ def test_list_backups_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.ListBackupsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_backups), "__call__") as call: @@ -5210,7 +5210,7 @@ def test_list_backups_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5224,7 +5224,7 @@ async def test_list_backups_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.ListBackupsRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_backups), "__call__") as call: @@ -5242,7 +5242,7 @@ async def test_list_backups_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5373,7 +5373,7 @@ def test_list_backups_pager(transport_name: str = "grpc"): assert pager._metadata == metadata - results = [i for i in pager] + results = list(pager) assert len(results) == 6 assert all(isinstance(i, table.Backup) for i in results) @@ -5609,7 +5609,7 @@ def test_restore_table_field_headers(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.RestoreTableRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.restore_table), "__call__") as call: @@ -5625,7 +5625,7 @@ def test_restore_table_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5639,7 +5639,7 @@ async def test_restore_table_field_headers_async(): # a field header. Set these to a non-empty value. request = bigtable_table_admin.RestoreTableRequest() - request.parent = "parent/value" + request.parent = "parent_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.restore_table), "__call__") as call: @@ -5657,7 +5657,7 @@ async def test_restore_table_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "parent=parent/value", + "parent=parent_value", ) in kw["metadata"] @@ -5763,7 +5763,7 @@ def test_get_iam_policy_field_headers(): # a field header. Set these to a non-empty value. request = iam_policy_pb2.GetIamPolicyRequest() - request.resource = "resource/value" + request.resource = "resource_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_iam_policy), "__call__") as call: @@ -5779,7 +5779,7 @@ def test_get_iam_policy_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "resource=resource/value", + "resource=resource_value", ) in kw["metadata"] @@ -5793,7 +5793,7 @@ async def test_get_iam_policy_field_headers_async(): # a field header. Set these to a non-empty value. request = iam_policy_pb2.GetIamPolicyRequest() - request.resource = "resource/value" + request.resource = "resource_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.get_iam_policy), "__call__") as call: @@ -5809,7 +5809,7 @@ async def test_get_iam_policy_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "resource=resource/value", + "resource=resource_value", ) in kw["metadata"] @@ -6012,7 +6012,7 @@ def test_set_iam_policy_field_headers(): # a field header. Set these to a non-empty value. request = iam_policy_pb2.SetIamPolicyRequest() - request.resource = "resource/value" + request.resource = "resource_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.set_iam_policy), "__call__") as call: @@ -6028,7 +6028,7 @@ def test_set_iam_policy_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "resource=resource/value", + "resource=resource_value", ) in kw["metadata"] @@ -6042,7 +6042,7 @@ async def test_set_iam_policy_field_headers_async(): # a field header. Set these to a non-empty value. request = iam_policy_pb2.SetIamPolicyRequest() - request.resource = "resource/value" + request.resource = "resource_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.set_iam_policy), "__call__") as call: @@ -6058,7 +6058,7 @@ async def test_set_iam_policy_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "resource=resource/value", + "resource=resource_value", ) in kw["metadata"] @@ -6265,7 +6265,7 @@ def test_test_iam_permissions_field_headers(): # a field header. Set these to a non-empty value. request = iam_policy_pb2.TestIamPermissionsRequest() - request.resource = "resource/value" + request.resource = "resource_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6283,7 +6283,7 @@ def test_test_iam_permissions_field_headers(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "resource=resource/value", + "resource=resource_value", ) in kw["metadata"] @@ -6297,7 +6297,7 @@ async def test_test_iam_permissions_field_headers_async(): # a field header. Set these to a non-empty value. request = iam_policy_pb2.TestIamPermissionsRequest() - request.resource = "resource/value" + request.resource = "resource_value" # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object( @@ -6317,7 +6317,7 @@ async def test_test_iam_permissions_field_headers_async(): _, _, kw = call.mock_calls[0] assert ( "x-goog-request-params", - "resource=resource/value", + "resource=resource_value", ) in kw["metadata"] From 615ad0d97b45781ff574d83fb97c9b3eac51a12c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 13:21:41 -0400 Subject: [PATCH 09/15] chore: [autoapprove] update readme_gen.py to include autoescape True (#580) Source-Link: https://github.com/googleapis/synthtool/commit/6b4d5a6407d740beb4158b302194a62a4108a8a6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f792ee1320e03eda2d13a5281a2989f7ed8a9e50b73ef6da97fac7e1e850b149 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 ++-- scripts/readme-gen/readme_gen.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 64f82d6bf..b631901e9 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:bc5eed3804aec2f05fad42aacf973821d9500c174015341f721a984a0825b6fd -# created: 2022-04-21T15:43:16.246106921Z + digest: sha256:f792ee1320e03eda2d13a5281a2989f7ed8a9e50b73ef6da97fac7e1e850b149 +# created: 2022-05-05T15:17:27.599381182Z diff --git a/scripts/readme-gen/readme_gen.py b/scripts/readme-gen/readme_gen.py index d309d6e97..91b59676b 100644 --- a/scripts/readme-gen/readme_gen.py +++ b/scripts/readme-gen/readme_gen.py @@ -28,7 +28,10 @@ jinja_env = jinja2.Environment( trim_blocks=True, loader=jinja2.FileSystemLoader( - os.path.abspath(os.path.join(os.path.dirname(__file__), 'templates')))) + os.path.abspath(os.path.join(os.path.dirname(__file__), "templates")) + ), + autoescape=True, +) README_TMPL = jinja_env.get_template('README.tmpl.rst') From cff30e5d906283de301b9a94e61d6fd68348ba24 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 23:22:18 +0000 Subject: [PATCH 10/15] chore(python): auto approve template changes (#585) Source-Link: https://github.com/googleapis/synthtool/commit/453a5d9c9a55d1969240a37d36cec626d20a9024 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32 --- .github/.OwlBot.lock.yaml | 4 ++-- .github/auto-approve.yml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .github/auto-approve.yml diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index b631901e9..757c9dca7 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:f792ee1320e03eda2d13a5281a2989f7ed8a9e50b73ef6da97fac7e1e850b149 -# created: 2022-05-05T15:17:27.599381182Z + digest: sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32 +# created: 2022-05-05T22:08:23.383410683Z diff --git a/.github/auto-approve.yml b/.github/auto-approve.yml new file mode 100644 index 000000000..311ebbb85 --- /dev/null +++ b/.github/auto-approve.yml @@ -0,0 +1,3 @@ +# https://github.com/googleapis/repo-automation-bots/tree/main/packages/auto-approve +processes: + - "OwlBotTemplateChanges" From b508e3321937850d65242283e82f5413feb6081a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 20 May 2022 14:24:38 -0700 Subject: [PATCH 11/15] feat: refreshes Bigtable Admin API(s) protos (#589) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: refreshes Bigtable Admin API(s) protos PiperOrigin-RevId: 448988001 Source-Link: https://github.com/googleapis/googleapis/commit/b6fa58e3e886c619018da132de53b47ea7006565 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fc8b8dbc7da1a7845d57134f411302d106ea2ef2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmM4YjhkYmM3ZGExYTc4NDVkNTcxMzRmNDExMzAyZDEwNmVhMmVmMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../bigtable_instance_admin/async_client.py | 12 +---- .../transports/base.py | 12 +---- .../types/bigtable_instance_admin.py | 52 +++++++++++++++++++ .../cloud/bigtable_admin_v2/types/instance.py | 23 ++++---- google/cloud/bigtable_admin_v2/types/table.py | 17 +++--- 5 files changed, 75 insertions(+), 41 deletions(-) diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py index 13f1d71ba..9853efdb4 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py @@ -1262,17 +1262,7 @@ async def partial_update_cluster( # and friendly error handling. rpc = gapic_v1.method_async.wrap_method( self._client._transport.partial_update_cluster, - default_retry=retries.Retry( - initial=1.0, - maximum=60.0, - multiplier=2, - predicate=retries.if_exception_type( - core_exceptions.DeadlineExceeded, - core_exceptions.ServiceUnavailable, - ), - deadline=60.0, - ), - default_timeout=60.0, + default_timeout=None, client_info=DEFAULT_CLIENT_INFO, ) diff --git a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py index 8399c517c..32261ac7b 100644 --- a/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py +++ b/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py @@ -257,17 +257,7 @@ def _prep_wrapped_messages(self, client_info): ), self.partial_update_cluster: gapic_v1.method.wrap_method( self.partial_update_cluster, - default_retry=retries.Retry( - initial=1.0, - maximum=60.0, - multiplier=2, - predicate=retries.if_exception_type( - core_exceptions.DeadlineExceeded, - core_exceptions.ServiceUnavailable, - ), - deadline=60.0, - ), - default_timeout=60.0, + default_timeout=None, client_info=client_info, ), self.delete_cluster: gapic_v1.method.wrap_method( diff --git a/google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py b/google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py index c182966b1..36ad5dc9c 100644 --- a/google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py +++ b/google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py @@ -415,8 +415,54 @@ class CreateClusterMetadata(proto.Message): finish_time (google.protobuf.timestamp_pb2.Timestamp): The time at which the operation failed or was completed successfully. + tables (Mapping[str, google.cloud.bigtable_admin_v2.types.CreateClusterMetadata.TableProgress]): + Keys: the full ``name`` of each table that existed in the + instance when CreateCluster was first called, i.e. + ``projects//instances//tables/``. + Any table added to the instance by a later API call will be + created in the new cluster by that API call, not this one. + + Values: information on how much of a table's data has been + copied to the newly-created cluster so far. """ + class TableProgress(proto.Message): + r"""Progress info for copying a table's data to the new cluster. + + Attributes: + estimated_size_bytes (int): + Estimate of the size of the table to be + copied. + estimated_copied_bytes (int): + Estimate of the number of bytes copied so far for this + table. This will eventually reach 'estimated_size_bytes' + unless the table copy is CANCELLED. + state (google.cloud.bigtable_admin_v2.types.CreateClusterMetadata.TableProgress.State): + + """ + + class State(proto.Enum): + r"""""" + STATE_UNSPECIFIED = 0 + PENDING = 1 + COPYING = 2 + COMPLETED = 3 + CANCELLED = 4 + + estimated_size_bytes = proto.Field( + proto.INT64, + number=2, + ) + estimated_copied_bytes = proto.Field( + proto.INT64, + number=3, + ) + state = proto.Field( + proto.ENUM, + number=4, + enum="CreateClusterMetadata.TableProgress.State", + ) + original_request = proto.Field( proto.MESSAGE, number=1, @@ -432,6 +478,12 @@ class CreateClusterMetadata(proto.Message): number=3, message=timestamp_pb2.Timestamp, ) + tables = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=4, + message=TableProgress, + ) class UpdateClusterMetadata(proto.Message): diff --git a/google/cloud/bigtable_admin_v2/types/instance.py b/google/cloud/bigtable_admin_v2/types/instance.py index 05d1e524d..1b2e4d615 100644 --- a/google/cloud/bigtable_admin_v2/types/instance.py +++ b/google/cloud/bigtable_admin_v2/types/instance.py @@ -169,13 +169,14 @@ class Cluster(proto.Message): The unique name of the cluster. Values are of the form ``projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*``. location (str): - (``CreationOnly``) The location where this cluster's nodes - and storage reside. For best performance, clients should be + Immutable. The location where this cluster's nodes and + storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form ``projects/{project}/locations/{zone}``. state (google.cloud.bigtable_admin_v2.types.Cluster.State): - The current state of the cluster. + Output only. The current state of the + cluster. serve_nodes (int): The number of nodes allocated to this cluster. More nodes enable higher throughput and @@ -185,9 +186,9 @@ class Cluster(proto.Message): This field is a member of `oneof`_ ``config``. default_storage_type (google.cloud.bigtable_admin_v2.types.StorageType): - (``CreationOnly``) The type of storage used by this cluster - to serve its parent instance's tables, unless explicitly - overridden. + Immutable. The type of storage used by this + cluster to serve its parent instance's tables, + unless explicitly overridden. encryption_config (google.cloud.bigtable_admin_v2.types.Cluster.EncryptionConfig): Immutable. The encryption configuration for CMEK-protected clusters. @@ -254,6 +255,9 @@ class EncryptionConfig(proto.Message): key. 2) Only regional keys can be used and the region of the CMEK key must match the region of the cluster. + 3) All clusters within an instance must use the same CMEK + key. Values are of the form + ``projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`` """ kms_key_name = proto.Field( @@ -309,8 +313,7 @@ class AppProfile(proto.Message): Attributes: name (str): - (``OutputOnly``) The unique name of the app profile. Values - are of the form + The unique name of the app profile. Values are of the form ``projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*``. etag (str): Strongly validated etag for optimistic concurrency control. @@ -324,8 +327,8 @@ class AppProfile(proto.Message): 7232 `__ for more details. description (str): - Optional long form description of the use - case for this AppProfile. + Long form description of the use case for + this AppProfile. multi_cluster_routing_use_any (google.cloud.bigtable_admin_v2.types.AppProfile.MultiClusterRoutingUseAny): Use a multi-cluster routing policy. diff --git a/google/cloud/bigtable_admin_v2/types/table.py b/google/cloud/bigtable_admin_v2/types/table.py index 6a4446dd3..183b88086 100644 --- a/google/cloud/bigtable_admin_v2/types/table.py +++ b/google/cloud/bigtable_admin_v2/types/table.py @@ -89,14 +89,13 @@ class Table(proto.Message): with UNKNOWN ``replication_status``. Views: ``REPLICATION_VIEW``, ``ENCRYPTION_VIEW``, ``FULL`` column_families (Mapping[str, google.cloud.bigtable_admin_v2.types.ColumnFamily]): - (``CreationOnly``) The column families configured for this - table, mapped by column family ID. Views: ``SCHEMA_VIEW``, - ``FULL`` + The column families configured for this table, mapped by + column family ID. Views: ``SCHEMA_VIEW``, ``FULL`` granularity (google.cloud.bigtable_admin_v2.types.Table.TimestampGranularity): - (``CreationOnly``) The granularity (i.e. ``MILLIS``) at - which timestamps are stored in this table. Timestamps not - matching the granularity will be rejected. If unspecified at - creation time, the value will be set to ``MILLIS``. Views: + Immutable. The granularity (i.e. ``MILLIS``) at which + timestamps are stored in this table. Timestamps not matching + the granularity will be rejected. If unspecified at creation + time, the value will be set to ``MILLIS``. Views: ``SCHEMA_VIEW``, ``FULL``. restore_info (google.cloud.bigtable_admin_v2.types.RestoreInfo): Output only. If this table was restored from @@ -427,8 +426,8 @@ class Backup(proto.Message): Attributes: name (str): - Output only. A globally unique identifier for the backup - which cannot be changed. Values are of the form + A globally unique identifier for the backup which cannot be + changed. Values are of the form ``projects/{project}/instances/{instance}/clusters/{cluster}/ backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`` The final segment of the name must be between 1 and 50 characters in length. From bedbf1b1bb304ff45f31ad20004ff96041ce716c Mon Sep 17 00:00:00 2001 From: Mariatta Wijaya Date: Tue, 24 May 2022 11:02:27 -0700 Subject: [PATCH 12/15] docs: Add EncryptionInfo documentation (#588) Add documentation about the EncryptionInfo object. The doc is autogenerated from docstrings. --- docs/encryption-info.rst | 6 ++++++ docs/usage.rst | 1 + 2 files changed, 7 insertions(+) create mode 100644 docs/encryption-info.rst diff --git a/docs/encryption-info.rst b/docs/encryption-info.rst new file mode 100644 index 000000000..46f19880f --- /dev/null +++ b/docs/encryption-info.rst @@ -0,0 +1,6 @@ +Encryption Info +~~~~~~~~~~~~~~~ + +.. automodule:: google.cloud.bigtable.encryption_info + :members: + :show-inheritance: diff --git a/docs/usage.rst b/docs/usage.rst index 53faac22f..33bf7bb7f 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -12,6 +12,7 @@ Using the API app-profile backup column-family + encryption-info row row-data row-filters From 510975c2963cf71ed9d73fb22e350a86217ee761 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 25 May 2022 22:35:18 +0200 Subject: [PATCH 13/15] chore(deps): update dependency apache-beam to v2.39.0 (#592) --- samples/beam/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/beam/requirements.txt b/samples/beam/requirements.txt index ce89af087..1f34abd0b 100644 --- a/samples/beam/requirements.txt +++ b/samples/beam/requirements.txt @@ -1,3 +1,3 @@ -apache-beam==2.38.0 +apache-beam==2.39.0 google-cloud-bigtable==2.9.0 google-cloud-core==2.3.0 From ff119ac23a2bdc1240ee3690f6a7b7715ffe9542 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 30 May 2022 17:26:26 +0000 Subject: [PATCH 14/15] chore: use gapic-generator-python 1.0.0 (#593) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 451250442 Source-Link: https://github.com/googleapis/googleapis/commit/cca5e8181f6442b134e8d4d206fbe9e0e74684ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/0b219da161a8bdcc3c6f7b2efcd82105182a30ca Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGIyMTlkYTE2MWE4YmRjYzNjNmY3YjJlZmNkODIxMDUxODJhMzBjYSJ9 --- .../bigtable_admin_v2/test_bigtable_instance_admin.py | 8 +++++++- .../gapic/bigtable_admin_v2/test_bigtable_table_admin.py | 8 +++++++- tests/unit/gapic/bigtable_v2/test_bigtable.py | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py index df770db6b..4e7fcf2a7 100644 --- a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py +++ b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py @@ -14,7 +14,13 @@ # limitations under the License. # import os -import mock + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock +except ImportError: + import mock import grpc from grpc.experimental import aio diff --git a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py index 2e89585c7..ff766dcd1 100644 --- a/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py +++ b/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py @@ -14,7 +14,13 @@ # limitations under the License. # import os -import mock + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock +except ImportError: + import mock import grpc from grpc.experimental import aio diff --git a/tests/unit/gapic/bigtable_v2/test_bigtable.py b/tests/unit/gapic/bigtable_v2/test_bigtable.py index 5745b9aeb..3ca5041c2 100644 --- a/tests/unit/gapic/bigtable_v2/test_bigtable.py +++ b/tests/unit/gapic/bigtable_v2/test_bigtable.py @@ -14,7 +14,13 @@ # limitations under the License. # import os -import mock + +# try/except added for compatibility with python < 3.8 +try: + from unittest import mock + from unittest.mock import AsyncMock +except ImportError: + import mock import grpc from grpc.experimental import aio From 06f315a52f68550bd2617b0eb299aad4330ce690 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 30 May 2022 10:52:50 -0700 Subject: [PATCH 15/15] chore(main): release 2.10.0 (#591) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 12 ++++++++++++ setup.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45f9f109b..1bb7c69c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://pypi.org/project/google-cloud-bigtable/#history +## [2.10.0](https://github.com/googleapis/python-bigtable/compare/v2.9.0...v2.10.0) (2022-05-30) + + +### Features + +* refreshes Bigtable Admin API(s) protos ([#589](https://github.com/googleapis/python-bigtable/issues/589)) ([b508e33](https://github.com/googleapis/python-bigtable/commit/b508e3321937850d65242283e82f5413feb6081a)) + + +### Documentation + +* Add EncryptionInfo documentation ([#588](https://github.com/googleapis/python-bigtable/issues/588)) ([bedbf1b](https://github.com/googleapis/python-bigtable/commit/bedbf1b1bb304ff45f31ad20004ff96041ce716c)) + ## [2.9.0](https://github.com/googleapis/python-bigtable/compare/v2.8.1...v2.9.0) (2022-04-14) diff --git a/setup.py b/setup.py index cd65af765..2742ecc78 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ name = "google-cloud-bigtable" description = "Google Cloud Bigtable API client library" -version = "2.9.0" +version = "2.10.0" # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta'