Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synthesis failed for logging #8931

Closed
yoshi-automation opened this issue Aug 2, 2019 · 5 comments 路 Fixed by #8939
Closed

Synthesis failed for logging #8931

yoshi-automation opened this issue Aug 2, 2019 · 5 comments 路 Fixed by #8939
Assignees
Labels
api: logging Issues related to the Cloud Logging API. autosynth failure type: process A process-related concern. May include testing, release, or the like.

Comments

@yoshi-automation
Copy link
Contributor

Hello! Autosynth couldn't regenerate logging. 馃挃

Here's the output from running synth.py:

Cloning into 'working_repo'...
Switched to branch 'autosynth-logging'
Running synthtool
['/tmpfs/src/git/autosynth/env/bin/python3', '-m', 'synthtool', 'synth.py', '--']
synthtool > Executing /tmpfs/src/git/autosynth/working_repo/logging/synth.py.
synthtool > Ensuring dependencies.
synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:6929f343c400122d85818195b18613330a12a014bffc1e08499550d40571479d
Status: Image is up to date for googleapis/artman:latest
synthtool > Cloning googleapis.
synthtool > Running generator for google/logging/artman_logging.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2.
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/logging.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/logging.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/logging_config.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/logging_config.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/log_entry.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/log_entry.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/logging_metrics.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/logging_metrics.proto
synthtool > Placed proto files into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/logging_config_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/logging_metrics_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/logging_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/log_entry_pb2.py.
synthtool > Replaced 'channel =.*\n(\\s+)address=.*\n\\s+credentials=.*,\n' in google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py.
synthtool > Replaced 'channel =.*\n(\\s+)address=.*\n\\s+credentials=.*,\n' in google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py.
synthtool > Replaced 'channel =.*\n(\\s+)address=.*\n\\s+credentials=.*,\n' in google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py.
.coveragerc
.flake8
MANIFEST.in
noxfile.py.j2
setup.cfg
Running session blacken
Creating virtualenv using python3.6 in .nox/blacken
pip install black
black google tests docs
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/enums.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/config_service_v2_client_config.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py
error: cannot format /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py: cannot use --safe with this file; failed to parse source file with Python 3.6's builtin AST. Re-run with --fast or stop using deprecated Python 2 syntax. AST error message: keyword argument repeated (<unknown>, line 73)
error: cannot format /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py: cannot use --safe with this file; failed to parse source file with Python 3.6's builtin AST. Re-run with --fast or stop using deprecated Python 2 syntax. AST error message: keyword argument repeated (<unknown>, line 73)
error: cannot format /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py: cannot use --safe with this file; failed to parse source file with Python 3.6's builtin AST. Re-run with --fast or stop using deprecated Python 2 syntax. AST error message: keyword argument repeated (<unknown>, line 73)
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/metrics_service_v2_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/config_service_v2_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/log_entry_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_metrics_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_config_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/tests/unit/gapic/v2/test_config_service_v2_client_v2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py
All done! 馃挜 馃挃 馃挜
18 files reformatted, 52 files left unchanged, 3 files failed to reformat.
Command black google tests docs failed with exit code 123
Session blacken failed.
synthtool > Failed executing nox -s blacken:

None
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 87, 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 79, 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/logging/synth.py", line 56, 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.
synthtool > Cleaned up 2 temporary directories.
synthtool > Wrote metadata to synth.metadata.

Synthesis failed

Google internal developers can see the full log here.

@yoshi-automation yoshi-automation added api: logging Issues related to the Cloud Logging API. autosynth failure priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Aug 2, 2019
@busunkim96 busunkim96 self-assigned this Aug 2, 2019
@tseaver tseaver added type: process A process-related concern. May include testing, release, or the like. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Aug 2, 2019
@tseaver
Copy link
Contributor

tseaver commented Aug 2, 2019

The failiure is due to a clash between logging/synth.py, which adds the options argument correctly, and googleapis/gapic-generator#2900, which adds it but in a b0rked way. Once fixed version of that PR is merged / released for gapic-generator, the fix here will be to remove the s.replace() lines in logging/synth.py.

@yoshi-automation
Copy link
Contributor Author

Autosynth is still having trouble generating logging. 馃槶

Here's the output from running synth.py:

Cloning into 'working_repo'...
Switched to branch 'autosynth-logging'
Running synthtool
['/tmpfs/src/git/autosynth/env/bin/python3', '-m', 'synthtool', 'synth.py', '--']
synthtool > Executing /tmpfs/src/git/autosynth/working_repo/logging/synth.py.
synthtool > Ensuring dependencies.
synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:a684d40ba9a4e15946f5f2ca6b4bd9fe301192f522e9de4fff622118775f309b
Status: Image is up to date for googleapis/artman:latest
synthtool > Cloning googleapis.
synthtool > Running generator for google/logging/artman_logging.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2.
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/logging.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/logging.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/logging_config.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/logging_config.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/log_entry.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/log_entry.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/logging_metrics.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/logging_metrics.proto
synthtool > Placed proto files into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/log_entry_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/logging_metrics_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/logging_config_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/logging_pb2.py.
synthtool > Replaced 'channel =.*\n(\\s+)address=.*\n\\s+credentials=.*,\n' in google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py.
synthtool > Replaced 'channel =.*\n(\\s+)address=.*\n\\s+credentials=.*,\n' in google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py.
synthtool > Replaced 'channel =.*\n(\\s+)address=.*\n\\s+credentials=.*,\n' in google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py.
.coveragerc
.flake8
MANIFEST.in
noxfile.py.j2
setup.cfg
Running session blacken
Creating virtualenv using python3.6 in .nox/blacken
pip install black
black google tests docs
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/enums.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/config_service_v2_client_config.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py
error: cannot format /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py: cannot use --safe with this file; failed to parse source file with Python 3.6's builtin AST. Re-run with --fast or stop using deprecated Python 2 syntax. AST error message: keyword argument repeated (<unknown>, line 73)
error: cannot format /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py: cannot use --safe with this file; failed to parse source file with Python 3.6's builtin AST. Re-run with --fast or stop using deprecated Python 2 syntax. AST error message: keyword argument repeated (<unknown>, line 73)
error: cannot format /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py: cannot use --safe with this file; failed to parse source file with Python 3.6's builtin AST. Re-run with --fast or stop using deprecated Python 2 syntax. AST error message: keyword argument repeated (<unknown>, line 73)
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/metrics_service_v2_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/config_service_v2_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/log_entry_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/tests/unit/gapic/v2/test_config_service_v2_client_v2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_metrics_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_config_pb2.py
All done! 馃挜 馃挃 馃挜
18 files reformatted, 52 files left unchanged, 3 files failed to reformat.
Command black google tests docs failed with exit code 123
Session blacken failed.
synthtool > Failed executing nox -s blacken:

None
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 87, 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 79, 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/logging/synth.py", line 56, 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.
synthtool > Cleaned up 2 temporary directories.
synthtool > Wrote metadata to synth.metadata.

Synthesis failed

Google internal developers can see the full log here.

@yoshi-automation
Copy link
Contributor Author

Autosynth is still having trouble generating logging. 馃槶

Here's the output from running synth.py:

Cloning into 'working_repo'...
Switched to branch 'autosynth-logging'
Running synthtool
['/tmpfs/src/git/autosynth/env/bin/python3', '-m', 'synthtool', 'synth.py', '--']
synthtool > Executing /tmpfs/src/git/autosynth/working_repo/logging/synth.py.
synthtool > Ensuring dependencies.
synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:a684d40ba9a4e15946f5f2ca6b4bd9fe301192f522e9de4fff622118775f309b
Status: Image is up to date for googleapis/artman:latest
synthtool > Cloning googleapis.
synthtool > Running generator for google/logging/artman_logging.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2.
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/logging.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/logging.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/logging_config.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/logging_config.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/log_entry.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/log_entry.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/logging_metrics.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/logging_metrics.proto
synthtool > Placed proto files into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/logging_config_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/logging_metrics_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/logging_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/log_entry_pb2.py.
synthtool > Replaced 'channel =.*\n(\\s+)address=.*\n\\s+credentials=.*,\n' in google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py.
synthtool > Replaced 'channel =.*\n(\\s+)address=.*\n\\s+credentials=.*,\n' in google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py.
synthtool > Replaced 'channel =.*\n(\\s+)address=.*\n\\s+credentials=.*,\n' in google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py.
.coveragerc
.flake8
MANIFEST.in
noxfile.py.j2
setup.cfg
Running session blacken
Creating virtualenv using python3.6 in .nox/blacken
pip install black
black google tests docs
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/enums.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/config_service_v2_client_config.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py
error: cannot format /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py: cannot use --safe with this file; failed to parse source file with Python 3.6's builtin AST. Re-run with --fast or stop using deprecated Python 2 syntax. AST error message: keyword argument repeated (<unknown>, line 73)
error: cannot format /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py: cannot use --safe with this file; failed to parse source file with Python 3.6's builtin AST. Re-run with --fast or stop using deprecated Python 2 syntax. AST error message: keyword argument repeated (<unknown>, line 73)
error: cannot format /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py: cannot use --safe with this file; failed to parse source file with Python 3.6's builtin AST. Re-run with --fast or stop using deprecated Python 2 syntax. AST error message: keyword argument repeated (<unknown>, line 73)
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/metrics_service_v2_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/config_service_v2_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/log_entry_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_metrics_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/tests/unit/gapic/v2/test_config_service_v2_client_v2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_config_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py
All done! 馃挜 馃挃 馃挜
18 files reformatted, 52 files left unchanged, 3 files failed to reformat.
Command black google tests docs failed with exit code 123
Session blacken failed.
synthtool > Failed executing nox -s blacken:

None
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 87, 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 79, 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/logging/synth.py", line 56, 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.
synthtool > Cleaned up 2 temporary directories.
synthtool > Wrote metadata to synth.metadata.

Synthesis failed

Google internal developers can see the full log here.

@yoshi-automation
Copy link
Contributor Author

Autosynth is still having trouble generating logging. 馃槶

Here's the output from running synth.py:

Cloning into 'working_repo'...
Switched to branch 'autosynth-logging'
Running synthtool
['/tmpfs/src/git/autosynth/env/bin/python3', '-m', 'synthtool', 'synth.py', '--']
synthtool > Executing /tmpfs/src/git/autosynth/working_repo/logging/synth.py.
synthtool > Ensuring dependencies.
synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:a684d40ba9a4e15946f5f2ca6b4bd9fe301192f522e9de4fff622118775f309b
Status: Image is up to date for googleapis/artman:latest
synthtool > Cloning googleapis.
synthtool > Running generator for google/logging/artman_logging.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2.
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/logging.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/logging.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/logging_config.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/logging_config.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/log_entry.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/log_entry.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/logging/v2/logging_metrics.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto/logging_metrics.proto
synthtool > Placed proto files into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/logging-v2/google/cloud/logging_v2/proto.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/logging_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/logging_metrics_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/log_entry_pb2.py.
synthtool > Replaced '(^.*$\\n)*' in google/cloud/logging_v2/proto/logging_config_pb2.py.
synthtool > Replaced 'channel =.*\n(\\s+)address=.*\n\\s+credentials=.*,\n' in google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py.
synthtool > Replaced 'channel =.*\n(\\s+)address=.*\n\\s+credentials=.*,\n' in google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py.
synthtool > Replaced 'channel =.*\n(\\s+)address=.*\n\\s+credentials=.*,\n' in google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py.
.coveragerc
.flake8
MANIFEST.in
noxfile.py.j2
setup.cfg
Running session blacken
Creating virtualenv using python3.6 in .nox/blacken
pip install black
black google tests docs
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/config_service_v2_client_config.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/enums.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/logging_service_v2_client_config.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/metrics_service_v2_client_config.py
error: cannot format /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/transports/config_service_v2_grpc_transport.py: cannot use --safe with this file; failed to parse source file with Python 3.6's builtin AST. Re-run with --fast or stop using deprecated Python 2 syntax. AST error message: keyword argument repeated (<unknown>, line 73)
error: cannot format /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/transports/logging_service_v2_grpc_transport.py: cannot use --safe with this file; failed to parse source file with Python 3.6's builtin AST. Re-run with --fast or stop using deprecated Python 2 syntax. AST error message: keyword argument repeated (<unknown>, line 73)
error: cannot format /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/transports/metrics_service_v2_grpc_transport.py: cannot use --safe with this file; failed to parse source file with Python 3.6's builtin AST. Re-run with --fast or stop using deprecated Python 2 syntax. AST error message: keyword argument repeated (<unknown>, line 73)
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/log_entry_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/metrics_service_v2_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/gapic/config_service_v2_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_config_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_metrics_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/log_entry_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_metrics_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/google/cloud/logging_v2/proto/logging_config_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/tests/unit/gapic/v2/test_config_service_v2_client_v2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/tests/unit/gapic/v2/test_logging_service_v2_client_v2.py
reformatted /tmpfs/src/git/autosynth/working_repo/logging/tests/unit/gapic/v2/test_metrics_service_v2_client_v2.py
All done! 馃挜 馃挃 馃挜
18 files reformatted, 52 files left unchanged, 3 files failed to reformat.
Command black google tests docs failed with exit code 123
Session blacken failed.
synthtool > Failed executing nox -s blacken:

None
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 87, 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 79, 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/logging/synth.py", line 56, 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.
synthtool > Cleaned up 2 temporary directories.
synthtool > Wrote metadata to synth.metadata.

Synthesis failed

Google internal developers can see the full log here.

@tseaver
Copy link
Contributor

tseaver commented Aug 5, 2019

This failure is due to a clash between the new artman genration (suppressing gRPC max payload everywhere) and custom handling in synth.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. autosynth failure type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants