From 6bbe99f04005b7bd119023941b9a9d6788c04111 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:09:53 -0700 Subject: [PATCH] fix: [google-cloud-container] Deprecate "EXPERIMENTAL" option for Gateway API (this value has never been supported) (#12856) BEGIN_PUBLIC fix: Deprecate "EXPERIMENTAL" option for Gateway API (this value has never been supported) END_PUBLIC - [ ] Regenerate this pull request now. PiperOrigin-RevId: 648792772 Source-Link: https://github.com/googleapis/googleapis/commit/fa77a9fd140f993668d8490baac366cd72ff621a Source-Link: https://github.com/googleapis/googleapis-gen/commit/c3faf93148a4df73b578e59a649200749723463b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiYzNmYWY5MzE0OGE0ZGY3M2I1NzhlNTlhNjQ5MjAwNzQ5NzIzNDYzYiJ9 --------- Co-authored-by: Owl Bot Co-authored-by: ohmayr --- packages/google-cloud-container/README.rst | 2 +- .../google-cloud-container/docs/index.rst | 5 ++ .../docs/summary_overview.md | 22 +++++++++ .../google/cloud/container/gapic_version.py | 2 +- .../cloud/container_v1/gapic_version.py | 2 +- .../cloud/container_v1beta1/gapic_version.py | 2 +- .../types/cluster_service.py | 4 +- packages/google-cloud-container/noxfile.py | 46 ++++++++++++++----- .../snippet_metadata_google.container.v1.json | 2 +- ...pet_metadata_google.container.v1beta1.json | 2 +- 10 files changed, 70 insertions(+), 19 deletions(-) create mode 100644 packages/google-cloud-container/docs/summary_overview.md diff --git a/packages/google-cloud-container/README.rst b/packages/google-cloud-container/README.rst index 1b9f644ebdfc..5ff96efd9936 100644 --- a/packages/google-cloud-container/README.rst +++ b/packages/google-cloud-container/README.rst @@ -15,7 +15,7 @@ Python Client for Kubernetes Engine .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-container.svg :target: https://pypi.org/project/google-cloud-container/ .. _Kubernetes Engine: https://cloud.google.com/kubernetes-engine/ -.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/container/latest +.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/container/latest/summary_overview .. _Product Documentation: https://cloud.google.com/kubernetes-engine/ Quick Start diff --git a/packages/google-cloud-container/docs/index.rst b/packages/google-cloud-container/docs/index.rst index 54ee421ba20c..3677cf407230 100644 --- a/packages/google-cloud-container/docs/index.rst +++ b/packages/google-cloud-container/docs/index.rst @@ -32,3 +32,8 @@ For a list of all ``google-cloud-container`` releases: :maxdepth: 2 CHANGELOG + +.. toctree:: + :hidden: + + summary_overview.md diff --git a/packages/google-cloud-container/docs/summary_overview.md b/packages/google-cloud-container/docs/summary_overview.md new file mode 100644 index 000000000000..6ccdbac146a6 --- /dev/null +++ b/packages/google-cloud-container/docs/summary_overview.md @@ -0,0 +1,22 @@ +[ +This is a templated file. Adding content to this file may result in it being +reverted. Instead, if you want to place additional content, create an +"overview_content.md" file in `docs/` directory. The Sphinx tool will +pick up on the content and merge the content. +]: # + +# Kubernetes Engine API + +Overview of the APIs available for Kubernetes Engine API. + +## All entries + +Classes, methods and properties & attributes for +Kubernetes Engine API. + +[classes](https://cloud.google.com/python/docs/reference/container/latest/summary_class.html) + +[methods](https://cloud.google.com/python/docs/reference/container/latest/summary_method.html) + +[properties and +attributes](https://cloud.google.com/python/docs/reference/container/latest/summary_property.html) diff --git a/packages/google-cloud-container/google/cloud/container/gapic_version.py b/packages/google-cloud-container/google/cloud/container/gapic_version.py index 4411a7dddf3d..558c8aab67c5 100644 --- a/packages/google-cloud-container/google/cloud/container/gapic_version.py +++ b/packages/google-cloud-container/google/cloud/container/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.47.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-container/google/cloud/container_v1/gapic_version.py b/packages/google-cloud-container/google/cloud/container_v1/gapic_version.py index 4411a7dddf3d..558c8aab67c5 100644 --- a/packages/google-cloud-container/google/cloud/container_v1/gapic_version.py +++ b/packages/google-cloud-container/google/cloud/container_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.47.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-container/google/cloud/container_v1beta1/gapic_version.py b/packages/google-cloud-container/google/cloud/container_v1beta1/gapic_version.py index 4411a7dddf3d..558c8aab67c5 100644 --- a/packages/google-cloud-container/google/cloud/container_v1beta1/gapic_version.py +++ b/packages/google-cloud-container/google/cloud/container_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.47.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-container/google/cloud/container_v1beta1/types/cluster_service.py b/packages/google-cloud-container/google/cloud/container_v1beta1/types/cluster_service.py index 4339c41e2b9f..4f644eda78fb 100644 --- a/packages/google-cloud-container/google/cloud/container_v1beta1/types/cluster_service.py +++ b/packages/google-cloud-container/google/cloud/container_v1beta1/types/cluster_service.py @@ -9075,8 +9075,8 @@ class Channel(proto.Enum): CHANNEL_DISABLED (1): Gateway API support is disabled CHANNEL_EXPERIMENTAL (3): - Gateway API support is enabled, experimental - CRDs are installed + Deprecated: use CHANNEL_STANDARD instead. Gateway API + support is enabled, experimental CRDs are installed CHANNEL_STANDARD (4): Gateway API support is enabled, standard CRDs are installed diff --git a/packages/google-cloud-container/noxfile.py b/packages/google-cloud-container/noxfile.py index 1e6cd48d0529..67b7265f7586 100644 --- a/packages/google-cloud-container/noxfile.py +++ b/packages/google-cloud-container/noxfile.py @@ -160,14 +160,28 @@ def install_unittest_dependencies(session, *constraints): session.install("-e", ".", *constraints) -def default(session): +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) +@nox.parametrize( + "protobuf_implementation", + ["python", "upb", "cpp"], +) +def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. + if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12"): + session.skip("cpp implementation is not supported in python 3.11+") + constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) install_unittest_dependencies(session, "-c", constraints_path) + # TODO(https://github.com/googleapis/synthtool/issues/1976): + # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped. + # The 'cpp' implementation requires Protobuf<4. + if protobuf_implementation == "cpp": + session.install("protobuf<4") + # Run py.test against the unit tests. session.run( "py.test", @@ -181,15 +195,12 @@ def default(session): "--cov-fail-under=0", os.path.join("tests", "unit"), *session.posargs, + env={ + "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, + }, ) -@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) -def unit(session): - """Run the unit test suite.""" - default(session) - - def install_systemtest_dependencies(session, *constraints): # Use pre-release gRPC for system tests. # Exclude version 1.52.0rc1 which has a known issue. @@ -358,9 +369,16 @@ def docfx(session): @nox.session(python="3.12") -def prerelease_deps(session): +@nox.parametrize( + "protobuf_implementation", + ["python", "upb", "cpp"], +) +def prerelease_deps(session, protobuf_implementation): """Run all tests with prerelease versions of dependencies installed.""" + if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12"): + session.skip("cpp implementation is not supported in python 3.11+") + # Install all dependencies session.install("-e", ".[all, tests, tracing]") unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES @@ -397,9 +415,9 @@ def prerelease_deps(session): "protobuf", # dependency of grpc "six", + "grpc-google-iam-v1", "googleapis-common-protos", - # Exclude version 1.52.0rc1 which has a known issue. See https://github.com/grpc/grpc/issues/32163 - "grpcio!=1.52.0rc1", + "grpcio", "grpcio-status", "google-api-core", "google-auth", @@ -425,4 +443,10 @@ def prerelease_deps(session): session.run("python", "-c", "import grpc; print(grpc.__version__)") session.run("python", "-c", "import google.auth; print(google.auth.__version__)") - session.run("py.test", "tests/unit") + session.run( + "py.test", + "tests/unit", + env={ + "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, + }, + ) diff --git a/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1.json b/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1.json index 1764b6d883e6..2a343a6434fa 100644 --- a/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1.json +++ b/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "2.47.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1beta1.json b/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1beta1.json index 0944e4c0d47b..afdb562b267e 100644 --- a/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1beta1.json +++ b/packages/google-cloud-container/samples/generated_samples/snippet_metadata_google.container.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "2.47.0" + "version": "0.1.0" }, "snippets": [ {