-
Notifications
You must be signed in to change notification settings - Fork 97
schema.MapAttribute struct without ElementType member causes segmentation fault #699
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
Comments
I have also wished for something slightly more graceful than a nil pointer dereference in cases like these. |
…event AttributeTypes/ElementType field panics Reference: #574 Reference: #699 Reference: #704 Reference: #705 The goal of this change is to enable easier schema validation within the framework logic. This is achieved by implementing new internal interfaces that implement shared logic across all schema types, then introduce methods on attribute types which currently implement type-specific validation logic. The new `ValidateImplementation()` methods on attribute types, while technically exported, cannot be implemented externally due to their usage of internal types. This follows the existing implementation of the framework where attribute types already cannot be extended due to the `Equal(fwschema.Attribute)` method requirement. Therefore these new `ValidateImplementation()` methods do not need to worry about compatibility promises and can be modified or removed in the future. This change also includes some breadcrumbs for other schema validation requests.
…event AttributeTypes/ElementType field panics (#706) Reference: #574 Reference: #699 Reference: #704 Reference: #705 The goal of this change is to enable easier schema validation within the framework logic. This is achieved by implementing new internal interfaces that implement shared logic across all schema types, then introduce methods on attribute types which currently implement type-specific validation logic. The new `ValidateImplementation()` methods on attribute types, while technically exported, cannot be implemented externally due to their usage of internal types. This follows the existing implementation of the framework where attribute types already cannot be extended due to the `Equal(fwschema.Attribute)` method requirement. Therefore these new `ValidateImplementation()` methods do not need to worry about compatibility promises and can be modified or removed in the future. This change also includes some breadcrumbs for other schema validation requests.
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. |
Module version
Relevant provider source code
Adding e.g.
ElementType: types.StringType,
to the schema above fixes the issue as expected.Expected Behavior
A clean runtime error thrown that the struct is missing the
ElementsAs
member.Actual Behavior
There are several more lines, but their stack trace pertains to the gRPC server and are omitted for brevity.
Steps to Reproduce
Executing an acceptance test would be the easiest reproduction step.
The text was updated successfully, but these errors were encountered: