-
Notifications
You must be signed in to change notification settings - Fork 1.6k
BigTable: Modify system test for new GAPIC code #5302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigTable: Modify system test for new GAPIC code #5302
Conversation
…into feature/read_rows_retry
|
@jonparrott @crwilcox I am getting error on create_cluster on system tests.
|
| ) | ||
| clusters = [] | ||
| clusters.append(instance_pb2.Cluster(name=cluster_path, | ||
| location=location_path)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/system.py
Outdated
| from test_utils.system import unique_resource_id | ||
|
|
||
|
|
||
| PROJECT_ID = 'grass-clump-479' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/system.py
Outdated
| Config.CLIENT = Client(admin=True, credentials=credentials) | ||
| else: | ||
| Config.CLIENT = Client(admin=True) | ||
| Config.CLIENT = Client(project=PROJECT_ID, admin=True) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| # raise ValueError('List instances failed in module set up.') | ||
|
|
||
| EXISTING_INSTANCES[:] = instances | ||
| EXISTING_INSTANCES[:] = instances_response.instances |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@aneepct Also, can you please rebase against the current |
|
@jonparrott @tseaver Hoping this closes the loop on a rather large series of merges on master to support GAPIC. Together with #5275, #5315 and #5283 - which add support for app profile, truncate table and initial splits on top of the GAPIC interface - this should complete the series of changes for the python beta. All have been updated to resolve the review issues found. Please let us know if any issues remain so we can turn these around quickly. Thanks again for the excellent reviews. |
| """ | ||
| return bigtable_v2.BigtableClient(channel=self._channel, | ||
| credentials=self._credentials) | ||
| return bigtable_v2.BigtableClient(channel=self._channel) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| raise ValueError('Client is not an admin client.') | ||
| return bigtable_admin_v2.BigtableTableAdminClient( | ||
| channel=self._channel, credentials=self._credentials) | ||
| channel=self._channel) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| raise ValueError('Client is not an admin client.') | ||
| return bigtable_admin_v2.BigtableInstanceAdminClient( | ||
| channel=self._channel, credentials=self._credentials) | ||
| channel=self._channel) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| number_of_bytes = 10 * 1024 * 1024 | ||
| number_of_bytes = 10 * 1024 | ||
| data = b'1' * number_of_bytes # 10MB of 1's. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| location = self._client._instance_admin_client.location_path( | ||
| self._client.project, self._cluster_location_id) | ||
| cluster = instance_pb2.Cluster(name=cluster_name, location=location, | ||
| serve_nodes=DEFAULT_SERVE_NODES) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/unit/test_client.py
Outdated
| client = self._make_one( | ||
| project=project, credentials=credentials, admin=True) | ||
| project=project, channel=channel, credentials=credentials, | ||
| admin=True) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| channel = _make_channel() | ||
| client = self._make_one(project=self.PROJECT, channel=channel) | ||
| credentials = _make_credentials() | ||
| client = self._make_one(project=self.PROJECT, credentials=credentials) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/unit/test_cluster.py
Outdated
| google.auth.credentials.Scoped): | ||
| pass | ||
|
|
||
| return mock.Mock(spec=_CredentialsWithScopes) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@tseaver Please review the recent changes |
|
@tseaver Thank you for all your help. |
|
@aneepct the tests are failing after this merge. Here is a circle build failing if you want to see what the errors are. https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/6646 |
* Provide new auto-generated layer for Bigtable. * Change bigtable_pb2 imports to use from gapic library. * Add retry for read rows * Add parameter start_inclusive to _create_row_request * Add retry for Deadline Exceeded on read rows * Refactor yield_rows retry * Add grpc google iam v1 on setup.py on bigtable * Change routing_header to use to_grpc_metadata
Modify system test for new GAPIC code