Code Monkey home page Code Monkey logo

python-datacatalog's Introduction

NOTE

This github repository is archived. The repository contents and history have moved to google-cloud-python.

Python Client for Google Cloud Data Catalog API

stable pypi versions

Google Cloud Data Catalog API: is a fully managed and highly scalable data discovery and metadata management service.

Quick Start

In order to use this library, you first need to go through the following steps:

  1. Select or create a Cloud Platform project.
  2. Enable billing for your project.
  3. Enable the Google Cloud Data Catalog API.
  4. Setup Authentication.

Installation

Install this library in a virtualenv using pip. virtualenv is a tool to create isolated Python environments. The basic problem it addresses is one of dependencies and versions, and indirectly permissions.

With virtualenv, 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.

Mac/Linux

pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install google-cloud-datacatalog

Windows

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-datacatalog

Next Steps

python-datacatalog's People

Contributors

anukaal avatar busunkim96 avatar dandhlee avatar danoscarmike avatar dependabot[bot] avatar dpebot avatar gcf-owl-bot[bot] avatar gguuss avatar google-cloud-policy-bot[bot] avatar hkdevandla avatar justinbeckwith avatar kurtisvg avatar meredithslota avatar mesmacosta avatar msampathkumar avatar parthea avatar release-please[bot] avatar renovate-bot avatar ricardolsmendes avatar ryanyuan avatar steffnay avatar surferjeffatgoogle avatar tmshn avatar tseaver avatar tswast avatar vam-google avatar ylil93 avatar yoshi-automation avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-datacatalog's Issues

AttributeError: module 'grpc.experimental.aio' has no attribute 'StreamUnaryCall'

Upgrading to the latest version has produced the following error:
AttributeError: module 'grpc.experimental.aio' has no attribute 'StreamUnaryCall'

We have reverted back to the previous version, which isn't facing this issue, but flagging it here, as it will affect others.

It seems to be the same issue as raised here for google-api-core

Environment details

  • Python version: 3.7.3
  • google-cloud-datacatalog version: 1.0.0

Steps to reproduce

  1. See stack trace below, it happens on importing the datacatalog client

Stack trace

from google.cloud import datacatalog
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<%APPDATA%>\Python\Python37\site-packages\google\cloud\datacatalog.py", line 20, in <module>
    from google.cloud.datacatalog_v1beta1 import DataCatalogClient
  File "<%APPDATA%>\Python\Python37\site-packages\google\cloud\datacatalog_v1beta1\__init__.py", line 23, in <module>
    from google.cloud.datacatalog_v1beta1.gapic import data_catalog_client
  File "<%APPDATA%>\Python\Python37\site-packages\google\cloud\datacatalog_v1beta1\gapic\data_catalog_client.py", line 25, in <module>
    import google.api_core.gapic_v1.client_info
  File "<%APPDATA%>\Python\Python37\site-packages\google\api_core\gapic_v1\__init__.py", line 26, in <module>
    from google.api_core.gapic_v1 import method_async  # noqa: F401
  File "<%APPDATA%>\Python\Python37\site-packages\google\api_core\gapic_v1\method_async.py", line 20, in <module>
    from google.api_core import general_helpers, grpc_helpers_async
  File "<%APPDATA%>\Python\Python37\site-packages\google\api_core\grpc_helpers_async.py", line 145, in <module>
    class _WrappedStreamUnaryCall(_WrappedUnaryResponseMixin, _WrappedStreamRequestMixin, aio.StreamUnaryCall):
AttributeError: module 'grpc.experimental.aio' has no attribute 'StreamUnaryCall'

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

This repository currently has no open or pending branches.


  • Check this box to trigger a request for Renovate to run again on this repository

Incorrect reference to SearchCatalogRequest.Scope in Datacatalog

Hello

The following reference is used in the documentation:

google.cloud.datacatalog_v1beta1.types.Scope

The correct value is:

google.cloud.datacatalog_v1beta1.types.SearchCatalogRequest.Scope

Best regards,
Kamil

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

N/A

Steps to reproduce

N/A

Code example

N/A

Stack trace

N/A

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Synthesis failed for python-datacatalog

Hello! Autosynth couldn't regenerate python-datacatalog. ๐Ÿ’”

Here's the output from running synth.py:

ASS,
      File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 79, in run
        _build_ext.run(self)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/tmpfs/tmp/pip-install-dghqve1_/grpcio/src/python/grpcio/commands.py", line 272, in build_extensions
        "Failed `build_ext` step:\n{}".format(formatted_exception))
    commands.CommandError: Failed `build_ext` step:
    Traceback (most recent call last):
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
        extra_postargs)
      File "/tmpfs/tmp/pip-install-dghqve1_/grpcio/src/python/grpcio/_spawn_patch.py", line 54, in _commandfile_spawn
        _classic_spawn(self, command)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
        spawn(cmd, dry_run=self.dry_run)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/spawn.py", line 36, in spawn
        _spawn_posix(cmd, search_path, dry_run=dry_run)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
        % (cmd, exit_status))
    distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/tmpfs/tmp/pip-install-dghqve1_/grpcio/src/python/grpcio/commands.py", line 267, in build_extensions
        build_ext.build_ext.build_extensions(self)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
        self._build_extensions_serial()
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
        self.build_extension(ext)
      File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
        _build_ext.build_extension(self, ext)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
        depends=ext.depends)
      File "/tmpfs/tmp/pip-install-dghqve1_/grpcio/src/python/grpcio/_parallel_compile_patch.py", line 59, in _parallel_compile
        _compile_single_file, objects)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/multiprocessing/pool.py", line 266, in map
        return self._map_async(func, iterable, mapstar, chunksize).get()
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/multiprocessing/pool.py", line 644, in get
        raise self._value
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/multiprocessing/pool.py", line 119, in worker
        result = (True, func(*args, **kwds))
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
        return list(map(*args))
      File "/tmpfs/tmp/pip-install-dghqve1_/grpcio/src/python/grpcio/_parallel_compile_patch.py", line 54, in _compile_single_file
        self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
        raise CompileError(msg)
    distutils.errors.CompileError: command 'gcc' failed with exit status 1
    
    
    ----------------------------------------
Command "/tmpfs/src/github/synthtool/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmpfs/tmp/pip-install-dghqve1_/grpcio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmpfs/tmp/pip-record-ihzjbdwc/install-record.txt --single-version-externally-managed --compile --install-headers /tmpfs/src/github/synthtool/env/include/site/python3.6/grpcio" failed with error code 1 in /tmpfs/tmp/pip-install-dghqve1_/grpcio/
You are using pip version 18.1, however version 20.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

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-datacatalog/synth.py", line 70, in <module>
    python.py_samples()
  File "/tmpfs/src/github/synthtool/synthtool/languages/python.py", line 132, in py_samples
    sample_readme_metadata = _get_sample_readme_metadata(sample_project_dir)
  File "/tmpfs/src/github/synthtool/synthtool/languages/python.py", line 85, in _get_sample_readme_metadata
    shell.run([sys.executable, "-m", "pip", "install", "-r", requirements])
  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 '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'pip', 'install', '-r', '/home/kbuilder/.cache/synthtool/python-datacatalog/samples/snippets/requirements.txt']' returned non-zero exit status 1.
2020-12-03 05:46:56,608 autosynth [ERROR] > Synthesis failed
2020-12-03 05:46:56,609 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at cd7d4ba chore(deps): update dependency google-cloud-datacatalog to v3 (#73)
2020-12-03 05:46:56,628 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-12-03 05:46:56,645 autosynth [DEBUG] > Running: git clean -fdx
Removing .pre-commit-config.yaml
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.

tests.unit.gapic.datacatalog_v1.test_data_catalog: test_list_entries_pager failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: a005321
buildURL: Build Status, Sponge
status: failed

Test output
transport_name = 'grpc'
def test_list_entries_pager(transport_name: str = "grpc"):
    client = DataCatalogClient(
        credentials=ga_credentials.AnonymousCredentials,
        transport=transport_name,
    )

    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(type(client.transport.list_entries), "__call__") as call:
        # Set the response to a series of pages.
        call.side_effect = (
            datacatalog.ListEntriesResponse(
                entries=[
                    datacatalog.Entry(),
                    datacatalog.Entry(),
                    datacatalog.Entry(),
                ],
                next_page_token="abc",
            ),
            datacatalog.ListEntriesResponse(
                entries=[],
                next_page_token="def",
            ),
            datacatalog.ListEntriesResponse(
                entries=[
                    datacatalog.Entry(),
                ],
                next_page_token="ghi",
            ),
            datacatalog.ListEntriesResponse(
                entries=[
                    datacatalog.Entry(),
                    datacatalog.Entry(),
                ],
            ),
            RuntimeError,
        )

        metadata = ()
        metadata = tuple(metadata) + (
            gapic_v1.routing_header.to_grpc_metadata((("parent", ""),)),
        )
        pager = client.list_entries(request={})

        assert pager._metadata == metadata

        results = list(pager)
        assert len(results) == 6
      assert all(isinstance(i, datacatalog.Entry) for i in results)

E assert False
E + where False = all(<generator object test_list_entries_pager.. at 0x7f16cda05bd0>)

tests/unit/gapic/datacatalog_v1/test_data_catalog.py:3887: AssertionError

tests.unit.gapic.datacatalog_v1.test_data_catalog: test_list_entry_groups_pager failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: a005321
buildURL: Build Status, Sponge
status: failed

Test output
transport_name = 'grpc'
def test_list_entry_groups_pager(transport_name: str = "grpc"):
    client = DataCatalogClient(
        credentials=ga_credentials.AnonymousCredentials,
        transport=transport_name,
    )

    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(
        type(client.transport.list_entry_groups), "__call__"
    ) as call:
        # Set the response to a series of pages.
        call.side_effect = (
            datacatalog.ListEntryGroupsResponse(
                entry_groups=[
                    datacatalog.EntryGroup(),
                    datacatalog.EntryGroup(),
                    datacatalog.EntryGroup(),
                ],
                next_page_token="abc",
            ),
            datacatalog.ListEntryGroupsResponse(
                entry_groups=[],
                next_page_token="def",
            ),
            datacatalog.ListEntryGroupsResponse(
                entry_groups=[
                    datacatalog.EntryGroup(),
                ],
                next_page_token="ghi",
            ),
            datacatalog.ListEntryGroupsResponse(
                entry_groups=[
                    datacatalog.EntryGroup(),
                    datacatalog.EntryGroup(),
                ],
            ),
            RuntimeError,
        )

        metadata = ()
        metadata = tuple(metadata) + (
            gapic_v1.routing_header.to_grpc_metadata((("parent", ""),)),
        )
        pager = client.list_entry_groups(request={})

        assert pager._metadata == metadata

        results = list(pager)
        assert len(results) == 6
      assert all(isinstance(i, datacatalog.EntryGroup) for i in results)

E assert False
E + where False = all(<generator object test_list_entry_groups_pager.. at 0x7f16cda06ab0>)

tests/unit/gapic/datacatalog_v1/test_data_catalog.py:2342: AssertionError

tests.unit.gapic.datacatalog_v1.test_data_catalog: test_search_catalog_pager failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: a005321
buildURL: Build Status, Sponge
status: failed

Test output
transport_name = 'grpc'
def test_search_catalog_pager(transport_name: str = "grpc"):
    client = DataCatalogClient(
        credentials=ga_credentials.AnonymousCredentials,
        transport=transport_name,
    )

    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(type(client.transport.search_catalog), "__call__") as call:
        # Set the response to a series of pages.
        call.side_effect = (
            datacatalog.SearchCatalogResponse(
                results=[
                    search.SearchCatalogResult(),
                    search.SearchCatalogResult(),
                    search.SearchCatalogResult(),
                ],
                next_page_token="abc",
            ),
            datacatalog.SearchCatalogResponse(
                results=[],
                next_page_token="def",
            ),
            datacatalog.SearchCatalogResponse(
                results=[
                    search.SearchCatalogResult(),
                ],
                next_page_token="ghi",
            ),
            datacatalog.SearchCatalogResponse(
                results=[
                    search.SearchCatalogResult(),
                    search.SearchCatalogResult(),
                ],
            ),
            RuntimeError,
        )

        metadata = ()
        pager = client.search_catalog(request={})

        assert pager._metadata == metadata

        results = list(pager)
        assert len(results) == 6
      assert all(isinstance(i, search.SearchCatalogResult) for i in results)

E assert False
E + where False = all(<generator object test_search_catalog_pager.. at 0x7f16cd4984a0>)

tests/unit/gapic/datacatalog_v1/test_data_catalog.py:884: AssertionError

PolicyTagManagerClient methods: MethodNotImplemented: 501 Received http2 header with status: 404

Hello,

In my company we are looking a way to make automation on the creation of taxonomies and policy tags. We are using datacatalog_v1 python package but we are facing always the same error when we use an api related with taxonomies MethodNotImplemented: 501 Received http2 header with status: 404.

Environment details

  • OS type and version: MacOs Big Sur 11.2.3
  • Python version: 3.9.4
  • pip version: 21.0.1
  • google-cloud-datacatalog version: 3.3.1

Steps to reproduce

  1. Try to use any API related to taxonomies

Code example

from google.cloud.datacatalog_v1.services.policy_tag_manager import PolicyTagManagerClient
from google.cloud.datacatalog_v1.types import ListTaxonomiesRequest, Taxonomy, CreateTaxonomyRequest

p_client = PolicyTagManagerClient()
tax = Taxonomy(display_name='test')
r_tax = CreateTaxonomyRequest(parent='<project-id>', taxonomy=tax)

p_client.create_taxonomy(r_tax)

Stack trace

---------------------------------------------------------------------------
_InactiveRpcError                         Traceback (most recent call last)
/usr/local/lib/python3.9/site-packages/google/api_core/grpc_helpers.py in error_remapped_callable(*args, **kwargs)
     66         try:
---> 67             return callable_(*args, **kwargs)
     68         except grpc.RpcError as exc:

/usr/local/lib/python3.9/site-packages/grpc/_channel.py in __call__(self, request, timeout, metadata, credentials, wait_for_ready, compression)
    922                                       wait_for_ready, compression)
--> 923         return _end_unary_response_blocking(state, call, False, None)
    924 

/usr/local/lib/python3.9/site-packages/grpc/_channel.py in _end_unary_response_blocking(state, call, with_call, deadline)
    825     else:
--> 826         raise _InactiveRpcError(state)
    827 

_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.UNIMPLEMENTED
	details = "Received http2 header with status: 404"
	debug_error_string = "{"created":"@1627631597.666387000","description":"Received http2 :status header with non-200 OK status","file":"src/core/ext/filters/http/client/http_client_filter.cc","file_line":130,"grpc_message":"Received http2 header with status: 404","grpc_status":12,"value":"404"}"
>

The above exception was the direct cause of the following exception:

