Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go is downloaded multiple times #674

Closed
2 of 3 tasks
steinfurt opened this issue Nov 21, 2023 · 2 comments
Closed
2 of 3 tasks

Go is downloaded multiple times #674

steinfurt opened this issue Nov 21, 2023 · 2 comments

Comments

@steinfurt
Copy link

steinfurt commented Nov 21, 2023

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?

  • Not relevant, I think.

What version of the buildpack you are using?

  • The latest currently available one, v1.8.19.

If you were attempting to accomplish a task, what was it you were attempting to do?

  • Deploying a Node.js based app with this buildpack (cf push). But it also happens for other apps/buildpacks.

What did you expect to happen?

  • Go should only be downloaded once.

What was the actual behavior?

  • Go is actually downloaded twice, once during the supply step, once during the finalize step. The reason for this is that there is a small error in the line 21: Instead of [[ ! -f "${dir}/go/bin/go" ]] it should be [[ ! -f "${dir}/bin/go" ]].

Can you provide a sample app?

  • There is no need to provide a sample app, I think. But the issue can be easily reproduced with the following terminal commands:
cd scripts
export CF_STACK=cflinuxfs3
./install_go.sh
./install_go.sh

A log output with -----> Download go 1.19 appearing twice can be seen in #650.

The issue makes the errors reported in #626 and #650 more likely to appear. Of course, I could provide a PR, but since it relates to a script shared in many other buildpacks, I think this should probably be handled centrally.

Please confirm where necessary:

  • I have included a log output
  • My log includes an error message
  • I have included steps for reproduction
@brayanhenao
Copy link
Member

Thank you for bringing this issue to our attention, @steinfurt. We are addressing it by implementing a fix in the script. You can track the progress and changes in the following pull request: cloudfoundry/buildpacks-github-config#65. This update will ensure that the necessary changes are propagated across all Buildpacks.

@steinfurt
Copy link
Author

Thank you for your quick reply, @brayanhenao! Now I also know where the scripts are handled centrally... ;-)

The fix has been released as part of v1.8.21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants