Closed dnwe closed 5 years ago
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/154881427
The labels on this github issue will be updated when the story is started.
@dgodd We should not fail staging immediately if src
is detected. I'm prioritizing this as a bug.
@dnwe Sorry for the delay in action. We were wondering if you are still having this issue? And if you are, could you give us a sample app?
@dnwe We were able to reproduce this issue using one of our fixtures. When you push the app from the with glide root directory using cf p -b go_buildpack
you get the error you describe. The tricky part here is that GB apps are detected based on the existence of a src dir. We were able to resolve your issue by pushing with the following command instead cf p -b go_buildpack -p src/with_glide/
.
Let us know if this works for you, in the meantime we will work on a more descriptive error message.
@kardolus I'd raised on behalf of a customer, but I can try it out. However, I'm not sure why you'd improve the error message rather than just re-ordering the detection so that you check for the more likely package managers first like I suggested in the original post
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
?v2.92.0 && v6.32
What version of the buildpack you are using?
Latest (1.8.17 at time of writing)
If you were attempting to accomplish a task, what was it you were attempting to do?
Deploy a Go-based application using a glide.yaml, but a
src/
directory at the top-levelWhat did you expect to happen?
Successful deployment.
What was the actual behavior?
Similar to https://github.com/cloudfoundry/go-buildpack/issues/51
A quick glance at the SelectVendorTool() func in supply/supply.go#L78-L143 code shows an unusual ordering of the logic whereby it will error out as soon as it encounters a
src/
directory (which it assumes to mean someone is attempting to use the old GB package manager) despite the existence of a glide.yaml, because it doesn't check that until later.The fix for this behaviour would be to move the code around in SelectVendorTool such that glide.yaml/Godeps.json/Gopkg.toml are checked for up-front and used if available, and any other error reporting is performed afterwards.
Please confirm where necessary: