The auth.default() does not pick up the correct user project when running on Vertex Pipelines or CustomJobs #924
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
🚨
This issue needs some love.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Usually the Vertex SDK gets the project ID automatically (by calling
google.auth.default()
). This works when running on GKE, GCE, Kubeflow Pipelines etc.However when running on Google Cloud Vertex Pipelines or Vertex Training CustomJobs, the detected project is not the user project and is not usable.
This leads to failure when trying to create any resource in the project:
Here
gbd40bc90c7804989-tp
is NOT the correct user project.Fortunately there is a way to get project number from the Vertex environment. There is also a way to get project ID from the project number.
Inferring project number
Getting project ID:
Environment details
google-auth
version: 2.3.3Steps to reproduce
google.auth.default()
See: googleapis/python-aiplatform#852
The text was updated successfully, but these errors were encountered: