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

Don't panic when the template is not defined #598

Merged
merged 3 commits into from
Apr 2, 2024
Merged

Conversation

tobio
Copy link
Member

@tobio tobio commented Mar 27, 2024

Fixes #417

Adds a checked cast to catch the panic when the template block is nil. Also removes the duplicate code from the component_template resource to fix the same panic there.

@tobio tobio requested a review from dimuon March 27, 2024 23:34
@tobio tobio self-assigned this Mar 27, 2024
dimuon
dimuon previously approved these changes Mar 28, 2024
Copy link
Contributor

@dimuon dimuon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (does it make sense to add a test to cover the use case?)

@tobio tobio merged commit 573c2fa into main Apr 2, 2024
16 of 17 checks passed
@tobio tobio deleted the support-nil-templates branch April 2, 2024 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Panic from provider on empty template block in elasticstack_elasticsearch_index_template resource
2 participants