Add gccl metrics header to Spanner.#3045
Conversation
spanner/unit_tests/test_client.py
Outdated
| class _Client(object): | ||
| pass | ||
| def __init__(self, *args, **kwargs): | ||
| pass |
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.
spanner/unit_tests/test_client.py
Outdated
| class _Client(object): | ||
| pass | ||
| def __init__(self, *args, **kwargs): | ||
| pass |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
The PR should also be rebased against current |
1f06db0 to
a8169f2
Compare
|
|
||
|
|
||
| import pkg_resources | ||
| __version__ = pkg_resources.get_distribution('google-cloud-spanner').version |
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
spanner/unit_tests/test_client.py
Outdated
| 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.
Sorry, something went wrong.
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.
| pass | ||
| def __init__(self, *args, **kwargs): | ||
| self.args = args | ||
| self.kwargs = kwargs |
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.
| 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
ad8590a to
87b2c55
Compare
|
Travis seems to be hung? Anyone know if I can do anything about this? |
|
@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. |
|
Okay, merging once @tseaver gives assent. |
spanner/unit_tests/test_database.py
Outdated
|
|
||
| def _mock_spanner_client(): | ||
| def _mock_spanner_client(*args, **kwargs): | ||
| self.assertIsInstance(args, (list, tuple)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
LGTM |
|
@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. |
|
I went ahead and removed it. |
This PR adds the
gccl/x.y.zportion of the metrics header in the Spanner client library.