cloudfoundry / go-buildpack

Cloud Foundry buildpack for the Go Language
http://docs.cloudfoundry.org/buildpacks/
Apache License 2.0
82 stars 119 forks source link

Doesn't work with any stacks apart of cflinuxfs2 and cflinuxfs3 #73

Closed b10s closed 5 years ago

b10s commented 5 years ago

Seems the commit brings restriction to use only cflinuxfs2 or cflinuxfs3 stacks.

Otherwise staging will end with the following error message:

...
/tmp/buildpackdownloads/00baaa6ae45f2bb9298fa2e8f5685eb8/scripts/install_go.sh: line 17: GO_SHA256: unbound variable
...
cf-gitbot commented 5 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/163498840

The labels on this github issue will be updated when the story is started.

giner commented 5 years ago

I think I hasn't been supposed to be used with any other stacks rather than cflinuxfs2 (initially) and cflinuxfs3 (from recently).

tylerphelan commented 5 years ago

@b10s This commit would only affect the online buildpack case (cf push app -b https://github.com/cloudfoundry/go-buildpack) as it uses Go to build the buildpack from source. The buildpack also only supports cflinuxfs2 and cflinuxfs3 on master, are you using a forked version of the buildpack?

b10s commented 5 years ago

@tylerphelan we use online buildpack as you mentioned: https://github.com/cloudfoundry/go-buildpack on CF deployment which has stack foo as an alias for cflinuxfs2

ndon55555 commented 5 years ago

@b10s Where exactly are you seeing foo?

tylerphelan commented 5 years ago

@b10s what's the use case for aliasing the rootfs?

A workaround for this could be forking the buildpack and updating this line to use a different version of Go.

b10s commented 5 years ago

@tylerphelan we have old workaround to separate environments: dev, stg and pro using stacks.

Seems I'm wrong with the proposal to allow any stacks (because go-buildpack created and tested only for cflinuxfs2 and cflinuxfs3).

Would be great to have an error message: go-buildpack supports only cflinuxfs2 and cflinuxfs3 stacks instead of GO_SHA256: unbound variable.

Since the stack is not a constant value, some deployment may have different stacks, a mention in documentation why and what stack(s) supported will make usage of go-buildpack clearer.

UPD

before was:

   -----> Go Buildpack version 1.8.15
          **ERROR** Stack not supported by buildpack: required stack dev was not found
   Failed to compile droplet: Failed to run all supply scripts: exit status 10
kardolus commented 5 years ago

Hi @b10s! We fixed this on the develop branch. Would be great if you could perhaps give it a spin. No pressure.

b10s commented 5 years ago

Thanks! Seems more clear : )

          **ERROR** Unsupported stack
                    See https://docs.cloudfoundry.org/devguide/deploy-apps/stacks.html for more info
   Failed to compile droplet: Failed to run all supply scripts: exit status 1