This library has moved to https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-container
License: Apache License 2.0
python-container's Introduction
NOTE
This github repository is archived. The repository contents and history have moved togoogle-cloud-python.
Python Client for Kubernetes Engine API
Kubernetes Engine API: The Google Kubernetes Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.
Install this library in a virtual environment using venv. venv is a tool that creates isolated Python environments. These isolated environments can have separate versions of Python packages, which allows you to isolate one project's dependencies from the dependencies of other projects.
With venv, it's possible to install this library without needing system install permissions, and without clashing with the installed system dependencies.
Code samples and snippets
Code samples and snippets live in the samples/ folder.
Supported Python Versions
Our client libraries are compatible with all current active and maintenance versions of Python.
Python >= 3.7
Unsupported Python Versions
Python <= 3.6
If you are using an end-of-life version of Python, we recommend that you update as soon as possible to an actively supported version.
Query GKE cluster with GKE_METADATA enabled and specify the region and project_id
from google.cloud.container_v1beta1.services.cluster_manager import ClusterManagerClient
from google.cloud.container_v1beta1.types.cluster_service import WorkloadMetadataConfig
client = ClusterManagerClient()
request = {"parent": f"projects/{project_id}/locations/{region}"}
clusters = client.list_clusters(request)
for cluster in clusters:
for node in cluster.node_pools:
mode = WorkloadMetadataConfig(node.config.workload_metadata_config)
print(mode)
the mode value returned is 3 which is not present in the enum options in from google.cloud.container_v1beta1.types.cluster_service import WorkloadMetadataConfig
The documentation within the client libraries does not provide sufficient detail on these enum values.
When I try to update my kubernetes cluster to no longer use the insecure readonly port, I get an AttributeError. The control plane and node versions are both 1.27.2-gke.2100.
Environment details
OS type and version: macOS 13.2.1 (22D68) (M1 chip)
Python version: Python 3.9.12
pip version: pip 23.2
google-cloud-container version: Google Cloud SDK 439.0.0
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 987, in Execute
resources = calliope_command.Run(cli=self, args=args)
File "/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 807, in Run
resources = command_instance.Run(args)
File "/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/container/clusters/update.py", line 747, in Run
op_ref = adapter.UpdateCluster(cluster_ref, options)
File "/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/container/api_adapter.py", line 3514, in UpdateCluster
update = self.UpdateClusterCommon(cluster_ref, options)
File "/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/container/api_adapter.py", line 3475, in UpdateClusterCommon
update = self.messages.ClusterUpdate(
File "/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/third_party/apitools/base/protorpclite/messages.py", line 791, in __init__
setattr(self, name, value)
File "/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/third_party/apitools/base/protorpclite/messages.py", line 975, in __setattr__
raise AttributeError("May not assign arbitrary value %s "
AttributeError: May not assign arbitrary value desiredNodeKubeletConfig to message ClusterUpdate
Is there an example to use Python container_v1 api to update cluster to use stable release_channel. Currently we are not using release channel. I am trying to explore GCP GKE Python SDK and need help with this.
I see update_cluster method needs request arg which is of type container_v1.types.cluster_service.UpdateClusterRequest which further need update of type container_v1.types.ClusterUpdate
I have enabled Basic Authentication in a given cluster, but in list_cluster, both of the username and password fields are missing. Although I can see If I use the gcloud cli.
Please let me know how can I view the Basic Authentication credentials using google-cloud-container library.
from google.oauth2 import service_account
from google.cloud import container_v1
credentials = service_account.Credentials.from_service_account_file(
"/tmp/.key",
scopes=["https://www.googleapis.com/auth/cloud-platform"],
)
computeAPI = container_v1.ClusterManagerClient(credentials=credentials)
clusters_list = get_clusters_list(containerAPI, event['projectId'])
for cluster in clusters_list:
print("master_auth: ", cluster.master_auth)
print("password: ", cluster.master_auth.password)
print("username: ", cluster.master_auth.username)
def get_clusters_list(containerAPI, project):
clusters_list = []
request = containerAPI.list_clusters(parent="projects/{}/locations/-".format(project))
if request != None and hasattr(request, 'clusters'):
clusters_list.extend(request.clusters)
return clusters_list
u create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 26523a96 chore: delete gapic config for resourcemanager/v2
2020-06-20 07:45:50,052 autosynth [DEBUG] > Running: git checkout 52638600f387deb98efb5f9c85fec39e82aa9052
Note: checking out '52638600f387deb98efb5f9c85fec39e82aa9052'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 5263860 build(java): set GOOGLE_CLOUD_PROJECT env for samples/integration tests (#484)
2020-06-20 07:45:50,070 autosynth [DEBUG] > Running: git branch -f autosynth-self-2
2020-06-20 07:45:50,075 autosynth [DEBUG] > Running: git checkout autosynth-self-2
Switched to branch 'autosynth-self-2'
2020-06-20 07:45:50,080 autosynth [INFO] > Running synthtool
2020-06-20 07:45:50,080 autosynth [INFO] > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']
2020-06-20 07:45:50,080 autosynth [DEBUG] > log_file_path: /tmpfs/src/github/synthtool/logs/googleapis/python-container/self/2/sponge_log.log
2020-06-20 07:45:50,084 autosynth [DEBUG] > Running: /tmpfs/src/github/synthtool/env/bin/python3 -m synthtool --metadata synth.metadata synth.py --
2020-06-20 07:45:50,313 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/python-container/synth.py.
On branch autosynth-self-2
nothing to commit, working tree clean
2020-06-20 07:45:50,458 synthtool [DEBUG] > Ensuring dependencies.
2020-06-20 07:45:50,472 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/synthtool
2020-06-20 07:45:50,478 synthtool [DEBUG] > Cloning googleapis.
2020-06-20 07:45:50,478 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/googleapis
2020-06-20 07:45:50,483 synthtool [DEBUG] > Generating code for: //google/container/v1beta1:container-v1beta1-py.
2020-06-20 07:45:54,323 synthtool [ERROR] > Failed executing bazel --max_idle_secs=60 build //google/container/v1beta1:container-v1beta1-py:
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
INFO: SHA256 (https://github.com/googleapis/gapic-generator/archive/4cb5d58f258afdb8abc0b99706370b4a59252b22.zip) = 3cb59685c8a4ae3db1dec60b286f22d8d3aa3d3b36bb08bf003b5e088fac83cb
Loading: 0 packages loaded
DEBUG: Rule 'com_google_api_codegen' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "3cb59685c8a4ae3db1dec60b286f22d8d3aa3d3b36bb08bf003b5e088fac83cb"
DEBUG: Call stack for the definition of repository 'com_google_api_codegen' which is a http_archive (rule definition at /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
- <builtin>
- /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:62:1
INFO: SHA256 (https://github.com/googleapis/protoc-java-resource-names-plugin/archive/5bd90a1f67c1c128291702cc320d667060f40f95.zip) = c3c0661b6c30fce5c63b1d5f473b1c6c4d59e19853ce3b9e8f5a447f953af906
DEBUG: Rule 'com_google_protoc_java_resource_names_plugin' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "c3c0661b6c30fce5c63b1d5f473b1c6c4d59e19853ce3b9e8f5a447f953af906"
DEBUG: Call stack for the definition of repository 'com_google_protoc_java_resource_names_plugin' which is a http_archive (rule definition at /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
- <builtin>
- /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:155:1
Loading: 0 packages loaded
INFO: SHA256 (https://github.com/googleapis/gapic-generator-go/archive/v0.13.2.tar.gz) = ab7a2ffd74e6a6dac6da38027d4acadb84d0075c055289e3335d86a46f9f3b22
DEBUG: Rule 'com_googleapis_gapic_generator_go' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "ab7a2ffd74e6a6dac6da38027d4acadb84d0075c055289e3335d86a46f9f3b22"
DEBUG: Call stack for the definition of repository 'com_googleapis_gapic_generator_go' which is a http_archive (rule definition at /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
- <builtin>
- /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:209:1
Analyzing: target //google/container/v1beta1:container-v1beta1-py (1 packages loaded, 0 targets configured)
ERROR: While resolving toolchains for target @pypi_black//:black: invalid registered toolchain '@gapic_generator_python//:pyenv3_toolchain': no such package '@gapic_generator_python//': The repository '@gapic_generator_python' could not be resolved
ERROR: Analysis of target '//google/container/v1beta1:container-v1beta1-py' failed; build aborted: invalid registered toolchain '@gapic_generator_python//:pyenv3_toolchain': no such package '@gapic_generator_python//': The repository '@gapic_generator_python' could not be resolved
INFO: Elapsed time: 3.823s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (18 packages loaded, 18 targets configured)
FAILED: Build did NOT complete successfully (18 packages loaded, 18 targets configured)
2020-06-20 07:45:54,325 synthtool [DEBUG] > Wrote metadata to synth.metadata.
Traceback (most recent call last):
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
main()
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
spec.loader.exec_module(synth_module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/kbuilder/.cache/synthtool/python-container/synth.py", line 31, in <module>
include_protos=True,
File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 46, in py_library
return self._generate_code(service, version, "python", **kwargs)
File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 180, in _generate_code
shell.run(bazel_run_args)
File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
raise exc
File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
encoding="utf-8",
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=60', 'build', '//google/container/v1beta1:container-v1beta1-py']' returned non-zero exit status 1.
2020-06-20 07:45:54,402 autosynth [ERROR] > Synthesis failed
2020-06-20 07:45:54,402 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 841904c chore: release 1.0.1 (#28)
2020-06-20 07:45:54,410 autosynth [DEBUG] > Running: git checkout autosynth-self
Switched to branch 'autosynth-self'
2020-06-20 07:45:54,419 autosynth [ERROR] > Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.
2020-06-20 07:45:54,627 autosynth [INFO] > PR already exists: https://github.com/googleapis/python-container/pull/22
2020-06-20 07:45:54,627 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Removing google/__pycache__/
Traceback (most recent call last):
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 649, in <module>
main()
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 506, in main
return _inner_main(temp_dir)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 629, in _inner_main
commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 367, in synthesize_loop
synthesize_inner_loop(fork, synthesizer)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
synthesizer, len(toolbox.versions) - 1
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
synthesizer.synthesize(synth_log_path, self.environ)
File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
synth_proc.check_returncode() # Raise an exception.
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.
Google internal developers can see the full log here.
zone (str): Deprecated. The name of the Google Compute Engine zone <https://cloud.google.com/compute/docs/zones#available>__ in
which the cluster resides. This field has been deprecated and replaced
by the parent field.
Trying using parent but zone is missing ...
But how can I get all node pool from regional cluster ? Is it a bug ?
TO me the examples here are just useless autogenerated copy pastes of the api docs. They really don't show me anything on what I can do with this api, and I really can't find what I need. I have some kubernetes experience, and I am looking on how I can use this library to create nodes/deployments, start jobs, etc, that you would normally do through yaml files, so python developers can start jobs from python code. This repository really just looks like a list of function names, with 1 or 2 arguments in there, which is what already can be found online. Instead, I would like to have way fewer examples like:
# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.set_labels), "__call__") as call:
# Designate an appropriate return value for the call.
call.return_value = cluster_service.Operation()
# Call the method with a truthy value for each flattened field,
# using the keyword arguments to the method.
client.set_labels(
project_id="project_id_value",
zone="zone_value",
cluster_id="cluster_id_value",
resource_labels={"key_value": "value_value"},
label_fingerprint="label_fingerprint_value",
)
# Establish that the underlying call was made with the expected
# request object values.
assert len(call.mock_calls) == 1
_, args, _ = call.mock_calls[0]
arg = args[0].project_id
mock_val = "project_id_value"
assert arg == mock_val
arg = args[0].zone
mock_val = "zone_value"
assert arg == mock_val
arg = args[0].cluster_id
mock_val = "cluster_id_value"
assert arg == mock_val
arg = args[0].resource_labels
mock_val = {"key_value": "value_value"}
assert arg == mock_val
E AssertionError: assert {'key_value': 'value_value'} == {'key_value': 'value_value'}
E Use -v to get more diff
[Spanner's Python Library, for example, returns google.api_core.operation.Operation in this case]
I'm struggling to connect this with (presumably?) Long-Running Operations documented in Core.
I'm unable to new an OperationsClient. The Example suggests operations_v1.OperationsClient() but this errors with TypeError: __init__() takes at least 2 arguments (1 given).
It's unclear what channel (grpc.Channel) I should provide.
Is this the correct approach? Having triggered the cluster creation, I'd like to track its progress to completion.
When developing software using GKE API in IDE's like PyCharm, the editor won't provide any name hints as the Types for Google Container Engine API Client are generated at runtime:
It'd be nice for these types to be pre-generated for IDE static analyzer to work, which will in turn enable hints and varios checks that greatly simplify the development process.
I need a Python client library method equivalent to gcloud container clusters get-credentials so I can query for Kubernetes Job status from a Google Cloud Function in Python.
As far as I can tell, get-credentials makes a GET request for a cluster and then applies some magic to turn the response into a kubeconfig file. I think I can make the same GET request in Python with this method, but I don't see any way to turn the response into a kubeconfig file.
Please let me know if I've overlooked something in the Python client library.
I'm deleting them manually for now, but the samples maintainers recommend adding/modifying the logic found in this part of the fixture to use try/finally as is recommended in the authoring guide
Traceback (most recent call last):
File "/usr/local/google/home/user/IdeaProjects/Go_tmp_tests/mian.py", line 45, in <module>
main()
File "/usr/local/google/home/user/IdeaProjects/Go_tmp_tests/mian.py", line 41, in main
kube.create_cluster(cluster_data)
File "/usr/local/google/home/user/IdeaProjects/Go_tmp_tests/mian.py", line 17, in create_cluster
response = self.client.create_cluster(self.project_id, self.zone, cluster=cluster)
File "/usr/local/google/home/niuser/.local/lib/python3.7/site-packages/google/cloud/container_v1beta1/gapic/cluster_manager_client.py", line 455, in create_cluster
project_id=project_id, zone=zone, cluster=cluster, parent=parent
ValueError: Protocol message Cluster has no "workload_identity_config" field.
Making sure to follow these steps will guarantee the quickest resolution possible.
# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.set_labels), "__call__") as call:
# Designate an appropriate return value for the call.
call.return_value = cluster_service.Operation()
# Call the method with a truthy value for each flattened field,
# using the keyword arguments to the method.
client.set_labels(
project_id="project_id_value",
zone="zone_value",
cluster_id="cluster_id_value",
resource_labels={"key_value": "value_value"},
label_fingerprint="label_fingerprint_value",
)
# Establish that the underlying call was made with the expected
# request object values.
assert len(call.mock_calls) == 1
_, args, _ = call.mock_calls[0]
arg = args[0].project_id
mock_val = "project_id_value"
assert arg == mock_val
arg = args[0].zone
mock_val = "zone_value"
assert arg == mock_val
arg = args[0].cluster_id
mock_val = "cluster_id_value"
assert arg == mock_val
arg = args[0].resource_labels
mock_val = {"key_value": "value_value"}
assert arg == mock_val
E AssertionError: assert {'key_value': 'value_value'} == {'key_value': 'value_value'}
E Use -v to get more diff
# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.set_labels), "__call__") as call:
# Designate an appropriate return value for the call.
call.return_value = cluster_service.Operation()
call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(
cluster_service.Operation()
)
# Call the method with a truthy value for each flattened field,
# using the keyword arguments to the method.
response = await client.set_labels(
project_id="project_id_value",
zone="zone_value",
cluster_id="cluster_id_value",
resource_labels={"key_value": "value_value"},
label_fingerprint="label_fingerprint_value",
)
# Establish that the underlying call was made with the expected
# request object values.
assert len(call.mock_calls)
_, args, _ = call.mock_calls[0]
arg = args[0].project_id
mock_val = "project_id_value"
assert arg == mock_val
arg = args[0].zone
mock_val = "zone_value"
assert arg == mock_val
arg = args[0].cluster_id
mock_val = "cluster_id_value"
assert arg == mock_val
arg = args[0].resource_labels
mock_val = {"key_value": "value_value"}
assert arg == mock_val
E AssertionError: assert {'key_value': 'value_value'} == {'key_value': 'value_value'}
E Use -v to get more diff
Cloning into 'working_repo'...
Switched to branch 'autosynth'
Running synthtool
['/tmpfs/src/git/autosynth/env/bin/python3', '-m', 'synthtool', 'synth.py', '--']
synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py.
On branch autosynth
nothing to commit, working tree clean
HEAD detached at FETCH_HEAD
nothing to commit, working tree clean
synthtool > Ensuring dependencies.
synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b
Status: Image is up to date for googleapis/artman:latest
synthtool > Cloning googleapis.
synthtool > Running generator for google/container/artman_container_v1beta1.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/container-v1beta1.
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/container/v1beta1/cluster_service.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/container-v1beta1/google/cloud/container_v1beta1/proto/cluster_service.proto
synthtool > Placed proto files into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/container-v1beta1/google/cloud/container_v1beta1/proto.
synthtool > Running generator for google/container/artman_container_v1.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/container-v1.
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/container/v1/cluster_service.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/container-v1/google/cloud/container_v1/proto/cluster_service.proto
synthtool > Placed proto files into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/container-v1/google/cloud/container_v1/proto.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/container_v1beta1/proto/cluster_service_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/container_v1/proto/cluster_service_pb2.py.
synthtool > No replacements made in google/**/proto/cluster_service_pb2.py for pattern nodePool>\n, maybe replacement is not longer needed?
synthtool > No replacements made in google/**/proto/cluster_service_pb2.py for pattern (\s+)`__ instead, maybe replacement is not longer needed?
.coveragerc
.flake8
.github/CONTRIBUTING.md
.github/ISSUE_TEMPLATE/bug_report.md
.github/ISSUE_TEMPLATE/feature_request.md
.github/ISSUE_TEMPLATE/support_request.md
.github/PULL_REQUEST_TEMPLATE.md
.github/release-please.yml
.gitignore
.kokoro/build.sh
.kokoro/continuous/common.cfg
.kokoro/continuous/continuous.cfg
.kokoro/docs/common.cfg
.kokoro/docs/docs.cfg
.kokoro/presubmit/common.cfg
.kokoro/presubmit/presubmit.cfg
.kokoro/publish-docs.sh
.kokoro/release.sh
.kokoro/release/common.cfg
.kokoro/release/release.cfg
.kokoro/trampoline.sh
CODE_OF_CONDUCT.md
CONTRIBUTING.rst
LICENSE
MANIFEST.in
docs/_static/custom.css
docs/_templates/layout.html
docs/conf.py.j2
noxfile.py.j2
renovate.json
setup.cfg
Running session blacken
Creating virtual environment (virtualenv) using python3.6 in .nox/blacken
pip install black==19.3b0
Error: pip is not installed into the virtualenv, it is located at /tmpfs/src/git/autosynth/env/bin/pip. Pass external=True into run() to explicitly allow this.
Session blacken failed.
synthtool > Failed executing nox -s blacken:
None
synthtool > Wrote metadata to synth.metadata.
Traceback (most recent call last):
File "/home/kbuilder/.pyenv/versions/3.6.1/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/kbuilder/.pyenv/versions/3.6.1/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/synthtool/__main__.py", line 102, in <module>
main()
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/synthtool/__main__.py", line 94, in main
spec.loader.exec_module(synth_module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
File "/tmpfs/src/git/autosynth/working_repo/synth.py", line 67, in <module>
s.shell.run(["nox", "-s", "blacken"], hide_output=False)
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/synthtool/shell.py", line 39, in run
raise exc
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/synthtool/shell.py", line 33, in run
encoding="utf-8",
File "/home/kbuilder/.pyenv/versions/3.6.1/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['nox', '-s', 'blacken']' returned non-zero exit status 1.
Synthesis failed
Google internal developers can see the full log here.
It's been a week since the 2.0.0 release, but the documentation still points to the 1.0.1 release as latest. This has caused a few issues with dependencies as certain functions seem to be deprecated in the 2.0.0, and calls being changed however missing documentation means there's no way to figure out the changes required.
Package name: FIXME
Current release: alpha
Proposed release: GA
Instructions
Check the lists below, adding tests / documentation as required. Once all the "required" boxes are ticked, please create a release and close this issue.
Required
28 days elapsed since last beta release with new API surface
Server API is GA
Package API is stable, and we can commit to backward compatibility
All dependencies are GA
Optional
Most common / important scenarios have descriptive samples
Public manual methods have at least one usage sample each (excluding overloads)
Per-API README includes a full description of the API
Per-API README contains at least one โgetting startedโ sample using the most common API scenario
Manual code has been reviewed by API producer
Manual code has been reviewed by a DPE responsible for samples
'Client Libraries' page is added to the product documentation in 'APIs & Reference' section of the product's documentation on Cloud Site
I am trying to use the plugin google-cloud-container in AWS lambda, but I am having the following issue. cannot import name 'cygrpc' from 'grpc._cython' (/opt/python/grpc/_cython/__init__.py)
I have tried installing the grpcio explicitly and with some versions but still having the same issue.
tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132284:72: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
__pyx_type_7_cython_6cygrpc___pyx_scope_struct_55__schedule_rpc_coro.tp_print = 0;
^~~~~~~~
tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132290:65: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
__pyx_type_7_cython_6cygrpc___pyx_scope_struct_56__handle_rpc.tp_print = 0;
^~~~~~~~
tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132296:67: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
__pyx_type_7_cython_6cygrpc___pyx_scope_struct_57__request_call.tp_print = 0;
^~~~~~~~
tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132302:71: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
__pyx_type_7_cython_6cygrpc___pyx_scope_struct_58__server_main_loop.tp_print = 0;
^~~~~~~~
tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132308:59: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
__pyx_type_7_cython_6cygrpc___pyx_scope_struct_59_start.tp_print = 0;
^~~~~~~~
tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132314:74: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
__pyx_type_7_cython_6cygrpc___pyx_scope_struct_60__start_shutting_down.tp_print = 0;
^~~~~~~~
tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132320:62: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
__pyx_type_7_cython_6cygrpc___pyx_scope_struct_61_shutdown.tp_print = 0;
^~~~~~~~
tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:132326:74: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_print'; did you mean 'tp_dict'?
__pyx_type_7_cython_6cygrpc___pyx_scope_struct_62_wait_for_termination.tp_print = 0;
^~~~~~~~
tp_dict
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'PyObject* __Pyx_decode_c_bytes(const char*, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char*, const char*, PyObject* (*)(const char*, Py_ssize_t, const char*))':
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:136866:45: warning: 'PyObject* PyUnicode_FromUnicode(const Py_UNICODE*, Py_ssize_t)' is deprecated [-Wdeprecated-declarations]
return PyUnicode_FromUnicode(NULL, 0);
^
In file included from bazel-out/host/bin/external/local_config_python/_python3/_python3_include/unicodeobject.h:1026:0,
from bazel-out/host/bin/external/local_config_python/_python3/_python3_include/Python.h:97,
from bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:4:
bazel-out/host/bin/external/local_config_python/_python3/_python3_include/cpython/unicodeobject.h:551:42: note: declared here
Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
^~~~~~~~~~~~~~~~~~~~~
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'void __pyx_f_7_cython_6cygrpc__unified_socket_write(int)':
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:72692:3: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
(void)(write(__pyx_v_fd, ((char *)"1"), 1));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp: At global scope:
bazel-out/host/bin/external/com_github_grpc_grpc/src/python/grpcio/grpc/_cython/cygrpc.cpp:144607:1: warning: 'void __Pyx_PyAsyncGen_Fini()' defined but not used [-Wunused-function]
__Pyx_PyAsyncGen_Fini(void)
^~~~~~~~~~~~~~~~~~~~~
Target //google/container/v1beta1:container-v1beta1-py failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.218s, Critical Path: 3.96s
INFO: 9 processes: 9 linux-sandbox.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
main()
File "/tmpfs/src/github/synthtool/env/lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/tmpfs/src/github/synthtool/env/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/tmpfs/src/github/synthtool/env/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmpfs/src/github/synthtool/env/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
spec.loader.exec_module(synth_module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/root/.cache/synthtool/python-container/synth.py", line 27, in <module>
library = gapic.py_library(
File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 45, in py_library
return self._generate_code(service, version, "python", **kwargs)
File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 182, in _generate_code
shell.run(bazel_run_args)
File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
raise exc
File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 27, in run
return subprocess.run(
File "/usr/local/lib/python3.9/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=240', 'build', '//google/container/v1beta1:container-v1beta1-py']' returned non-zero exit status 1.
2020-12-05 03:04:58,920 autosynth [ERROR] > Synthesis failed
2020-12-05 03:04:58,921 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 17f0a29 feat: sync v1beta1 GKE API; deprecate SetLocations and use UpdateCluster; support for sysctls config in Linux nodes; support for node kubelet config controlling CPU manager policy, CFS quota; support for Customer Managed Encryption
2020-12-05 03:04:58,926 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-12-05 03:04:58,931 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 354, in <module>
main()
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 189, in main
return _inner_main(temp_dir)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 334, in _inner_main
commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 65, in synthesize_loop
has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 259, in synthesize_version_in_new_branch
synthesizer.synthesize(synth_log_path, self.environ)
File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
synth_proc.check_returncode() # Raise an exception.
File "/usr/local/lib/python3.9/subprocess.py", line 456, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.
Google internal developers can see the full log here.
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Please run down the following list and make sure you've tried the usual "quick fixes":
If you are still having issues, please be sure to include as much information as possible:
Environment details
OS type and version: Linux Mint 21.1 Vera
Python version: python --versionPython 3.10.12
pip version: pip --versionpip 23.1.2
google-cloud-container version: pip show google-cloud-container2.29.0
Steps to reproduce
Compare the instructions and code related to how the client expects the name field to be supplied, and the value of the name field supplied by different types:
Example:
The client seems to consistently expect name to be provided in the same format: client.get_cluster():
However, in the case of the client, the actual expectation for name is to provide the URL path of the self_link which is consistent across types that provide it:
fromgoogle.cloudimportcontainer_v1"""name (str): The name (project, location, cluster) of the cluster to retrieve. Specified in the format ``projects/*/locations/*/clusters/*``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this should not be set."""defgood() ->container_v1.Operation:
client=container_v1.ClusterManagerClient()
cluster=client.get_cluster(name="projects/MYPROJECT/region/us-central1/clusters/MYCLUSTER")
print(cluster.name)
print(cluster.self_link)
cluster_update=container_v1.ClusterUpdate()
cluster_name=cluster.self_link.removeprefix("https://container.googleapis.com/v1/")
cluster_update.desired_master_version="1.26.5-gke.2700"request=container_v1.UpdateClusterRequest(
name=cluster_name,
update=cluster_update,
)
response=client.update_cluster(request=request)
returnresponsedefbad() ->container_v1.Operation:
client=container_v1.ClusterManagerClient()
cluster=client.get_cluster(name="projects/MYPROJECT/region/us-central1/clusters/MYCLUSTER")
print(cluster.name)
print(cluster.self_link)
cluster_update=container_v1.ClusterUpdate()
cluster_update.desired_master_version="1.26.5-gke.2700"request=container_v1.UpdateClusterRequest(
name=cluster.name,
update=cluster_update,
)
response=client.update_cluster(request=request)
returnresponseif__name__=="__main__":
print(good())
print(bad())
Stack trace
google.api_core.exceptions.InvalidArgument: 400 Location "" does not exist. [request_id: "0x9afd14bb45b99ec6"]
Making sure to follow these steps will guarantee the quickest resolution possible.
Cloning into 'working_repo'...
Switched to branch 'autosynth'
Running synthtool
['/tmpfs/src/git/autosynth/env/bin/python3', '-m', 'synthtool', 'synth.py', '--']
synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py.
synthtool > Ensuring dependencies.
synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b
Status: Image is up to date for googleapis/artman:latest
synthtool > Cloning googleapis.
synthtool > Running generator for google/container/artman_container_v1beta1.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/container-v1beta1.
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/container/v1beta1/cluster_service.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/container-v1beta1/google/cloud/container_v1beta1/proto/cluster_service.proto
synthtool > Placed proto files into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/container-v1beta1/google/cloud/container_v1beta1/proto.
synthtool > Running generator for google/container/artman_container_v1.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/container-v1.
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/container/v1/cluster_service.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/container-v1/google/cloud/container_v1/proto/cluster_service.proto
synthtool > Placed proto files into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/container-v1/google/cloud/container_v1/proto.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/container_v1beta1/proto/cluster_service_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/container_v1/proto/cluster_service_pb2.py.
synthtool > No replacements made in google/**/proto/cluster_service_pb2.py for pattern nodePool>\n, maybe replacement is not longer needed?
synthtool > No replacements made in google/**/proto/cluster_service_pb2.py for pattern (\s+)`__ instead, maybe replacement is not longer needed?
.coveragerc
.flake8
.github/CONTRIBUTING.md
.github/ISSUE_TEMPLATE/bug_report.md
.github/ISSUE_TEMPLATE/feature_request.md
.github/ISSUE_TEMPLATE/support_request.md
.github/PULL_REQUEST_TEMPLATE.md
.github/release-please.yml
.gitignore
.kokoro/build.sh
.kokoro/continuous/common.cfg
.kokoro/continuous/continuous.cfg
.kokoro/docs/common.cfg
.kokoro/docs/docs.cfg
.kokoro/presubmit/common.cfg
.kokoro/presubmit/presubmit.cfg
.kokoro/publish-docs.sh
.kokoro/release.sh
.kokoro/release/common.cfg
.kokoro/release/release.cfg
.kokoro/trampoline.sh
CODE_OF_CONDUCT.md
CONTRIBUTING.rst
LICENSE
MANIFEST.in
docs/_static/custom.css
docs/_templates/layout.html
docs/conf.py.j2
noxfile.py.j2
renovate.json
setup.cfg
Running session blacken
Creating virtual environment (virtualenv) using python3.6 in .nox/blacken
pip install black==19.3b0
Error: pip is not installed into the virtualenv, it is located at /tmpfs/src/git/autosynth/env/bin/pip. Pass external=True into run() to explicitly allow this.
Session blacken failed.
synthtool > Failed executing nox -s blacken:
None
synthtool > Wrote metadata to synth.metadata.
Traceback (most recent call last):
File "/home/kbuilder/.pyenv/versions/3.6.1/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/kbuilder/.pyenv/versions/3.6.1/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/synthtool/__main__.py", line 99, in <module>
main()
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/synthtool/__main__.py", line 91, in main
spec.loader.exec_module(synth_module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
File "/tmpfs/src/git/autosynth/working_repo/synth.py", line 67, in <module>
s.shell.run(["nox", "-s", "blacken"], hide_output=False)
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/synthtool/shell.py", line 39, in run
raise exc
File "/tmpfs/src/git/autosynth/env/lib/python3.6/site-packages/synthtool/shell.py", line 33, in run
encoding="utf-8",
File "/home/kbuilder/.pyenv/versions/3.6.1/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['nox', '-s', 'blacken']' returned non-zero exit status 1.
Synthesis failed
Google internal developers can see the full log here.
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
When we installed the google-ads library, trying importing the cygrpc library, but getting the error as above.
I am using python 3.8.
roto -Igoogle/api/resource.proto=google/api/resource.proto -Igoogle/rpc/code.proto=google/rpc/code.proto -Igoogle/rpc/status.proto=google/rpc/status.proto -Igoogle/protobuf/any.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/any_proto/google/protobuf/any.proto -Igoogle/protobuf/empty.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/empty_proto/google/protobuf/empty.proto -Igoogle/protobuf/timestamp.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/timestamp_proto/google/protobuf/timestamp.proto -Igoogle/protobuf/wrappers.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/wrappers_proto/google/protobuf/wrappers.proto google/container/v1beta1/cluster_service.proto`
ERROR: /home/kbuilder/.cache/synthtool/googleapis/google/container/v1beta1/BUILD.bazel:153:1: //google/container/v1beta1:container_py_gapic: `bazel-out/host/bin/external/com_google_protobuf/protoc --experimental_allow_proto3_optional --plugin=protoc-gen-python_gapic=bazel-out/host/bin/external/gapic_generator_python/gapic_plugin --python_gapic_out=retry-config=google/container/v1beta1/container_grpc_service_config.json:bazel-out/k8-fastbuild/bin/google/container/v1beta1/container_py_gapic.srcjar.zip -Igoogle/container/v1beta1/cluster_service.proto=google/container/v1beta1/cluster_service.proto -Igoogle/api/annotations.proto=google/api/annotations.proto -Igoogle/api/http.proto=google/api/http.proto -Igoogle/protobuf/descriptor.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/descriptor_proto/google/protobuf/descriptor.proto -Igoogle/api/client.proto=google/api/client.proto -Igoogle/api/field_behavior.proto=google/api/field_behavior.proto -Igoogle/api/resource.proto=google/api/resource.proto -Igoogle/rpc/code.proto=google/rpc/code.proto -Igoogle/rpc/status.proto=google/rpc/status.proto -Igoogle/protobuf/any.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/any_proto/google/protobuf/any.proto -Igoogle/protobuf/empty.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/empty_proto/google/protobuf/empty.proto -Igoogle/protobuf/timestamp.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/timestamp_proto/google/protobuf/timestamp.proto -Igoogle/protobuf/wrappers.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/wrappers_proto/google/protobuf/wrappers.proto google/container/v1beta1/cluster_service.proto` failed (Exit 1) protoc failed: error executing command bazel-out/host/bin/external/com_google_protobuf/protoc --experimental_allow_proto3_optional '--plugin=protoc-gen-python_gapic=bazel-out/host/bin/external/gapic_generator_python/gapic_plugin' ... (remaining 15 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
Traceback (most recent call last):
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/cli/generate_with_pandoc.py", line 3, in <module>
from gapic.cli import generate
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/cli/generate.py", line 23, in <module>
from gapic import generator
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/generator/__init__.py", line 21, in <module>
from .generator import Generator
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/generator/generator.py", line 24, in <module>
from gapic.samplegen import manifest, samplegen
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/samplegen/__init__.py", line 15, in <module>
from gapic.samplegen import samplegen
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/samplegen/samplegen.py", line 27, in <module>
from gapic.schema import wrappers
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/schema/__init__.py", line 23, in <module>
from gapic.schema.api import API
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/schema/api.py", line 29, in <module>
from google.api_core import exceptions # type: ignore
ModuleNotFoundError: No module named 'google.api_core'
--python_gapic_out: protoc-gen-python_gapic: Plugin failed with status code 1.
Target //google/container/v1beta1:container-v1beta1-py failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 12.596s, Critical Path: 1.74s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
Traceback (most recent call last):
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
main()
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
spec.loader.exec_module(synth_module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/kbuilder/.cache/synthtool/python-container/synth.py", line 32, in <module>
proto_output_path=f"google/container_{version}/proto",
File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 52, in py_library
return self._generate_code(service, version, "python", **kwargs)
File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 197, in _generate_code
shell.run(bazel_run_args)
File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
raise exc
File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
encoding="utf-8",
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=240', 'build', '//google/container/v1beta1:container-v1beta1-py']' returned non-zero exit status 1.
2021-01-28 05:41:25,392 autosynth [ERROR] > Synthesis failed
2021-01-28 05:41:25,392 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at efe4b69 chore: exclude `.nox` from linting; document supported python versions (#64)
2021-01-28 05:41:25,397 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2021-01-28 05:41:25,402 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 354, in <module>
main()
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 189, in main
return _inner_main(temp_dir)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 334, in _inner_main
commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 65, in synthesize_loop
has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 259, in synthesize_version_in_new_branch
synthesizer.synthesize(synth_log_path, self.environ)
File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
synth_proc.check_returncode() # Raise an exception.
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.
Google internal developers can see the full log here.
resource.proto=google/api/resource.proto -Igoogle/rpc/code.proto=google/rpc/code.proto -Igoogle/rpc/status.proto=google/rpc/status.proto -Igoogle/protobuf/any.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/any_proto/google/protobuf/any.proto -Igoogle/protobuf/empty.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/empty_proto/google/protobuf/empty.proto -Igoogle/protobuf/timestamp.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/timestamp_proto/google/protobuf/timestamp.proto -Igoogle/protobuf/wrappers.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/wrappers_proto/google/protobuf/wrappers.proto google/container/v1beta1/cluster_service.proto`; 0s linux-sandbox
ERROR: /home/kbuilder/.cache/synthtool/googleapis/google/container/v1beta1/BUILD.bazel:153:1: //google/container/v1beta1:container_py_gapic: `bazel-out/host/bin/external/com_google_protobuf/protoc --experimental_allow_proto3_optional --plugin=protoc-gen-python_gapic=bazel-out/host/bin/external/gapic_generator_python/gapic_plugin --python_gapic_out=retry-config=google/container/v1beta1/container_grpc_service_config.json:bazel-out/k8-fastbuild/bin/google/container/v1beta1/container_py_gapic.srcjar.zip -Igoogle/container/v1beta1/cluster_service.proto=google/container/v1beta1/cluster_service.proto -Igoogle/api/annotations.proto=google/api/annotations.proto -Igoogle/api/http.proto=google/api/http.proto -Igoogle/protobuf/descriptor.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/descriptor_proto/google/protobuf/descriptor.proto -Igoogle/api/client.proto=google/api/client.proto -Igoogle/api/field_behavior.proto=google/api/field_behavior.proto -Igoogle/api/resource.proto=google/api/resource.proto -Igoogle/rpc/code.proto=google/rpc/code.proto -Igoogle/rpc/status.proto=google/rpc/status.proto -Igoogle/protobuf/any.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/any_proto/google/protobuf/any.proto -Igoogle/protobuf/empty.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/empty_proto/google/protobuf/empty.proto -Igoogle/protobuf/timestamp.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/timestamp_proto/google/protobuf/timestamp.proto -Igoogle/protobuf/wrappers.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/wrappers_proto/google/protobuf/wrappers.proto google/container/v1beta1/cluster_service.proto` failed (Exit 1) protoc failed: error executing command bazel-out/host/bin/external/com_google_protobuf/protoc --experimental_allow_proto3_optional '--plugin=protoc-gen-python_gapic=bazel-out/host/bin/external/gapic_generator_python/gapic_plugin' ... (remaining 15 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
Traceback (most recent call last):
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/cli/generate_with_pandoc.py", line 3, in <module>
from gapic.cli import generate
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/cli/generate.py", line 23, in <module>
from gapic import generator
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/generator/__init__.py", line 21, in <module>
from .generator import Generator
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/generator/generator.py", line 24, in <module>
from gapic.samplegen import manifest, samplegen
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/samplegen/__init__.py", line 15, in <module>
from gapic.samplegen import samplegen
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/samplegen/samplegen.py", line 27, in <module>
from gapic.schema import wrappers
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/schema/__init__.py", line 23, in <module>
from gapic.schema.api import API
File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/1/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/schema/api.py", line 29, in <module>
from google.api_core import exceptions # type: ignore
ModuleNotFoundError: No module named 'google.api_core'
--python_gapic_out: protoc-gen-python_gapic: Plugin failed with status code 1.
Target //google/container/v1beta1:container-v1beta1-py failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 12.039s, Critical Path: 1.58s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
Traceback (most recent call last):
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
main()
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
spec.loader.exec_module(synth_module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/kbuilder/.cache/synthtool/python-container/synth.py", line 32, in <module>
proto_output_path=f"google/container_{version}/proto",
File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 52, in py_library
return self._generate_code(service, version, "python", **kwargs)
File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 193, in _generate_code
shell.run(bazel_run_args)
File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
raise exc
File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
encoding="utf-8",
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=240', 'build', '//google/container/v1beta1:container-v1beta1-py']' returned non-zero exit status 1.
2021-01-21 05:41:16,334 autosynth [ERROR] > Synthesis failed
2021-01-21 05:41:16,334 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at efe4b69 chore: exclude `.nox` from linting; document supported python versions (#64)
2021-01-21 05:41:16,339 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2021-01-21 05:41:16,344 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 354, in <module>
main()
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 189, in main
return _inner_main(temp_dir)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 334, in _inner_main
commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 65, in synthesize_loop
has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 259, in synthesize_version_in_new_branch
synthesizer.synthesize(synth_log_path, self.environ)
File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
synth_proc.check_returncode() # Raise an exception.
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.
Google internal developers can see the full log here.
Please investigate and fix this issue within 5 business days. While it remains broken,
this library cannot be updated with changes to the python-container API, and the library grows
stale.
9dfd4a80976617e8a65dd2dfbfcb9fcd05ba
2021-04-27 03:59:19,352 autosynth [DEBUG] > Running: git log -1 --pretty=%at a648ce0ca3fe122b3186d7e6861cb641437e485e
2021-04-27 03:59:19,354 autosynth [DEBUG] > Running: git log -1 --pretty=%at 625f84c8c127112ac72eb9d8ea6c6e7784a72772
2021-04-27 03:59:19,357 autosynth [DEBUG] > Running: git log -1 --pretty=%at 6244244abd0da5ef750e3bbb63fa22ec6803b4db
2021-04-27 03:59:19,360 autosynth [DEBUG] > Running: git checkout f908d5415c30ec66617ed63e7851f7d13cc06337
Note: checking out 'f908d5415c30ec66617ed63e7851f7d13cc06337'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at f908d54 chore(revert): revert preventing normalization (#89)
2021-04-27 03:59:19,372 autosynth [DEBUG] > Running: git checkout e7d77d65f0e05ce584c1a824c7ecab53b411498b
Note: checking out 'e7d77d65f0e05ce584c1a824c7ecab53b411498b'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at e7d77d65 fix: specify valid go_package option
2021-04-27 03:59:19,383 autosynth [DEBUG] > Running: git checkout 6244244abd0da5ef750e3bbb63fa22ec6803b4db
Note: checking out '6244244abd0da5ef750e3bbb63fa22ec6803b4db'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 6244244 chore: ignore release-please.yml if it already exists (#1059)
2021-04-27 03:59:19,390 autosynth [DEBUG] > Running: git branch -f autosynth-173
2021-04-27 03:59:19,393 autosynth [DEBUG] > Running: git checkout autosynth-173
Switched to branch 'autosynth-173'
2021-04-27 03:59:19,396 autosynth [INFO] > Running synthtool
2021-04-27 03:59:19,396 autosynth [INFO] > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']
2021-04-27 03:59:19,396 autosynth [DEBUG] > log_file_path: /tmpfs/src/logs/python-container/173/sponge_log.log
2021-04-27 03:59:19,397 autosynth [DEBUG] > Running: /tmpfs/src/github/synthtool/env/bin/python3 -m synthtool --metadata synth.metadata synth.py --
2021-04-27 03:59:19,582 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/python-container/synth.py.
On branch autosynth-173
nothing to commit, working tree clean
2021-04-27 03:59:19,692 synthtool [DEBUG] > Ensuring dependencies.
2021-04-27 03:59:19,701 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/synthtool
2021-04-27 03:59:19,705 synthtool [DEBUG] > Cloning googleapis.
2021-04-27 03:59:19,705 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/googleapis
2021-04-27 03:59:19,708 synthtool [DEBUG] > Which version of bazel will I run?
bazel 3.0.0
2021-04-27 03:59:19,711 synthtool [DEBUG] > Generating code for: //google/container/v1beta1:container-v1beta1-py.
2021-04-27 03:59:26,013 synthtool [ERROR] > Failed executing bazel --max_idle_secs=240 build //google/container/v1beta1:container-v1beta1-py:
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
DEBUG: /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/rules_python/python/pip.bzl:61:5: DEPRECATED: the pip_repositories rule has been replaced with pip_install, please see rules_python 0.1 release notes
Loading: 0 packages loaded
currently loading: google/container/v1beta1
Analyzing: target //google/container/v1beta1:container-v1beta1-py (1 packages loaded, 0 targets configured)
Analyzing: target //google/container/v1beta1:container-v1beta1-py (16 packages loaded, 30 targets configured)
ERROR: /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/upb/bazel/upb_proto_library.bzl:257:29: aspect() got unexpected keyword argument 'incompatible_use_toolchain_transition'
Analyzing: target //google/container/v1beta1:container-v1beta1-py (36 packages loaded, 268 targets configured)
INFO: Call stack for the definition of repository 'pandoc_linux' which is a http_archive (rule definition at /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
- <builtin>
- /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/protoc_docs_plugin/repositories.bzl:62:5
- /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/protoc_docs_plugin/repositories.bzl:34:5
- /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:270:1
ERROR: Analysis of target '//google/container/v1beta1:container-v1beta1-py' failed; build aborted: error loading package '@com_github_grpc_grpc//': in /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/com_github_grpc_grpc/bazel/grpc_build_system.bzl: Extension file 'bazel/upb_proto_library.bzl' has errors
INFO: Elapsed time: 6.251s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (37 packages loaded, 268 targets configured)
FAILED: Build did NOT complete successfully (37 packages loaded, 268 targets configured)
Traceback (most recent call last):
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
main()
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
spec.loader.exec_module(synth_module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/kbuilder/.cache/synthtool/python-container/synth.py", line 32, in <module>
proto_output_path=f"google/container_{version}/proto",
File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 52, in py_library
return self._generate_code(service, version, "python", False, **kwargs)
File "/tmpfs/src/github/synthtool/synthtool/gcp/gapic_bazel.py", line 204, in _generate_code
shell.run(bazel_run_args)
File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
raise exc
File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
encoding="utf-8",
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['bazel', '--max_idle_secs=240', 'build', '//google/container/v1beta1:container-v1beta1-py']' returned non-zero exit status 1.
2021-04-27 03:59:26,065 autosynth [ERROR] > Synthesis failed
2021-04-27 03:59:26,065 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at f908d54 chore(revert): revert preventing normalization (#89)
2021-04-27 03:59:26,070 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2021-04-27 03:59:26,074 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 356, in <module>
main()
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 191, in main
return _inner_main(temp_dir)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 336, in _inner_main
commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 68, in synthesize_loop
has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
File "/tmpfs/src/github/synthtool/autosynth/synth_toolbox.py", line 259, in synthesize_version_in_new_branch
synthesizer.synthesize(synth_log_path, self.environ)
File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
synth_proc.check_returncode() # Raise an exception.
File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.
Google internal developers can see the full log here.
# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.set_labels), "__call__") as call:
# Designate an appropriate return value for the call.
call.return_value = cluster_service.Operation()
call.return_value = grpc_helpers_async.FakeUnaryUnaryCall(
cluster_service.Operation()
)
# Call the method with a truthy value for each flattened field,
# using the keyword arguments to the method.
response = await client.set_labels(
project_id="project_id_value",
zone="zone_value",
cluster_id="cluster_id_value",
resource_labels={"key_value": "value_value"},
label_fingerprint="label_fingerprint_value",
)
# Establish that the underlying call was made with the expected
# request object values.
assert len(call.mock_calls)
_, args, _ = call.mock_calls[0]
arg = args[0].project_id
mock_val = "project_id_value"
assert arg == mock_val
arg = args[0].zone
mock_val = "zone_value"
assert arg == mock_val
arg = args[0].cluster_id
mock_val = "cluster_id_value"
assert arg == mock_val
arg = args[0].resource_labels
mock_val = {"key_value": "value_value"}
assert arg == mock_val
E AssertionError: assert {'key_value': 'value_value'} == {'key_value': 'value_value'}
E Use -v to get more diff