Uh oh!
There was an error while loading. Please reload this page.
DISCUSSION PR: Add __environ__ to gcloud package to augment user agent - #573
DISCUSSION PR: Add __environ__ to gcloud package to augment user agent#573dhermes wants to merge 2 commits into
Conversation
coveralls
commented
Jan 27, 2015
Changes Unknown when pulling cf58724 on dhermes:fix-566 into * on GoogleCloudPlatform:master*. |
coveralls
commented
Jan 28, 2015
Changes Unknown when pulling 5324510 on dhermes:fix-566 into * on GoogleCloudPlatform:master*. |
tseaver
commented
Jan 28, 2015
Making an HTTP request at import time is Just Wrong (TM). We should either make an instance of a class with a property which computes |
dhermes
commented
Jan 28, 2015
I like it. Will re-work with this in mind. I'm a little scared of what unit tests will look like. |
a53d2c8 to
1d4c4deCompareTemporary commit for PR googleapis#573.
coveralls
commented
Jan 29, 2015
dhermes
commented
Jan 29, 2015
@tseaver I changed to using a lazy loading property with I also debated using a default Why can't GCE be detected without an HTTP request? Bah! I'm a bit hesitant with this current approach since we have a Another thing I wanted to do: set |
tseaver
commented
Jan 29, 2015
Something like Pyramid's |
tseaver
commented
Jan 29, 2015
Maybe we should allow applications to pass in a string to be added to the agent? |
dhermes
commented
Jan 29, 2015
|
dhermes
commented
Jan 29, 2015
@tseaver PTAL. I held off on
Will cover in another PR if you're OK with that. |
coveralls
commented
Jan 29, 2015
dhermes
commented
Jan 29, 2015
Also I had to add a |
coveralls
commented
Jan 30, 2015
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
tseaver
commented
Jan 30, 2015
Deferring the "custom" agent stuff is fine by me. |
tseaver
commented
Jan 30, 2015
Or move the logic down into the |
dhermes
commented
Jan 30, 2015
We want to leave the logic outside of
I'm fine with hard-coding |
tseaver
commented
Jan 30, 2015
I was thinking more of something like this gist. |
dhermes
commented
Jan 30, 2015
|
tseaver
commented
Jan 30, 2015
Using a decorator to wrap a no-op function smells bad to me.
I was addressing #573 (comment). If there were "well known" apps which used the feature, then one might be able to pick their traffic out of the logs.
I had assumed that it would just use the value of |
dhermes
commented
Jan 30, 2015
|
tseaver
commented
Jan 30, 2015
It seemed useful to me to preserve the "library" info along with the application-specific tag.
I hadn't meant to force it at import time; rather, I would use |
dhermes
commented
Jan 30, 2015
|
Using the property on Connection instances instead of setting as a class property / attribute. Fixesgoogleapis#566.
This prevents unnecessary HTTP requests to determine if GCE is the current environment. Also updating Test__UserAgentReifyProperty with - setUp and tearDown to make sure a fresh _UserAgentReifyProperty is associated with the Connection class in every test case - test___get___access_twice test case added to test the branches in __get__ for pre-cache and post-cache states
dhermes
commented
Feb 5, 2015
coveralls
commented
Feb 5, 2015
tseaver
commented
Feb 5, 2015
Yes: the whole notion requires an instance to hold the cached computed values.
I don't care about the class, per se. I was assuming that the instance might be part of the API, assuming apps might care about using its methods in the same way that the connection does. |
* chore: Update gapic-generator-python to v1.11.2 PiperOrigin-RevId: 546510849 Source-Link: googleapis/googleapis@736073a Source-Link: googleapis/googleapis-gen@deb64e8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGViNjRlOGVjMTlkMTQxZTMxMDg5ZmU5MzJiM2E5OTdhZDU0MWM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore: exclude requirements.txt file from renovate-bot Source-Link: googleapis/synthtool@f58d313 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7a40313731a7cb1454eef6b33d3446ebb121836738dc3ab3d2d3ded5268c35b6 * update constraints files Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Fix for googleapis/python-kms#37, #566, and similar.
…573) Source-Link: googleapis/synthtool@6b4d5a6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f792ee1320e03eda2d13a5281a2989f7ed8a9e50b73ef6da97fac7e1e850b149 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
See #566.
This should not be merged (uses lots of
pragma: NO COVER), it is just a quick and dirty way to go about it.The App Engine import is innocuous, but the Compute Engine metadata server HTTP should not happen every single time
gcloudis imported (or any sub-package / sub-module). This is the thing I want to discuss.