visual-studio-codegcloudgoogle-cloud-sqlgoogle-cloud-rungoogle-cloud-code

Failed to deploy the app. Error: Violation in UpdateServiceRequest.service.template.containers[0].volume_mounts[0].mount_path: must be a valid path


I'm using Visual Studio Code with Google Cloud Code extension. When I try to use Deploy to Cloud Run with Cloud SQL connections field, I get this error:

Failed to deploy the app. Error: Violation in UpdateServiceRequest.service.template.containers[0].volume_mounts[0].mount_path: must be a valid unix absolute path.

If I delete the Cloud SQL connection entry (PROJECT_ID:REGION:INSTANCE_ID), the deploy works, but the connection fails:

django.db.utils.OperationalError: connection to server on socket "/cloudsql/PROJECT_ID:REGION:INSTANCE_ID/.s.PGSQL.5432" failed: No such file or directory

Is there a way to make the deploy work via UI? Via command line there are no errors.


Solution

  • This was a bug in the Google Cloud Code extension that has been fixed in version 1.21.8. If you reload the extension and rerun the Cloud Run deployment, you should no longer see this error.