Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add gccl metrics header to Spanner. #3045

Merged
merged 5 commits into from
Feb 22, 2017

Conversation

lukesneeringer
Copy link
Contributor

This PR adds the gccl/x.y.z portion of the metrics header in the Spanner client library.

@lukesneeringer lukesneeringer self-assigned this Feb 21, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 21, 2017
@lukesneeringer lukesneeringer added the api: spanner Issues related to the Spanner API. label Feb 21, 2017
@@ -114,7 +151,8 @@ def test_instance_admin_api(self):
client = self._make_one(project=self.PROJECT, credentials=creds)

class _Client(object):
pass
def __init__(self, *args, **kwargs):
pass

This comment was marked as spam.

This comment was marked as spam.

@@ -131,7 +169,8 @@ def test_database_admin_api(self):
client = self._make_one(project=self.PROJECT, credentials=creds)

class _Client(object):
pass
def __init__(self, *args, **kwargs):
pass

This comment was marked as spam.

@tseaver
Copy link
Contributor

tseaver commented Feb 21, 2017

The PR should also be rebased against current master to get rid of the spurious commits.

@@ -15,6 +15,10 @@
"""Cloud Spanner API package."""


import pkg_resources
__version__ = pkg_resources.get_distribution('google-cloud-spanner').version

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -179,7 +180,8 @@ def ddl_statements(self):
def spanner_api(self):
"""Helper for session-related API calls."""
if self._spanner_api is None:
self._spanner_api = SpannerClient()
self._spanner_api = SpannerClient(lib_name='gccl',
lib_version=__version__)

This comment was marked as spam.

This comment was marked as spam.

@@ -59,7 +59,7 @@

setup(
name='google-cloud-spanner',
version='0.23.1',
version='0.23.2',

This comment was marked as spam.

This comment was marked as spam.

def test_admin_api_lib_name(self):
"""Establish that the lib_name and lib_version are passed to
the database and instance API objects in the GAPIC.
"""

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

pass
def __init__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs

This comment was marked as spam.

This comment was marked as spam.

@@ -106,6 +106,43 @@ def test_constructor_credentials_wo_create_scoped(self):
expected_scopes = None
self._constructor_test_helper(expected_scopes, creds)

def test_admin_api_lib_name(self):

This comment was marked as spam.

This comment was marked as spam.

@lukesneeringer
Copy link
Contributor Author

Travis seems to be hung? Anyone know if I can do anything about this?

@daspecster
Copy link
Contributor

@lukesneeringer there isn't anything you can do about Travis AFAICT. CircleCI should have covered it though so you should be clear to merge anyway in this case.

@lukesneeringer
Copy link
Contributor Author

Okay, merging once @tseaver gives assent.

@@ -188,7 +190,10 @@ def test_spanner_api_property(self):
_client = object()
_clients = [_client]

def _mock_spanner_client():
def _mock_spanner_client(*args, **kwargs):
self.assertIsInstance(args, (list, tuple))

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Feb 22, 2017

LGTM

@tseaver
Copy link
Contributor

tseaver commented Feb 22, 2017

@lukesneeringer FWIW, your docstring-in-a-testcase here will be literally the only one in the whole codebase. If you feel that strongly about it, go ahead and merge.

@lukesneeringer
Copy link
Contributor Author

I went ahead and removed it.

@lukesneeringer lukesneeringer merged commit 5e80776 into googleapis:master Feb 22, 2017
@lukesneeringer lukesneeringer deleted the spanner-gccl branch February 22, 2017 16:22
@lukesneeringer lukesneeringer mentioned this pull request Feb 22, 2017
7 tasks
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants