You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a missing template, or a fatal code error in the go template (should be pretty simple to induce / reproduce this just by updating a file path to an invalid path, or making the code within it fail):
% make provider VERSION=ga OUTPUT_PATH="$GOPATH/src/github.com/hashicorp/terraform-provider-google" PRODUCT=artifactregistry
F1112 21:55:58.344058 52355 examples.go:300] open templates/terraform/custom_import/artifact_registry_remote_repository.go.tmpl: no such file or directory
or
F1112 21:56:23.593920 52532 examples.go:300] template: artifact_registry_repository.go.tmpl:12: function "project" not defined
the exit status 1 is reported to the terminal, however, the process continues (seemingly trying to generate the beta provider after the failure?), and amidst all the output, it's very easy to miss it.
2024/11/12 21:56:23 Generating MM output to '/Users/xxxx/go/src/github.com/hashicorp/terraform-provider-google'
2024/11/12 21:56:23 Using ga version
2024/11/12 21:56:23 Using provider
[...]
exit status 1
2024/11/12 21:56:24 Generating MM output to '/Users/wby/go/src/github.com/hashicorp/terraform-provider-google'
2024/11/12 21:56:24 Using beta version
2024/11/12 21:56:24 Using provider
[...]
2024/11/12 21:56:24 Copying common files for Terraform
2024/11/12 21:56:24 Fixing go import paths
make tpgtools
make serialize
[...]
E1112 21:56:27.849494 52613 resource.go:864] skipping "beta_basic.tf.tmpl" due to no version match
E1112 21:56:27.890417 52613 resource.go:864] skipping "storage_release.tf.tmpl" due to no version match
% echo $?
0
Assuming it's Ok to force SHELL to bash, this can be relatively easily fixed (I think) by setting SHELL=/bin/bash -eo pipefail in the GNUMakefile, however, I don't know if there are specific make targets or CI jobs this might break.
References
No response
The text was updated successfully, but these errors were encountered:
wyardley
changed the title
Fatal error not failing provider generation
Provider make target not exiting immediately or exiting non-0 on fatal build error
Nov 13, 2024
wyardley
added a commit
to wyardley/magic-modules
that referenced
this issue
Nov 13, 2024
wyardley
changed the title
Provider make target not exiting immediately or exiting non-0 on fatal build error
Provider make target not exiting immediately or exiting 0 on fatal build error
Nov 13, 2024
What kind of contribution is this issue about?
Other (specify in details)
Details
Given a missing template, or a fatal code error in the go template (should be pretty simple to induce / reproduce this just by updating a file path to an invalid path, or making the code within it fail):
or
the exit status 1 is reported to the terminal, however, the process continues (seemingly trying to generate the beta provider after the failure?), and amidst all the output, it's very easy to miss it.
Assuming it's Ok to force
SHELL
to bash, this can be relatively easily fixed (I think) by settingSHELL=/bin/bash -eo pipefail
in theGNUMakefile
, however, I don't know if there are specific make targets or CI jobs this might break.References
No response
The text was updated successfully, but these errors were encountered: