-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Fix empty retry_strategy of Batch JobDefinition causing panics #37500
Fix empty retry_strategy of Batch JobDefinition causing panics #37500
Conversation
Computing whether a Batch JobDefinition has a diff panics if the `retry_strategy` is empty. This is a valid configuration because all properties of `retry_strategy` are optional. This patch fixes that by adding the missing nil checks for the retry strategy. Fixes hashicorp#37349
Community NoteVoting for Prioritization
For Submitters
|
Thank you for your contribution! 🚀 Please note that the Remove any changes to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @flostadler 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
Any updates on this expected closure date? |
After merging the latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
% make testacc PKG=batch TESTS=TestAccBatchJobDefinition_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/batch/... -v -count 1 -parallel 20 -run='TestAccBatchJobDefinition_' -timeout 360m
--- PASS: TestAccBatchJobDefinition_createTypeMultiNodeWithContainerProperties (11.08s)
=== CONT TestAccBatchJobDefinition_tags_DefaultTags_updateToProviderOnly
--- PASS: TestAccBatchJobDefinition_createTypeContainerWithNodeProperties (11.46s)
=== CONT TestAccBatchJobDefinition_tags_DefaultTags_overlapping
--- PASS: TestAccBatchJobDefinition_propagateTags (33.43s)
=== CONT TestAccBatchJobDefinition_tags_DefaultTags_nonOverlapping
--- PASS: TestAccBatchJobDefinition_NodeProperties_basic (36.10s)
=== CONT TestAccBatchJobDefinition_tags_DefaultTags_providerOnly
--- PASS: TestAccBatchJobDefinition_ContainerProperties_EmptyField (36.12s)
=== CONT TestAccBatchJobDefinition_tags_ComputedTag_OnCreate
--- PASS: TestAccBatchJobDefinition_PlatformCapabilities_ec2 (36.17s)
=== CONT TestAccBatchJobDefinition_basic
--- PASS: TestAccBatchJobDefinition_schedulingPriority (36.17s)
=== CONT TestAccBatchJobDefinition_tags_ComputedTag_OnUpdate_Replace
--- PASS: TestAccBatchJobDefinition_EKSProperties_basic (36.31s)
=== CONT TestAccBatchJobDefinition_tags_ComputedTag_OnUpdate_Add
=== CONT TestAccBatchJobDefinition_tags_DefaultTags_nullOverlappingResourceTag
--- PASS: TestAccBatchJobDefinition_EKSProperties_imagePullSecrets (39.72s)
--- PASS: TestAccBatchJobDefinition_emptyRetryStrategy (39.78s)
=== CONT TestAccBatchJobDefinition_tags_DefaultTags_nullNonOverlappingResourceTag
--- PASS: TestAccBatchJobDefinition_PlatformCapabilities_fargate (41.95s)
=== CONT TestAccBatchJobDefinition_tags_DefaultTags_emptyProviderOnlyTag
--- PASS: TestAccBatchJobDefinition_PlatformCapabilitiesFargate_containerPropertiesDefaults (46.02s)
=== CONT TestAccBatchJobDefinition_tags_DefaultTags_emptyResourceTag
--- PASS: TestAccBatchJobDefinition_tags_DefaultTags_updateToResourceOnly (67.24s)
=== CONT TestAccBatchJobDefinition_disappears
--- PASS: TestAccBatchJobDefinition_NodeProperties_advanced (67.24s)
=== CONT TestAccBatchJobDefinition_tags_EmptyTag_OnCreate
--- PASS: TestAccBatchJobDefinition_tags_EmptyTag_OnUpdate_Replace (70.38s)
=== CONT TestAccBatchJobDefinition_tags_EmptyTag_OnUpdate_Add
--- PASS: TestAccBatchJobDefinition_basic (41.66s)
=== CONT TestAccBatchJobDefinition_tags_AddOnUpdate
--- PASS: TestAccBatchJobDefinition_tags_DefaultTags_updateToProviderOnly (67.10s)
=== CONT TestAccBatchJobDefinition_tags_null
--- PASS: TestAccBatchJobDefinition_EKSProperties_update (80.64s)
--- PASS: TestAccBatchJobDefinition_tags_ComputedTag_OnCreate (47.72s)
--- PASS: TestAccBatchJobDefinition_tags_DefaultTags_nullOverlappingResourceTag (44.31s)
--- PASS: TestAccBatchJobDefinition_tags_DefaultTags_nullNonOverlappingResourceTag (45.94s)
--- PASS: TestAccBatchJobDefinition_tags_DefaultTags_emptyProviderOnlyTag (45.18s)
--- PASS: TestAccBatchJobDefinition_tags_DefaultTags_emptyResourceTag (44.20s)
--- PASS: TestAccBatchJobDefinition_disappears (27.87s)
--- PASS: TestAccBatchJobDefinition_attributes (100.44s)
--- PASS: TestAccBatchJobDefinition_tags_ComputedTag_OnUpdate_Replace (67.18s)
--- PASS: TestAccBatchJobDefinition_tags_ComputedTag_OnUpdate_Add (67.97s)
--- PASS: TestAccBatchJobDefinition_tags_DefaultTags_overlapping (97.55s)
--- PASS: TestAccBatchJobDefinition_tags_null (34.30s)
--- PASS: TestAccBatchJobDefinition_ContainerProperties_minorUpdate (113.97s)
--- PASS: TestAccBatchJobDefinition_tags_EmptyTag_OnCreate (50.25s)
--- PASS: TestAccBatchJobDefinition_tags_AddOnUpdate (40.85s)
--- PASS: TestAccBatchJobDefinition_tags (120.48s)
--- PASS: TestAccBatchJobDefinition_tags_DefaultTags_nonOverlapping (87.12s)
--- PASS: TestAccBatchJobDefinition_ContainerProperties_advanced (126.55s)
--- PASS: TestAccBatchJobDefinition_tags_EmptyTag_OnUpdate_Add (57.24s)
--- PASS: TestAccBatchJobDefinition_tags_DefaultTags_providerOnly (96.35s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/batch 138.602s
Thanks for your contribution, @flostadler! 👍 |
This functionality has been released in v5.62.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
Computing whether a Batch JobDefinition has a diff panics if the
retry_strategy
is empty.This is a valid configuration because all properties of
retry_strategy
are optional.This patch fixes that by adding the missing nil checks for the retry strategy.
Relations
Closes #37349
References
Output from Acceptance Testing