-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
google_dataproc_job panic in flatten/expand #11212
google_dataproc_job panic in flatten/expand #11212
Comments
From a quick triage I think we can just change this line to be I was able to repro the issue by changing this block to be
haven't tested the change, but did a bit of triage. |
Closing this as it should be fixed by the linked PRs |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
TF v1.0.3
google v4.11.0
google-beta 4.11.0
Affected Resource(s)
google_dataproc_job
Terraform Configuration Files
Debug Output
This happens in the dataproc job and also in the workflow template, in both expand and flatten function for, for example, the logging config.
In short, providers shouldn't crash for any reason, but in this case it looks like the provider is struggling with what the service could be sending back. The issue is presenting itself in similar ways in other resources (this is -beta):
#10280
What we know from the error is that:
The provider is expecting there to be a map of strings and found nothing. That happens here, in code that hasn't been modified in 4 years:
https://github.com/hashicorp/terraform-provider-google/blame/master/google/utils.go#L323
What this code tells us is that there is an
m[0]
, but the contents ofm[0]
isnil
. That call is coming from here, in code that again hasn't been modified in 4 years:https://github.com/hashicorp/terraform-provider-google/blame/master/google/resource_dataproc_job.go#L541
What this tells us is that it pertains to the
logging_config
argument to the resource. The implication is that there is a logging config, but it's empty and therefore producingnil
.They might be able to work around this by changing the value of their logging_config argument in the resource configuration.
Panic Output
Expected Behavior
The short version is that there appears to be a code generation issue in the google provider where an array/slice is checked for one entry (length == 0), and, if there is one, it is accessed. However, the entry is
nil
so the provider panics.Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: