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

Building Provider without the GOPATH in the $PATH #2194

Open
scottschreckengaust opened this issue Feb 6, 2025 · 3 comments · May be fixed by #2195
Open

Building Provider without the GOPATH in the $PATH #2194

scottschreckengaust opened this issue Feb 6, 2025 · 3 comments · May be fixed by #2195

Comments

@scottschreckengaust
Copy link

scottschreckengaust commented Feb 6, 2025

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

Terraform CLI and Terraform AWS Cloud Control Provider Version

N/A

Affected Resource(s)

N/A

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

N/A

Debug Output

Panic Output

Expected Behavior

follow make all from https://github.com/hashicorp/terraform-provider-awscc/blob/main/contributing/DEVELOPMENT.md without errors from main

Actual Behavior

Steps to Reproduce

  1. which goimports should not be found at the shell. If it is found, then remove it from the $PATH.
  2. make tools finishes successfully.
  3. make all after generating all the resources doesn't get past importing.
% make all
...
generating Terraform resource code for "awscc_xray_sampling_rule" from "../service/cloudformation/schemas/AWS_XRay_SamplingRule.json" into "../aws/xray/sampling_rule_resource_gen.go" and "../aws/xray/sampling_rule_resource_gen_test.go"
goimports -w internal/*/*/*_resource_gen.go
/bin/sh: line 1: goimports: command not found
make: *** [GNUmakefile:38: resources] Error 127

Important Factoids

  • The GNUMake file references the downloaded tool, goimports, which goes to the GOPATH's bin directory, and if the PATH isn't set, the tool isn't found.
  • A PR to add the @ may fix the issue goimports -> @goimports

References

  • #0000
@scottschreckengaust
Copy link
Author

Each of the make resources, make singular-data-sources, and make plural-data-sources) fail with the same:

command not found

@scottschreckengaust
Copy link
Author

I guess this is just part of requiring the echo $(go env GOPATH)/bin being in the $PATH...

@scottschreckengaust
Copy link
Author

Cut a PR that simply notifies before running through the automated generation.

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

Successfully merging a pull request may close this issue.

1 participant