-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Adding gcloud.bigtable package. #1122
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
Conversation
|
I'm having a hard time finding my way around this - what problem are we solving? |
|
Point of this PR: Add the basic Extra helpful in this PR: In Problem to solve (thing I asked Nathaniel about): Importing gRPC in unit tests (in a Dan's solution to above problem: Make a fake |
|
@tseaver Any thoughts? @nathanielmanistaatgoogle Does my last comment clarify the purpose? |
|
It helps! I'm still not completely clear though - why bend over backwards to function in an environment in which "the gRPC core system libs are not on the What's the relationship between I'm not saying anything's wrong here; I just don't yet understand. |
|
We don't want users of This is really just a stop-gap until users can reliably install gRPC core and |
|
Okay. Then it's crazy, but once one has bought into its particular craziness, there's nothing wrong with it. Since it's a stop-gap I counsel filing a clean-up bug and including at least one |
|
RE: "crazy". I am very open to other ideas, if you have any. This just seemed like the only way to rely on an "upstream" dependency without hurting users that didn't need / want it. |
|
@tseaver WDYT here? |
|
The only other idea I have is "catch a raised |
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.
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.
|
@nathanielmanistaatgoogle "catch a raised |
|
Thanks for saying that; I think I get it now. |
Initial commit just adds the basic import time check for gRPC and testing for all possible install states. It also adds a shadowed _testing/grpc that we can use to mock the installed library for tests.
26be1c8 to
75809ae
Compare
|
@tseaver PTAL. I dropped the The |
|
LGTM |
Adding gcloud.bigtable package.
* chore: update templated files * remove duplicate config * remove duplicate config in owlbot.py instead * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * remove owtbot modification unnecessary after update * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add the replacement back but replace unit instead * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * change the order of installation * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * correct string match * correct owlbot string match * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * try a different match * use a different way to replace string --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@6702a34 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:fbbc8db67afd8b7d71bf694c5081a32da0c528eba166fbcffb3b6e56ddf907d5 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Daniel Sanche <sanche@google.com>
* fix: Fix socket leak in impersonated_credentials impersonated_credentials.Credentials.sign_bytes() created a session that wasn't closed leaking a socket. This fixes the issue by always closing the requests session after a signing request is complete. Fixes #1122
Initial commit just adds the basic import time check for gRPC and testing for all possible install states. It also adds a shadowed _testing/grpc that we can use to mock the installed library for tests.
We can discuss alternatives to mocking out
grpcimports in dhermes/gcloud-python-bigtable#10 or right here. As far as I know, there is no way to globally (i.e. between / before modules) step in front of__import__without doing some serious engineering.@nathanielmanistaatgoogle Any better ideas than this one for allowing unit tests that "depend" on grpc to run? (None of the gRPC code is ever called in unit tests, just in system tests. Though the gRPC objects get mocked out, the imports need to work so
nosedoesn't get angry.)