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

WIP: replace aiohttp.ClientSession with AlloyDBAdminAsyncClient #416

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rhatgadkar-goog
Copy link
Collaborator

No description provided.

@@ -126,7 +126,7 @@ def cover(session):
def default(session, path):
# Install all test dependencies, then install this package in-place.
session.install("-r", "requirements-test.txt")
session.install("-e", ".")
session.install(".")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Getting the following error if using session.install("-e", "."):

ImportError while loading conftest '/usr/local/google/home/rhatgadkar/alloydb-python-connector/tests/unit/conftest.py'.
tests/unit/conftest.py:22: in <module>
    from mocks import FakeAlloyDBClient
tests/unit/mocks.py:33: in <module>
    from google.cloud.alloydb.connector.connection_info import ConnectionInfo
E   ModuleNotFoundError: No module named 'google.cloud.alloydb.connector'

Maybe there’s a conflict with the google-cloud-alloydb-connector package when installing the google-cloud-alloydb package. But when changing to session.install("."), this error doesn’t occur anymore.

@rhatgadkar-goog
Copy link
Collaborator Author

When trying to connect to an instance using this PR’s change, am getting the following error:

google.api_core.exceptions.RetryError: Timeout of 60.0s exceeded, last exception: 503 DNS resolution failed for https://alloydb.googleapis.com: C-ares status is not ARES_SUCCESS qtype=A name=https
 is_balancer=0: Domain name not found

Followed the work-around in telepresenceio/telepresence#1871 to use "native" GRPC DNS resolver, but still getting similar error:

google.api_core.exceptions.RetryError: Timeout of 60.0s exceeded, last exception: 503 DNS resolution failed for https://alloydb.googleapis.com: UNKNOWN: getaddrinfo("https://alloydb.googleapis.com"): Servname not supported for ai_socktype (-8)

Need to figure out how to resolve this error. Maybe it's related to the options we're passing when constructing AlloyDBAdminAsyncClient.

@rhatgadkar-goog
Copy link
Collaborator Author

When trying to connect to an instance using this PR’s change, am getting the following error:

google.api_core.exceptions.RetryError: Timeout of 60.0s exceeded, last exception: 503 DNS resolution failed for https://alloydb.googleapis.com: C-ares status is not ARES_SUCCESS qtype=A name=https
 is_balancer=0: Domain name not found

Followed the work-around in telepresenceio/telepresence#1871 to use "native" GRPC DNS resolver, but still getting similar error:

google.api_core.exceptions.RetryError: Timeout of 60.0s exceeded, last exception: 503 DNS resolution failed for https://alloydb.googleapis.com: UNKNOWN: getaddrinfo("https://alloydb.googleapis.com"): Servname not supported for ai_socktype (-8)

Need to figure out how to resolve this error. Maybe it's related to the options we're passing when constructing AlloyDBAdminAsyncClient.

Issue is now fixed in latest commit. When passing in the API endpoint in the ClientOptions object, the "https://" prefix needs to be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to generated AlloyDBAdminAsyncClient over aiohttp.ClientSession
1 participant