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

Adding ability to send version info header on HTTP requests. #3035

Merged
merged 1 commit into from
Feb 21, 2017

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Feb 17, 2017

Added an "extra headers" feature to enable this. I am not a fan
of changing Connection() so haphazardly, but I hope to
completely re-factor / destory Connection() in the near-term
so I am less worried.

This only adds the storage and datastore header info, for the
purposes of a simple review. Once we agree on the approach,
I can add support in the other subpackages.

@dhermes dhermes added api: datastore Issues related to the Datastore API. hygiene api: storage Issues related to the Cloud Storage API. labels Feb 17, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 17, 2017
@daspecster daspecster mentioned this pull request Feb 17, 2017
3 tasks
Added an "extra headers" feature to enable this. I am not a fan
of changing `Connection()` so haphazardly, but I hope to
completely re-factor / destory `Connection()` in the near-term
so I am less worried.

This only adds the storage and datastore header info, for the
purposes of a simple review. Once we agree on the approach,
I can add support in the other subpackages.
@@ -61,6 +62,9 @@

_DISABLE_GRPC = os.getenv(DISABLE_GRPC, False)
_USE_GRPC = _HAVE_GRPC and not _DISABLE_GRPC
_DATASTORE_DIST = get_distribution('google-cloud-datastore')
_CLIENT_INFO = connection_module.CLIENT_INFO_TEMPLATE.format(
_DATASTORE_DIST.version)

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor Author

dhermes commented Feb 20, 2017

Thanks @tseaver. Will hold off for @lukesneeringer review before merging

Copy link
Contributor

@lukesneeringer lukesneeringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me. I am not clear how the where the handling for the gccl segment is when something is using GAX. I assume that is in a different PR.

@dhermes dhermes merged commit e675367 into googleapis:master Feb 21, 2017
@dhermes dhermes deleted the fix-3006 branch February 21, 2017 16:46
@dhermes
Copy link
Contributor Author

dhermes commented Feb 21, 2017

Will follow up with a PR for all other HTTP impls and then a separate PR getting this to work with GAPIC generated surfaces

richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
Adding ability to send version info header on HTTP requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. api: storage Issues related to the Cloud Storage 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