MethodNotImplemented                      Traceback (most recent call last)
<ipython-input-12-4df193636ef1> in <module>
      1 # p_client.list_taxonomies(request=request)
----> 2 p_client.create_taxonomy(r_tax)

/usr/local/lib/python3.9/site-packages/google/cloud/datacatalog_v1/services/policy_tag_manager/client.py in create_taxonomy(self, request, parent, taxonomy, retry, timeout, metadata)
    463 
    464         # Send the request.
--> 465         response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
    466 
    467         # Done; return the response.

/usr/local/lib/python3.9/site-packages/google/api_core/gapic_v1/method.py in __call__(self, *args, **kwargs)
    143             kwargs["metadata"] = metadata
    144 
--> 145         return wrapped_func(*args, **kwargs)
    146 
    147 

/usr/local/lib/python3.9/site-packages/google/api_core/grpc_helpers.py in error_remapped_callable(*args, **kwargs)
     67             return callable_(*args, **kwargs)
     68         except grpc.RpcError as exc:
---> 69             six.raise_from(exceptions.from_grpc_error(exc), exc)
     70 
     71     return error_remapped_callable

/usr/local/lib/python3.9/site-packages/six.py in raise_from(value, from_value)

MethodNotImplemented: 501 Received http2 header with status: 404

Synthesis failed for python-datacatalog

Hello! Autosynth couldn't regenerate python-datacatalog. ๐Ÿ’”

Here's the output from running synth.py:

 --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/cloud/datacatalog/v1/datacatalog_grpc_service_config.json:bazel-out/k8-fastbuild/bin/google/cloud/datacatalog/v1/datacatalog_py_gapic.srcjar.zip -Igoogle/cloud/datacatalog/v1/common.proto=google/cloud/datacatalog/v1/common.proto -Igoogle/cloud/datacatalog/v1/datacatalog.proto=google/cloud/datacatalog/v1/datacatalog.proto -Igoogle/cloud/datacatalog/v1/gcs_fileset_spec.proto=google/cloud/datacatalog/v1/gcs_fileset_spec.proto -Igoogle/cloud/datacatalog/v1/schema.proto=google/cloud/datacatalog/v1/schema.proto -Igoogle/cloud/datacatalog/v1/search.proto=google/cloud/datacatalog/v1/search.proto -Igoogle/cloud/datacatalog/v1/table_spec.proto=google/cloud/datacatalog/v1/table_spec.proto -Igoogle/cloud/datacatalog/v1/tags.proto=google/cloud/datacatalog/v1/tags.proto -Igoogle/cloud/datacatalog/v1/timestamps.proto=google/cloud/datacatalog/v1/timestamps.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/iam/v1/iam_policy.proto=google/iam/v1/iam_policy.proto -Igoogle/iam/v1/options.proto=google/iam/v1/options.proto -Igoogle/iam/v1/policy.proto=google/iam/v1/policy.proto -Igoogle/type/expr.proto=google/type/expr.proto -Igoogle/protobuf/empty.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/empty_proto/google/protobuf/empty.proto -Igoogle/protobuf/field_mask.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/field_mask_proto/google/protobuf/field_mask.proto -Igoogle/protobuf/timestamp.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/timestamp_proto/google/protobuf/timestamp.proto google/cloud/datacatalog/v1/common.proto google/cloud/datacatalog/v1/datacatalog.proto google/cloud/datacatalog/v1/gcs_fileset_spec.proto google/cloud/datacatalog/v1/schema.proto google/cloud/datacatalog/v1/search.proto google/cloud/datacatalog/v1/table_spec.proto google/cloud/datacatalog/v1/tags.proto google/cloud/datacatalog/v1/timestamps.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 30 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
google/cloud/datacatalog/v1/search.proto:21:1: warning: Import google/protobuf/timestamp.proto is unused.
Traceback (most recent call last):
  File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/4/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/4/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/4/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/4/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/4/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/4/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/4/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/4/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/cloud/datacatalog/v1:datacatalog-v1-py failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.323s, Critical Path: 0.90s
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-datacatalog/synth.py", line 34, in <module>
    include_protos=True,
  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/cloud/datacatalog/v1:datacatalog-v1-py']' returned non-zero exit status 1.
2021-01-21 05:41:35,515 autosynth [ERROR] > Synthesis failed
2021-01-21 05:41:35,516 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 2dbb3ef docs: document enum values with `undoc-members` option (#93)
2021-01-21 05:41:35,521 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2021-01-21 05:41:35,526 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.

tests.unit.gapic.datacatalog_v1.test_data_catalog: test_list_entries_async_pager failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: a005321
buildURL: Build Status, Sponge
status: failed

Test output
@pytest.mark.asyncio
    async def test_list_entries_async_pager():
        client = DataCatalogAsyncClient(
            credentials=ga_credentials.AnonymousCredentials,
        )
    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(
        type(client.transport.list_entries), "__call__", new_callable=mock.AsyncMock
    ) as call:
        # Set the response to a series of pages.
        call.side_effect = (
            datacatalog.ListEntriesResponse(
                entries=[
                    datacatalog.Entry(),
                    datacatalog.Entry(),
                    datacatalog.Entry(),
                ],
                next_page_token="abc",
            ),
            datacatalog.ListEntriesResponse(
                entries=[],
                next_page_token="def",
            ),
            datacatalog.ListEntriesResponse(
                entries=[
                    datacatalog.Entry(),
                ],
                next_page_token="ghi",
            ),
            datacatalog.ListEntriesResponse(
                entries=[
                    datacatalog.Entry(),
                    datacatalog.Entry(),
                ],
            ),
            RuntimeError,
        )
        async_pager = await client.list_entries(
            request={},
        )
        assert async_pager.next_page_token == "abc"
        responses = []
        async for response in async_pager:  # pragma: no branch
            responses.append(response)

        assert len(responses) == 6
      assert all(isinstance(i, datacatalog.Entry) for i in responses)

E assert False
E + where False = all(<generator object test_list_entries_async_pager.. at 0x7f16cfc78ba0>)

tests/unit/gapic/datacatalog_v1/test_data_catalog.py:3978: AssertionError

PolicyTagManagerClient methods: 501 Operation is not implemented, or supported, or enabled

I'm writing a script to use the PolicyTagManagerClient, but all methods fail with a google.api_core.exceptions.MethodNotImplemented: 501 Operation is not implemented, or supported, or enabled. message.

Environment details

  • OS type and version: Windows 10
  • Python version: 3.7.2
  • pip version: 20.1.1
  • google-cloud-datacatalog version: 0.8.0

Steps to reproduce

  1. Run a script calling any of the PolicyTagManagerClient methods.

Code example

https://github.com/googleapis/python-datacatalog/pull/37/files

OR simply:

def create_taxonomy(project_id):
    """Create a Taxonomy."""

    location = datacatalog_v1beta1.PolicyTagManagerClient.location_path(project_id, 'us')

    taxonomy = types.Taxonomy()
    taxonomy.display_name = "My Taxonomy"
    taxonomy.description = "This Taxonomy represents ..."

    datacatalog_v1beta1.PolicyTagManagerClient().create_taxonomy(
        parent=location, taxonomy=taxonomy)

Stack trace

grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNIMPLEMENTED
        details = "Operation is not implemented, or supported, or enabled."
        debug_error_string = "{"created":"@1590760876.084000000","description":"Error received from peer ipv4:216.58.192.42:443","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"Operation is not implemented, or supported, or enabled.","grpc_status":12}"
