-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Labels
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Bug Description
When using cloud-sql-go-connector as a dependency in vendor, can't run gcloud functions deploy due to build errors from cloud-sql-go-connector
Example code (or command)
<file>.go
package <pkg>
import (
"cloud.google.com/go/cloudsqlconn"
)
// ...go.mod
module github.com/<some>/<repo>
go 1.16
require (
cloud.google.com/go/cloudsqlconn v0.5.0
)Install as vendor
go mod vendorUpload to Cloud Function
gcloud functions deploy <Func> \
--quiet \
--entry-point <Func> \
--trigger-http \
--region us-central1 \
--runtime go116 \
--env-vars-file .env.productionStacktrace
ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: src/<some>/<repo>/vendor/github.com/<other>/<repo>/<path>/<file>.go:11:2: /workspace/src/<some>/<repo>/vendor/cloud.google.com/go/cloudsqlconn/doc.go:1: cannot parse import comment; Error ID: 2f5e35a0
How to reproduce
- Put cloudsqlconn in go.mod
- Run
go mod vendor - Import cloudsqlconn in some code
- use
gcloud functions deployto deploy the code
Environment
- OS type and version:Description:
Ubuntu 22.04 LTS - Go version:
go1.16.15 linux/arm64 - Connector version: v0.5.0
Metadata
Metadata
Assignees
Labels
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.