From 6a19a7df6c9e75b46e12def9fb7b72bc8d26a39c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 8 Oct 2021 23:18:11 +0000 Subject: [PATCH] chore(python): Add kokoro configs for python 3.10 samples testing (#85) --- .../.github/.OwlBot.lock.yaml | 2 +- .../.kokoro/samples/python3.10/common.cfg | 40 +++++++++++++++++++ .../.kokoro/samples/python3.10/continuous.cfg | 6 +++ .../samples/python3.10/periodic-head.cfg | 11 +++++ .../.kokoro/samples/python3.10/periodic.cfg | 6 +++ .../.kokoro/samples/python3.10/presubmit.cfg | 6 +++ .../CONTRIBUTING.rst | 6 ++- .../noxfile.py | 2 +- .../testing/constraints-3.10.txt | 0 .../testing/constraints-3.11.txt | 0 10 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/common.cfg create mode 100644 packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/continuous.cfg create mode 100644 packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/periodic-head.cfg create mode 100644 packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/periodic.cfg create mode 100644 packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/presubmit.cfg create mode 100644 packages/google-cloud-binary-authorization/testing/constraints-3.10.txt create mode 100644 packages/google-cloud-binary-authorization/testing/constraints-3.11.txt diff --git a/packages/google-cloud-binary-authorization/.github/.OwlBot.lock.yaml b/packages/google-cloud-binary-authorization/.github/.OwlBot.lock.yaml index ee94722ab57b..7d98291cc35f 100644 --- a/packages/google-cloud-binary-authorization/.github/.OwlBot.lock.yaml +++ b/packages/google-cloud-binary-authorization/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:6e7328583be8edd3ba8f35311c76a1ecbc823010279ccb6ab46b7a76e25eafcc + digest: sha256:58f73ba196b5414782605236dd0712a73541b44ff2ff4d3a36ec41092dd6fa5b diff --git a/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/common.cfg b/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/common.cfg new file mode 100644 index 000000000000..1eb6733b7c5a --- /dev/null +++ b/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/common.cfg @@ -0,0 +1,40 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "py-3.10" +} + +# Declare build specific Cloud project. +env_vars: { + key: "BUILD_SPECIFIC_GCLOUD_PROJECT" + value: "python-docs-samples-tests-310" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-binary-authorization/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-binary-authorization/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/continuous.cfg b/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/continuous.cfg new file mode 100644 index 000000000000..a1c8d9759c88 --- /dev/null +++ b/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/continuous.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/periodic-head.cfg b/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/periodic-head.cfg new file mode 100644 index 000000000000..0b0f4babe3cd --- /dev/null +++ b/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/periodic-head.cfg @@ -0,0 +1,11 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-binary-authorization/.kokoro/test-samples-against-head.sh" +} diff --git a/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/periodic.cfg b/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/periodic.cfg new file mode 100644 index 000000000000..71cd1e597e38 --- /dev/null +++ b/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/periodic.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "False" +} diff --git a/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/presubmit.cfg b/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/presubmit.cfg new file mode 100644 index 000000000000..a1c8d9759c88 --- /dev/null +++ b/packages/google-cloud-binary-authorization/.kokoro/samples/python3.10/presubmit.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/packages/google-cloud-binary-authorization/CONTRIBUTING.rst b/packages/google-cloud-binary-authorization/CONTRIBUTING.rst index 33e1d4cdb3fb..5ca20bceb40e 100644 --- a/packages/google-cloud-binary-authorization/CONTRIBUTING.rst +++ b/packages/google-cloud-binary-authorization/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: - 3.6, 3.7, 3.8 and 3.9 on both UNIX and Windows. + 3.6, 3.7, 3.8, 3.9 and 3.10 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -72,7 +72,7 @@ We use `nox `__ to instrument our tests. - To run a single unit test:: - $ nox -s unit-3.9 -- -k + $ nox -s unit-3.10 -- -k .. note:: @@ -225,11 +225,13 @@ We support: - `Python 3.7`_ - `Python 3.8`_ - `Python 3.9`_ +- `Python 3.10`_ .. _Python 3.6: https://docs.python.org/3.6/ .. _Python 3.7: https://docs.python.org/3.7/ .. _Python 3.8: https://docs.python.org/3.8/ .. _Python 3.9: https://docs.python.org/3.9/ +.. _Python 3.10: https://docs.python.org/3.10/ Supported versions can be found in our ``noxfile.py`` `config`_. diff --git a/packages/google-cloud-binary-authorization/noxfile.py b/packages/google-cloud-binary-authorization/noxfile.py index 2bf3ffd7d29d..672b28d61f3e 100644 --- a/packages/google-cloud-binary-authorization/noxfile.py +++ b/packages/google-cloud-binary-authorization/noxfile.py @@ -29,7 +29,7 @@ DEFAULT_PYTHON_VERSION = "3.8" SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"] -UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] +UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() diff --git a/packages/google-cloud-binary-authorization/testing/constraints-3.10.txt b/packages/google-cloud-binary-authorization/testing/constraints-3.10.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/packages/google-cloud-binary-authorization/testing/constraints-3.11.txt b/packages/google-cloud-binary-authorization/testing/constraints-3.11.txt new file mode 100644 index 000000000000..e69de29bb2d1