zero icon indicating copy to clipboard operation
zero copied to clipboard

Add GitHub binary GH to zero check

Open pmoranga opened this issue 4 years ago • 3 comments

When running zero apply, I got an error that gh binary was not available. zero check should had mentioned it.

2021/10/20 14:09:50 The following Module check(s) failed:
- Module (zero-static-site-gatsby) Missing binary(s): gh
- Module (zero-frontend-react) Missing binary(s): gh
- Module (zero-backend-go) Missing binary(s): gh
> zero check                                                                                                                                                                         <aws:wearemove>
Checking Zero Requirements...
AWS CLI		PASS		2.2.45
Kubectl		PASS		1.21.4
Terraform	PASS		1.0.7
jq		PASS		1.6.0
Git		PASS		2.33.0
Wget		PASS		1.21.2

pmoranga avatar Oct 20 '21 12:10 pmoranga

Thanks @pmoranga ! We've added this as a check inside the module mainly because if someone picked circleCI as their CICD pipeline it should not need the gh binary, but I do think it does offer a nicer experience if we do prompt it upfront, @bmonkman what do you think?

also I think we're missing the check for a minimum version which we do need a relatively new command gh secret set https://github.com/cli/cli/releases/tag/v1.4.0

davidcheung avatar Oct 20 '21 16:10 davidcheung

Yeah the disconnect here is that we've made a distinction between some core binaries you'll need to run zero itself (zero check) and the binaries required by the apply stage of the modules. Since zero check is run typically before you've even chosen which modules you want to use, we don't really have a way to query the modules for their dependencies. It may be worth adding gh because it's probably useful across many modules but this will definitely come up with other module requirements. Maybe we should add a note at the end of zero check specifically saying that certain modules may require additional binaries?

bmonkman avatar Oct 20 '21 18:10 bmonkman

To clarify: Yeah, let's add gh to the list, plus a message in zero check saying that some Zero modules may require additional binaries to be installed. Beyond that we can try to think of nicer ways to surface those dependencies. Maybe even at the end of zero init.

bmonkman avatar Oct 22 '21 22:10 bmonkman