>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "policy_tags_manager.py", line 118, in <module>
    PolicyTagsManagerCLI.run(sys.argv[1:] if len(sys.argv) > 0 else sys.argv)
  File "policy_tags_manager.py", line 81, in run
    args.func(args)
  File "policy_tags_manager.py", line 110, in __create_taxonomy
    description=args.description)
  File "policy_tags_manager.py", line 34, in create_taxonomy
    return self.__datacatalog_facade.create_taxonomy(project_id, display_name, description)
  File "policy_tags_manager.py", line 63, in create_taxonomy
    parent=location, taxonomy=taxonomy)
  File "<REDACTED-PATH>\gcp-datacatalog-python\env\lib\site-packages\google\cloud\datacatalog_v1beta1\gapic\policy_tag_manager_client.py", line 305, in create_taxonomy
    request, retry=retry, timeout=timeout, metadata=metadata
  File "<REDACTED-PATH>\gcp-datacatalog-python\env\lib\site-packages\google\api_core\gapic_v1\method.py", line 143, in __call__
    return wrapped_func(*args, **kwargs)
  File "<REDACTED-PATH>\gcp-datacatalog-python\env\lib\site-packages\google\api_core\retry.py", line 286, in retry_wrapped_func
    on_error=on_error,
  File "<REDACTED-PATH>\gcp-datacatalog-python\env\lib\site-packages\google\api_core\retry.py", line 184, in retry_target
    return target()
  File "<REDACTED-PATH>\gcp-datacatalog-python\env\lib\site-packages\google\api_core\timeout.py", line 214, in func_with_timeout
    return func(*args, **kwargs)
  File "<REDACTED-PATH>\gcp-datacatalog-python\env\lib\site-packages\google\api_core\grpc_helpers.py", line 59, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 3, in raise_from
google.api_core.exceptions.MethodNotImplemented: 501 Operation is not implemented, or supported, or enabled.

tests.unit.gapic.datacatalog_v1.test_policy_tag_manager: test_list_taxonomies_pager failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: a005321
buildURL: Build Status, Sponge
status: failed

Test output
transport_name = 'grpc'
def test_list_taxonomies_pager(transport_name: str = "grpc"):
    client = PolicyTagManagerClient(
        credentials=ga_credentials.AnonymousCredentials,
        transport=transport_name,
    )

    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(type(client.transport.list_taxonomies), "__call__") as call:
        # Set the response to a series of pages.
        call.side_effect = (
            policytagmanager.ListTaxonomiesResponse(
                taxonomies=[
                    policytagmanager.Taxonomy(),
                    policytagmanager.Taxonomy(),
                    policytagmanager.Taxonomy(),
                ],
                next_page_token="abc",
            ),
            policytagmanager.ListTaxonomiesResponse(
                taxonomies=[],
                next_page_token="def",
            ),
            policytagmanager.ListTaxonomiesResponse(
                taxonomies=[
                    policytagmanager.Taxonomy(),
                ],
                next_page_token="ghi",
            ),
            policytagmanager.ListTaxonomiesResponse(
                taxonomies=[
                    policytagmanager.Taxonomy(),
                    policytagmanager.Taxonomy(),
                ],
            ),
            RuntimeError,
        )

        metadata = ()
        metadata = tuple(metadata) + (
            gapic_v1.routing_header.to_grpc_metadata((("parent", ""),)),
        )
        pager = client.list_taxonomies(request={})

        assert pager._metadata == metadata

        results = list(pager)
        assert len(results) == 6
      assert all(isinstance(i, policytagmanager.Taxonomy) for i in results)

E assert False
E + where False = all(<generator object test_list_taxonomies_pager.. at 0x7f16cd918dd0>)

tests/unit/gapic/datacatalog_v1/test_policy_tag_manager.py:1688: AssertionError

Synthesis failed for python-datacatalog

Hello! Autosynth couldn't regenerate python-datacatalog. ๐Ÿ’”

Here's the output from running synth.py:

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/cloud/datacatalog/v1beta1/artman_datacatalog_v1beta1.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/datacatalog-v1beta1.
synthtool > Placed proto files into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/datacatalog-v1beta1/google/cloud/datacatalog_v1beta1/proto.
synthtool > Replaced '__doc__ = """Attributes:' in google/cloud/datacatalog_v1beta1/proto/datacatalog_pb2.py.
synthtool > Replaced '__doc__ = """Attributes:' in google/cloud/datacatalog_v1beta1/proto/tags_pb2.py.
.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 66, 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.

tests.unit.gapic.datacatalog_v1.test_data_catalog: test_list_tags_async_pager failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: a005321
buildURL: Build Status, Sponge
status: failed

Test output
@pytest.mark.asyncio
    async def test_list_tags_async_pager():
        client = DataCatalogAsyncClient(
            credentials=ga_credentials.AnonymousCredentials,
        )
    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(
        type(client.transport.list_tags), "__call__", new_callable=mock.AsyncMock
    ) as call:
        # Set the response to a series of pages.
        call.side_effect = (
            datacatalog.ListTagsResponse(
                tags=[
                    tags.Tag(),
                    tags.Tag(),
                    tags.Tag(),
                ],
                next_page_token="abc",
            ),
            datacatalog.ListTagsResponse(
                tags=[],
                next_page_token="def",
            ),
            datacatalog.ListTagsResponse(
                tags=[
                    tags.Tag(),
                ],
                next_page_token="ghi",
            ),
            datacatalog.ListTagsResponse(
                tags=[
                    tags.Tag(),
                    tags.Tag(),
                ],
            ),
            RuntimeError,
        )
        async_pager = await client.list_tags(
            request={},
        )
        assert async_pager.next_page_token == "abc"
        responses = []
        async for response in async_pager:  # pragma: no branch
            responses.append(response)

        assert len(responses) == 6
      assert all(isinstance(i, tags.Tag) for i in responses)

E assert False
E + where False = all(<generator object test_list_tags_async_pager.. at 0x7f16cdb98430>)

tests/unit/gapic/datacatalog_v1/test_data_catalog.py:7793: AssertionError

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)

Permissions error in samples testing

In this PR, samples checks are failing with PermissionDenied.

E           google.api_core.exceptions.PermissionDenied: 403 The caller does not have permission

.nox/py-3-10/lib/python3.10/site-packages/google/api_core/grpc_helpers.py:68: PermissionDenied

Synthesis failed for python-datacatalog

Hello! Autosynth couldn't regenerate python-datacatalog. ๐Ÿ’”

Here's the output from running synth.py:

beb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl
  Saved ./Jinja2-2.11.2-py2.py3-none-any.whl
Collecting MarkupSafe==1.1.1 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting protobuf==3.13.0 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 6))
  Using cached https://files.pythonhosted.org/packages/30/79/510974552cebff2ba04038544799450defe75e96ea5f1675dbf72cc8744f/protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting pypandoc==1.5 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 7))
  Using cached https://files.pythonhosted.org/packages/d6/b7/5050dc1769c8a93d3ec7c4bd55be161991c94b8b235f88bf7c764449e708/pypandoc-1.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmpfs/tmp/tmp9xnaq6i3/setuptools-tmp/setuptools/__init__.py", line 6, in <module>
        import distutils.core
      File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/_distutils_hack/__init__.py", line 82, in create_module
        return importlib.import_module('._distutils', 'setuptools')
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named 'setuptools._distutils'
    
    ----------------------------------------
 (Command "python setup.py egg_info" failed with error code 1 in /tmpfs/tmp/pip-build-1qon333m/pypandoc/
)
ERROR: no such package '@gapic_generator_python_pip_deps//': pip_import failed: Collecting click==7.1.2 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl
  Saved ./click-7.1.2-py2.py3-none-any.whl
Collecting google-api-core==1.22.1 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/e0/2d/7c6c75013105e1d2b6eaa1bf18a56995be1dbc673c38885aea31136e9918/google_api_core-1.22.1-py2.py3-none-any.whl
  Saved ./google_api_core-1.22.1-py2.py3-none-any.whl
Collecting googleapis-common-protos==1.52.0 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/03/74/3956721ea1eb4bcf7502a311fdaa60b85bd751de4e57d1943afe9b334141/googleapis_common_protos-1.52.0-py2.py3-none-any.whl
  Saved ./googleapis_common_protos-1.52.0-py2.py3-none-any.whl
Collecting jinja2==2.11.2 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl
  Saved ./Jinja2-2.11.2-py2.py3-none-any.whl
Collecting MarkupSafe==1.1.1 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting protobuf==3.13.0 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 6))
  Using cached https://files.pythonhosted.org/packages/30/79/510974552cebff2ba04038544799450defe75e96ea5f1675dbf72cc8744f/protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting pypandoc==1.5 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 7))
  Using cached https://files.pythonhosted.org/packages/d6/b7/5050dc1769c8a93d3ec7c4bd55be161991c94b8b235f88bf7c764449e708/pypandoc-1.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmpfs/tmp/tmp9xnaq6i3/setuptools-tmp/setuptools/__init__.py", line 6, in <module>
        import distutils.core
      File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/_distutils_hack/__init__.py", line 82, in create_module
        return importlib.import_module('._distutils', 'setuptools')
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named 'setuptools._distutils'
    
    ----------------------------------------
 (Command "python setup.py egg_info" failed with error code 1 in /tmpfs/tmp/pip-build-1qon333m/pypandoc/
)
INFO: Elapsed time: 2.190s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)

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-datacatalog/synth.py", line 34, 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 183, 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/cloud/datacatalog/v1:datacatalog-v1-py']' returned non-zero exit status 1.
2020-08-31 05:17:14,417 autosynth [ERROR] > Synthesis failed
2020-08-31 05:17:14,418 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 2aac68c chore: release 2.0.0 (#59)
2020-08-31 05:17:14,423 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-08-31 05:17:14,428 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 690, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 539, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 670, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 375, in synthesize_loop
    has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 273, 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.

Synthesis failed for python-datacatalog

Hello! Autosynth couldn't regenerate python-datacatalog. ๐Ÿ’”

Here's the output from running synth.py:

gle_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/cloud/datacatalog/v1/datacatalog_grpc_service_config.json:bazel-out/k8-fastbuild/bin/google/cloud/datacatalog/v1/datacatalog_py_gapic.srcjar.zip -Igoogle/cloud/datacatalog/v1/common.proto=google/cloud/datacatalog/v1/common.proto -Igoogle/cloud/datacatalog/v1/datacatalog.proto=google/cloud/datacatalog/v1/datacatalog.proto -Igoogle/cloud/datacatalog/v1/gcs_fileset_spec.proto=google/cloud/datacatalog/v1/gcs_fileset_spec.proto -Igoogle/cloud/datacatalog/v1/schema.proto=google/cloud/datacatalog/v1/schema.proto -Igoogle/cloud/datacatalog/v1/search.proto=google/cloud/datacatalog/v1/search.proto -Igoogle/cloud/datacatalog/v1/table_spec.proto=google/cloud/datacatalog/v1/table_spec.proto -Igoogle/cloud/datacatalog/v1/tags.proto=google/cloud/datacatalog/v1/tags.proto -Igoogle/cloud/datacatalog/v1/timestamps.proto=google/cloud/datacatalog/v1/timestamps.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/iam/v1/iam_policy.proto=google/iam/v1/iam_policy.proto -Igoogle/iam/v1/options.proto=google/iam/v1/options.proto -Igoogle/iam/v1/policy.proto=google/iam/v1/policy.proto -Igoogle/type/expr.proto=google/type/expr.proto -Igoogle/protobuf/empty.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/empty_proto/google/protobuf/empty.proto -Igoogle/protobuf/field_mask.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/field_mask_proto/google/protobuf/field_mask.proto -Igoogle/protobuf/timestamp.proto=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_imports/timestamp_proto/google/protobuf/timestamp.proto google/cloud/datacatalog/v1/common.proto google/cloud/datacatalog/v1/datacatalog.proto google/cloud/datacatalog/v1/gcs_fileset_spec.proto google/cloud/datacatalog/v1/schema.proto google/cloud/datacatalog/v1/search.proto google/cloud/datacatalog/v1/table_spec.proto google/cloud/datacatalog/v1/tags.proto google/cloud/datacatalog/v1/timestamps.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 30 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
google/cloud/datacatalog/v1/search.proto:21:1: warning: Import google/protobuf/timestamp.proto is unused.
Traceback (most recent call last):
  File "/home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/sandbox/linux-sandbox/4/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/4/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/4/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/4/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/4/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/4/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/4/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/4/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/cloud/datacatalog/v1:datacatalog-v1-py failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.327s, Critical Path: 0.92s
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-datacatalog/synth.py", line 34, in <module>
    include_protos=True,
  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/cloud/datacatalog/v1:datacatalog-v1-py']' returned non-zero exit status 1.
2021-01-28 05:41:43,644 autosynth [ERROR] > Synthesis failed
2021-01-28 05:41:43,644 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at dcbb907 chore: add 3.9 to noxfile template (#101)
2021-01-28 05:41:43,650 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2021-01-28 05:41:43,655 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.

tests.unit.gapic.datacatalog_v1.test_data_catalog: test_list_entry_groups_async_pager failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: a005321
buildURL: Build Status, Sponge
status: failed

Test output
@pytest.mark.asyncio
    async def test_list_entry_groups_async_pager():
        client = DataCatalogAsyncClient(
            credentials=ga_credentials.AnonymousCredentials,
        )
    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(
        type(client.transport.list_entry_groups),
        "__call__",
        new_callable=mock.AsyncMock,
    ) as call:
        # Set the response to a series of pages.
        call.side_effect = (
            datacatalog.ListEntryGroupsResponse(
                entry_groups=[
                    datacatalog.EntryGroup(),
                    datacatalog.EntryGroup(),
                    datacatalog.EntryGroup(),
                ],
                next_page_token="abc",
            ),
            datacatalog.ListEntryGroupsResponse(
                entry_groups=[],
                next_page_token="def",
            ),
            datacatalog.ListEntryGroupsResponse(
                entry_groups=[
                    datacatalog.EntryGroup(),
                ],
                next_page_token="ghi",
            ),
            datacatalog.ListEntryGroupsResponse(
                entry_groups=[
                    datacatalog.EntryGroup(),
                    datacatalog.EntryGroup(),
                ],
            ),
            RuntimeError,
        )
        async_pager = await client.list_entry_groups(
            request={},
        )
        assert async_pager.next_page_token == "abc"
        responses = []
        async for response in async_pager:  # pragma: no branch
            responses.append(response)

        assert len(responses) == 6
      assert all(isinstance(i, datacatalog.EntryGroup) for i in responses)

E assert False
E + where False = all(<generator object test_list_entry_groups_async_pager.. at 0x7f16cd980200>)

tests/unit/gapic/datacatalog_v1/test_data_catalog.py:2437: AssertionError

Synthesis failed for python-datacatalog

Hello! Autosynth couldn't regenerate python-datacatalog. ๐Ÿ’”

Please investigate and fix this issue within 5 business days. While it remains broken,
this library cannot be updated with changes to the python-datacatalog API, and the library grows
stale.

See https://github.com/googleapis/synthtool/blob/master/autosynth/TroubleShooting.md
for trouble shooting tips.

Here's the output from running synth.py:

nts sha256 = "fe995def6873fcbdc2a8764ef4bce96eb971a9d1950fe9db9be442f3c64fb3b6"
DEBUG: Call stack for the definition of repository 'gapic_generator_python' 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:278:1
INFO: SHA256 (https://github.com/googleapis/gapic-generator-go/archive/v0.18.6.tar.gz) = c0d0efba86429cee5e52baf838165b0ed7cafae1748d025abec109d25e006628
DEBUG: Rule 'com_googleapis_gapic_generator_go' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "c0d0efba86429cee5e52baf838165b0ed7cafae1748d025abec109d25e006628"
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:300:1
Loading: 0 packages loaded
Loading: 0 packages loaded
INFO: SHA256 (https://github.com/googleapis/gapic-generator-php/archive/v0.1.0.zip) = 3dffc5c34a5f35666843df04b42d6ce1c545b992f9c093a777ec40833b548d86
DEBUG: Rule 'gapic_generator_php' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "3dffc5c34a5f35666843df04b42d6ce1c545b992f9c093a777ec40833b548d86"
DEBUG: Call stack for the definition of repository 'gapic_generator_php' 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:364:1
INFO: SHA256 (https://github.com/googleapis/gapic-generator-csharp/archive/4304b1ae8684d28c92458155cd2d39e2eedc4ac7.zip) = 4db430cfb9293e4521ec8e8138f8095faf035d8e752cf332d227710d749939eb
DEBUG: Rule 'gapic_generator_csharp' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "4db430cfb9293e4521ec8e8138f8095faf035d8e752cf332d227710d749939eb"
DEBUG: Call stack for the definition of repository 'gapic_generator_csharp' 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:386:1
Loading: 0 packages loaded
INFO: SHA256 (https://github.com/googleapis/gapic-generator-ruby/archive/cc272f0905e45950873e04d3cd8df77a63f215ca.zip) = a14ec475388542f2ea70d16d75579065758acc4b99fdd6d59463d54e1a9e4499
DEBUG: Rule 'gapic_generator_ruby' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "a14ec475388542f2ea70d16d75579065758acc4b99fdd6d59463d54e1a9e4499"
DEBUG: Call stack for the definition of repository 'gapic_generator_ruby' 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:400:1
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
INFO: SHA256 (https://github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz) = 1dde365491125a3db70731e25658dfdd3bc5dbdfd11b840b3e987ecf043c7ca0
DEBUG: Rule 'bazel_skylib' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "1dde365491125a3db70731e25658dfdd3bc5dbdfd11b840b3e987ecf043c7ca0"
DEBUG: Call stack for the definition of repository 'bazel_skylib' 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:35:1
Analyzing: target //google/cloud/datacatalog/v1:datacatalog-v1-py (1 packages loaded, 0 targets configured)
Analyzing: target //google/cloud/datacatalog/v1:datacatalog-v1-py (5 packages loaded, 5 targets configured)
Analyzing: target //google/cloud/datacatalog/v1:datacatalog-v1-py (15 packages loaded, 41 targets configured)
Analyzing: target //google/cloud/datacatalog/v1:datacatalog-v1-py (16 packages loaded, 41 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'
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/cloud/datacatalog/v1:datacatalog-v1-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: 36.248s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (57 packages loaded, 2677 targets configured)
FAILED: Build did NOT complete successfully (57 packages loaded, 2677 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-datacatalog/synth.py", line 34, in <module>
    include_protos=True,
  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/cloud/datacatalog/v1:datacatalog-v1-py']' returned non-zero exit status 1.
2021-04-27 02:13:37,464 autosynth [ERROR] > Synthesis failed
2021-04-27 02:13:37,464 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 87826f7 chore: prevent normalization of semver versioning (#141)
2021-04-27 02:13:37,470 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2021-04-27 02:13:37,476 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.

AttributeError: module 'google.cloud.datacatalog_v1' has no attribute 'GetIamPolicyRequest'

As doc says https://googleapis.dev/python/datacatalog/latest/datacatalog_v1/policy_tag_manager.html

from google.cloud import datacatalog_v1

# Create a client
client = datacatalog_v1.PolicyTagManagerClient()

# Initialize request argument(s)
request = datacatalog_v1.GetIamPolicyRequest(
    resource="resource_value",
    )

Throw this error:

AttributeError: module 'google.cloud.datacatalog_v1' has no attribute 'GetIamPolicyRequest'

Im on python 3.7 and google-cloud-datacatalog==3.7.1

Samples that depend on BigQuery are not compatible with Python 3.10

google-cloud-bigquery does not yet support Python 3.10. When it does, the 3.10 samples check should turn green. For now, it is OK to merge PRs with a failing 3.10 samples check (the status check is intentionally optional).

See googleapis/python-bigquery#1006 for the status of python 3.10 support.

periodic build log

******************** TESTING PROJECTS ********************
------------------------------------------------------------
- testing samples/quickstart
------------------------------------------------------------
No user noxfile_config found: detail: No module named 'noxfile_config'
nox > Running session py-3.10
nox > Creating virtual environment (virtualenv) using python3.10 in .nox/py-3-10
nox > python -m pip install -r requirements.txt
nox > python -m pip install -r requirements-test.txt
nox > Command python -m pip install -r requirements-test.txt failed with exit code 1:
Collecting pytest==6.2.5
  Downloading pytest-6.2.5-py3-none-any.whl (280 kB)
ERROR: Could not find a version that satisfies the requirement google-cloud-bigquery==2.28.0 (from versions: 0.20.0, 0.21.0, 0.22.0, 0.22.1, 0.23.0, 0.24.0, 0.25.0, 0.26.0, 0.27.0, 0.28.0, 0.29.0, 0.30.0, 0.31.0, 0.32.0, 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.11.1, 1.11.2, 1.11.3, 1.11.4, 1.12.0, 1.12.1, 1.12.2, 1.13.0, 1.13.1, 1.14.0, 1.14.1, 1.15.0, 1.15.1, 1.16.0, 1.16.1, 1.17.0, 1.17.1, 1.18.0, 1.18.1, 1.19.0, 1.19.1, 1.20.0, 1.21.0, 1.22.0, 1.23.0, 1.23.1, 1.24.0, 1.25.0, 1.26.0, 1.26.1, 1.27.2, 1.28.0, 2.0.0, 2.1.0, 2.2.0, 2.3.1, 2.4.0, 2.5.0, 2.6.0, 2.6.1)
ERROR: No matching distribution found for google-cloud-bigquery==2.28.0
nox > Session py-3.10 failed.

GA Release

Package name: google-cloud-datacatalog
Current release: beta
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

Thanks

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.

Unable to create tag template with dictionary

Hi.
I'm working on updating to the latest version of the libraries. Previously I was using 0.8.0 and 1.0.0 where I had a similar problem, but found a simple workaround - some values as an object, but these workarounds no longer work in the newer version of the library.

In datacatalog 0.8.0, it was possible to create an tag template using a dictionary, but template fields must be passed as a TagTemplateField object.

        tag_template={
            "display_name": "Awesome Tag Template",
            "fields": {
                FIELD_NAME_1: TagTemplateField(
                    display_name="first-field", type_=dict(primitive_type="STRING")
                )
            },
        },

In a newer version, such a trick can no longer be used. If we want to create an object, we must always pass the fully typed object.

    request_good = datacatalog.CreateTagTemplateRequest(
        parent=LOCATION_PATH,
        tag_template_id=TEMPLATE_ID,
        tag_template=datacatalog.TagTemplate(
            display_name="Awesome Tag template",
            fields={
                FIELD_NAME_1: datacatalog.TagTemplateField(
                    display_name="first-field", type_=dict(primitive_type="STRING")
                )
            },
        ),
    )

However, I would expect that it would be possible to pass the object as a dictionary.

    request = dict(
        parent=LOCATION_PATH,
        tag_template_id=TEMPLATE_ID,
        tag_template=dict(
            display_name="Awesome Tag template",
            fields={FIELD_NAME_1: dict(display_name="first-field", type_=dict(primitive_type="STRING"))},
        ),
    )

As a workaround, I can convert this object on my side for now, but it would be great if the library handles it correctly.

    request = datacatalog.CreateTagTemplateRequest(
        parent=request.get("parent"),
        tag_template_id=request.get("tag_template_id"),
        tag_template=(
            datacatalog.TagTemplate(
                display_name=request.get("tag_template", {}).get("display_name"),
                fields={
                    k: datacatalog.TagTemplateField(**v)
                    for k, v in request.get("tag_template", {}).get("fields", {}).items()
                },
            )
            if request.get("tag_template")
            else None
        ),
    )

Environment details

  • OS type and version: Mac OS 11.01
  • Python version: Python 3.6.8
  • pip version: pip 20.2.4 from /Users/XXXXXXXXX/.virtualenvs/airflow/lib/python3.6/site-packages/pip (python 3.6)
  • google-cloud-datacatalog version: 3.0.0

Steps to reproduce

  1. Run code from "code example" section or full example

Code example

    request = dict(
        parent=LOCATION_PATH,
        tag_template_id=TEMPLATE_ID,
        tag_template=dict(
            display_name="Awesome Tag template",
            fields={FIELD_NAME_1: dict(display_name="first-field", type_=dict(primitive_type="STRING"))},
        ),
    )
    log.info("create_tag_template(request=%s)", request)
    tag_template = client.create_tag_template(request=request)

Full example: https://gist.github.com/mik-laj/4d2e4701b0f827dff5a712300646f024

Stack trace

Traceback (most recent call last):
  File "files/datacatalog_lookup_entry.py", line 105, in <module>
    tag_template = client.create_tag_template(request=request)
  File "/Users/X/.virtualenvs/airflow/lib/python3.6/site-packages/google/cloud/datacatalog_v1beta1/services/data_catalog/client.py", line 1582, in create_tag_template
    request = datacatalog.CreateTagTemplateRequest(request)
  File "/Users/X/.virtualenvs/airflow/lib/python3.6/site-packages/proto/message.py", line 461, in __init__
    pb_value = marshal.to_proto(pb_type, value)
  File "/Users/X/.virtualenvs/airflow/lib/python3.6/site-packages/proto/marshal/marshal.py", line 205, in to_proto
    pb_value = rule.to_proto(value)
  File "/Users/X/.virtualenvs/airflow/lib/python3.6/site-packages/proto/marshal/rules/message.py", line 32, in to_proto
    return self._descriptor(**value)
TypeError: Parameter to MergeFrom() must be instance of same class: expected google.cloud.datacatalog.v1beta1.TagTemplateField got dict.

CC: @busunkim96

Bug in list_entries()

Hi there,
I am using the Python Data Catalog API.
There seems to be a bug in the list_entries() function.

I have my parent argument as 'projects/[my-project-id]/locations/asia-southeast1/entryGroups/@bigquery'.
I get the error message

google.api_core.exceptions.InvalidArgument: 400 a non-special dataset contains '@'; The two parts of the invalid dataset id are as follows: 'project=[my-project-id], dataset=@bigquery@asia-southeast1. If you used the dotted string format for the dataset id and believe your dataset is actually valid, you may try the full resource name (projects/.../datasets/...).

It seems like the function cannot handle the special @bigquery EntryGroup?

Update samples to V1 version

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.

Is your feature request related to a problem? Please describe.
With release of V1 library, we must update the samples to instruct users to use the supported version. Right now samples are using the v1beta1 version, which might lead users to use the beta version.

**A clear and concise description of what you want to happen. **
Update samples to V1 version.
Additional context
N/A

Docs have "latest" as v1.0.0 but v2.0.0 was released 8/24

Was checking to see if #4 was resolved and noticed that the docs don't seem to have captured the latest release.

Latest release was v2.0.0 on 8/24: https://github.com/googleapis/python-datacatalog/releases/tag/v2.0.0 and on PyPi https://pypi.org/project/google-cloud-datacatalog/2.0.0/

https://googleapis.dev/python/datacatalog/latest/index.html has v1.0.0 in the drop-down menu as "latest" and doesn't seem to have the v2.0.0 listed at all, and is still exhibiting the menu nav issues described here: googleapis/python-bigquery-storage#18 which was theoretically fixed here: googleapis/gapic-generator-python#430 but possibly requires some changes to be seen.

samples.snippets.search_assets_test: test_search_assets failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 27fcefa
buildURL: Build Status, Sponge
status: failed

Test output
capsys = <_pytest.capture.CaptureFixture object at 0x7fee87386f10>
project_id = 'python-docs-samples-tests'
random_existing_tag_template_id = 'python_sample_20210927100803_a4bcca86'
def test_search_assets(capsys, project_id, random_existing_tag_template_id):
    override_values = {
        "project_id": project_id,
        "tag_template_id": random_existing_tag_template_id,
    }
    search_assets.search_assets(override_values)
    out, err = capsys.readouterr()
    assert "Results in project:" in out
  assert random_existing_tag_template_id in out

E AssertionError: assert 'python_sample_20210927100803_a4bcca86' in 'Results in project:\n'

search_assets_test.py:26: AssertionError

Issue when listing tags in different projects

Giving the following scenario, when I try to list tags for the described entry, I don't have the 2 expected results, instead, the function only returns the tag on the Tag Template B.
Tag Template A

{
	"Project-ID": "project_a",
	"Location": "us-central1",
	"Template-ID": "template_a",
	"FIELDS": ["TAG_A"]
}

Tag Template B

{
	"Project-ID": "project_b",
	"Location": "us-central1",
	"Template-ID": "template_b",
	"FIELDS": ["TAG_B"]
}

Entry

{
	"Type":	"TABLE",
	"System":	"BIGQUERY",
	"Table-Type":	"BIGQUERY_TABLE",
	"Project-ID":	"project_b",
	"Location":	"eu",
	"TAGS":
			{
				"Column":[
							{
								"ID": "column_a",
								"TAG" "TAG_A"
							},
							{
								"ID": "column_b",
								"TAG" "TAG_B"
							}
						]
			}
}

Python mocked code

client = datacatalog.DataCatalogClient()
list_tags = list(client.list_tags(entry_path))

Python Result

[
	{'name': 'projects/project_b/locations/eu/entryGroups/@bigquery/entries/entry_id/tags/tag_id',
	 'template': 'projects/project_b/locations/us-central1/tagTemplates/template_b', 
	 'fields': {
	 		'template_b': 
	 			{
	 				'displayName': 'TAG_B'
	 			}
	 		 }, 
	 'column': 'column_b', 
	 'templateDisplayName': 'template_b'
	 }
 ]

REST API Result
projects.locations.entryGroups.entries.tags.list

 [
	{'name': 'projects/project_b/locations/eu/entryGroups/@bigquery/entries/entry_id/tags/tag_id',
	 'template': 'projects/project_b/locations/us-central1/tagTemplates/template_b', 
	 'fields': {
	 		'template_b': 
	 			{
	 				'displayName': 'TAG_B'
	 			}
	 		 }, 
	 'column': 'column_b', 
	 'templateDisplayName': 'template_b'
	 },
	{'name': 'projects/project_b/locations/eu/entryGroups/@bigquery/entries/entry_id/tags/tag_id',
	 'template': 'projects/project_a/locations/us-central1/tagTemplates/template_a', 
	 'fields': {
	 		'template_a': 
	 			{
	 				'displayName': 'TAG_A'
	 			}
	 		 }, 
	 'column': 'column_a', 
	 'templateDisplayName': 'template_a'
	 }
 ]

Environment details

  • OS type and version:
  • Python version: python --version
  • pip version: pip --version
  • google-cloud-datacatalog version: pip show google-cloud-datacatalog

Steps to reproduce

  1. ?
  2. ?

Code example

# example

Stack trace

# example

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

v1beta1 is being used as the default alias instead of v1

from google.cloud import datacatalog  # this should be 'datacatalog_v1' but is actually 'datacatalog_v1beta1'
from google.cloud import datacatalog_v1beta1
from google.cloud import datacatalog_v1

https://github.com/googleapis/python-datacatalog/blob/master/google/cloud/datacatalog/__init__.py#L18

versions = ['v1', 'v1beta1']

The am planning on comparing the protos to determine if there are meaningful differences in the protos. If there are breaking changes, this would need to be done in a new major.

CC @tswast @steffnay

tests.unit.gapic.datacatalog_v1.test_data_catalog: test_list_tags_pager failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: a005321
buildURL: Build Status, Sponge
status: failed

Test output
transport_name = 'grpc'
def test_list_tags_pager(transport_name: str = "grpc"):
    client = DataCatalogClient(
        credentials=ga_credentials.AnonymousCredentials,
        transport=transport_name,
    )

    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(type(client.transport.list_tags), "__call__") as call:
        # Set the response to a series of pages.
        call.side_effect = (
            datacatalog.ListTagsResponse(
                tags=[
                    tags.Tag(),
                    tags.Tag(),
                    tags.Tag(),
                ],
                next_page_token="abc",
            ),
            datacatalog.ListTagsResponse(
                tags=[],
                next_page_token="def",
            ),
            datacatalog.ListTagsResponse(
                tags=[
                    tags.Tag(),
                ],
                next_page_token="ghi",
            ),
            datacatalog.ListTagsResponse(
                tags=[
                    tags.Tag(),
                    tags.Tag(),
                ],
            ),
            RuntimeError,
        )

        metadata = ()
        metadata = tuple(metadata) + (
            gapic_v1.routing_header.to_grpc_metadata((("parent", ""),)),
        )
        pager = client.list_tags(request={})

        assert pager._metadata == metadata

        results = list(pager)
        assert len(results) == 6
      assert all(isinstance(i, tags.Tag) for i in results)

E assert False
E + where False = all(<generator object test_list_tags_pager.. at 0x7f16cd9829d0>)

tests/unit/gapic/datacatalog_v1/test_data_catalog.py:7702: AssertionError

tests.unit.gapic.datacatalog_v1.test_data_catalog: test_search_catalog_async_pager failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: a005321
buildURL: Build Status, Sponge
status: failed

Test output
@pytest.mark.asyncio
    async def test_search_catalog_async_pager():
        client = DataCatalogAsyncClient(
            credentials=ga_credentials.AnonymousCredentials,
        )
    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(
        type(client.transport.search_catalog), "__call__", new_callable=mock.AsyncMock
    ) as call:
        # Set the response to a series of pages.
        call.side_effect = (
            datacatalog.SearchCatalogResponse(
                results=[
                    search.SearchCatalogResult(),
                    search.SearchCatalogResult(),
                    search.SearchCatalogResult(),
                ],
                next_page_token="abc",
            ),
            datacatalog.SearchCatalogResponse(
                results=[],
                next_page_token="def",
            ),
            datacatalog.SearchCatalogResponse(
                results=[
                    search.SearchCatalogResult(),
                ],
                next_page_token="ghi",
            ),
            datacatalog.SearchCatalogResponse(
                results=[
                    search.SearchCatalogResult(),
                    search.SearchCatalogResult(),
                ],
            ),
            RuntimeError,
        )
        async_pager = await client.search_catalog(
            request={},
        )
        assert async_pager.next_page_token == "abc"
        responses = []
        async for response in async_pager:  # pragma: no branch
            responses.append(response)

        assert len(responses) == 6
      assert all(isinstance(i, search.SearchCatalogResult) for i in responses)

E assert False
E + where False = all(<generator object test_search_catalog_async_pager.. at 0x7f16cda05540>)

tests/unit/gapic/datacatalog_v1/test_data_catalog.py:975: AssertionError

tests.unit.gapic.datacatalog_v1.test_policy_tag_manager: test_list_taxonomies_async_pager failed

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: a005321
buildURL: Build Status, Sponge
status: failed

Test output
@pytest.mark.asyncio
    async def test_list_taxonomies_async_pager():
        client = PolicyTagManagerAsyncClient(
            credentials=ga_credentials.AnonymousCredentials,
        )
    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(
        type(client.transport.list_taxonomies), "__call__", new_callable=mock.AsyncMock
    ) as call:
        # Set the response to a series of pages.
        call.side_effect = (
            policytagmanager.ListTaxonomiesResponse(
                taxonomies=[
                    policytagmanager.Taxonomy(),
                    policytagmanager.Taxonomy(),
                    policytagmanager.Taxonomy(),
                ],
                next_page_token="abc",
            ),
            policytagmanager.ListTaxonomiesResponse(
                taxonomies=[],
                next_page_token="def",
            ),
            policytagmanager.ListTaxonomiesResponse(
                taxonomies=[
                    policytagmanager.Taxonomy(),
                ],
                next_page_token="ghi",
            ),
            policytagmanager.ListTaxonomiesResponse(
                taxonomies=[
                    policytagmanager.Taxonomy(),
                    policytagmanager.Taxonomy(),
                ],
            ),
            RuntimeError,
        )
        async_pager = await client.list_taxonomies(
            request={},
        )
        assert async_pager.next_page_token == "abc"
        responses = []
        async for response in async_pager:  # pragma: no branch
            responses.append(response)

        assert len(responses) == 6
      assert all(isinstance(i, policytagmanager.Taxonomy) for i in responses)

E assert False
E + where False = all(<generator object test_list_taxonomies_async_pager.. at 0x7f16cd91edc0>)

tests/unit/gapic/datacatalog_v1/test_policy_tag_manager.py:1779: AssertionError

Synthesis failed for python-datacatalog

Hello! Autosynth couldn't regenerate python-datacatalog. ๐Ÿ’”

Here's the output from running synth.py:

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/cloud/datacatalog/v1beta1/artman_datacatalog_v1beta1.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/datacatalog-v1beta1.
synthtool > Placed proto files into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/datacatalog-v1beta1/google/cloud/datacatalog_v1beta1/proto.
synthtool > Replaced '__doc__ = """Attributes:' in google/cloud/datacatalog_v1beta1/proto/tags_pb2.py.
synthtool > Replaced '__doc__ = """Attributes:' in google/cloud/datacatalog_v1beta1/proto/datacatalog_pb2.py.
.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 66, 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.