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

make readme fails to call installed gomplate binary #344

Closed
jonmchan opened this issue Apr 6, 2023 · 4 comments
Closed

make readme fails to call installed gomplate binary #344

jonmchan opened this issue Apr 6, 2023 · 4 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@jonmchan
Copy link

jonmchan commented Apr 6, 2023

Describe the Bug

make readme installs gomplate to vendor/gomplate. However, when executing, https://github.com/cloudposse/build-harness/blob/master/modules/readme/Makefile#L32, the script tries to call the system version of gomplate instead of the installed version of gomplate.

For systems that do not have gomplate installed, the make readme fails. For example:

jonathanstimbp:bastion jonathan$ make readme
* Installing packages master...
Cloning into '/Users/jonathan/code/oss/bastion/build-harness/vendor/packages'...
remote: Enumerating objects: 921, done.
remote: Counting objects: 100% (921/921), done.
remote: Compressing objects: 100% (454/454), done.
remote: Total 921 (delta 316), reused 592 (delta 232), pack-reused 0
Receiving objects: 100% (921/921), 11.22 MiB | 26.42 MiB/s, done.
Resolving deltas: 100% (316/316), done.
* Installing gomplate to /Users/jonathan/code/oss/bastion/build-harness/vendor
mkdir -p -m a+rX /Users/jonathan/code/oss/bastion/build-harness/vendor
curl --retry 3 --retry-delay 5 --fail -sSL -o /Users/jonathan/code/oss/bastion/build-harness/vendor/gomplate https://github.com/hairyhenderson/gomplate/releases/download/v3.11.4/gomplate_darwin-amd64 && chmod +x /Users/jonathan/code/oss/bastion/build-harness/vendor/gomplate
make: gomplate: No such file or directory
make: *** [readme/build] Error 1

Expected Behavior

make readme should succeed, utilizing the vendor/gomplate version instead of the system version. Perhaps the PATH variables are not being properly set or the script needs to be calling the local version instead.

Steps to Reproduce

Do not have gomplate installed on the machine. Run make readme on any project.

Screenshots

No response

Environment

No response

Additional Context

No response

@jonmchan jonmchan added the bug Something isn't working label Apr 6, 2023
@github-actions
Copy link

github-actions bot commented Apr 6, 2023

Thank you for reporting the issue! If you haven't already joined our slack community, then we invite you to do so.

This is a great place to get help and ask questions from our AMAZING community.

Slack Community

@jonmchan
Copy link
Author

jonmchan commented Apr 6, 2023

Please note related issue: cloudposse/bastion#72

@max-lobur
Copy link
Contributor

max-lobur commented Apr 7, 2023

I confirmed with the team that it's a bug. We supposed to have vendor at the PATH, but it's broken somewhere. This should work outside geodesic.

@Nuru Nuru added the wontfix This will not be worked on label Aug 13, 2023
@Nuru
Copy link
Contributor

Nuru commented Aug 13, 2023

This is trickier than it may seem, because the build-harness Docker image is Linux and most people are not running this on Linux machines, which means the host binary of gomplate is incompatible with the binary build-harness would use from within the Docker container.

Solutions are to install gomplate on the host manually (e.g. brew install gomplate) or to run the make inside the build-harness Docker container. You can do this with:

make pr/readme

HOWEVER: as of this writing, both make readme and make pr/readme are deprecated for Terraform modules. Before submitting or updating a PR for a Terraform module, contributors are now requested to run:

make precommit/terraform

For modules that are not Terraform, make pr/readme is enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants