As pointed out in #110 there is no point of calling the Google OAuth2 endpoint if we already have the service account field tied to the credentials... unless I'm missing something.
We should be returning early and skipping the overhead of the API call if we already know the IAM principal based on the credentials attribute. This is what we do already in the Cloud SQL MySQL package.
As pointed out in #110 there is no point of calling the Google OAuth2 endpoint if we already have the service account field tied to the credentials... unless I'm missing something.
https://github.com/googleapis/langchain-google-alloydb-pg-python/blob/9ce7a4bc4257d7e0fe90c1bab1740326b4c7d12f/src/langchain_google_alloydb_pg/alloydb_engine.py#L62-L75
We should be returning early and skipping the overhead of the API call if we already know the IAM principal based on the credentials attribute. This is what we do already in the Cloud SQL MySQL package.