cloudfoundry / cloudfoundry/go-buildpack
"Failed to build droplet release" when go.work exists
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 85
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?
"api_version":"2.202.0"
cf version 8.2.0+fd8fbca64.2022-02-09
What version of the buildpack you are using?
1.10.8
If you were attempting to accomplish a task, what was it you were attempting to do?
cf push a Go app that uses Go module workspaces. My app had a go.work in the root of the repository that looked like:
go 1.20
use (
.
./ci/acceptance
)
The app has a manifest like:
applications:
- command: run-app
disk_quota: 256M
env:
GOPACKAGENAME: github.com/org/app
memory: 256M
name: app
What did you expect to happen?
The app is pushed and starts running.
What was the actual behavior?
The build output fails after downloading dependencies:
-----> Running: go install -tags cloudfoundry -buildmode pie .
go: downloading github.com/aws/aws-sdk-go v1.44.252
(...)
go: downloading golang.org/x/crypto v0.8.0
Failed to build droplet release: buildpack's release output invalid: yaml: line 5: could not find expected ':'
Exit status 224
BuildpackReleaseFailed - App staging failed in the buildpack release phase
When I remove the go.work file, the build completes like usual.
Please confirm where necessary:
- I have included a log output
- My log includes an error message
- I have included steps for reproduction
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure by running cf push on the supplied Go app with go.work, then compare the build output after removing go.work. Start with the go install step and the buildpack release output; done means the droplet builds and the app starts successfully with go.work present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100