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

r/aws_sesv2_configuration: Fix delivery_options.max_delivery_seconds handling #40670

Conversation

kamilturek
Copy link
Collaborator

Description

This PR fixes a bug when MaxDeliverySeconds was included in the API request even if not set in the configuration.

Relations

Closes #40591.

References

https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_DeliveryOptions.html#SES-Type-DeliveryOptions-MaxDeliverySeconds

Output from Acceptance Testing

% make testacc PKG=sesv2 ACCTEST_PARALLELISM=1 TESTARGS="-run=TestAccSESV2ConfigurationSet_deliveryOptions"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/sesv2/... -v -count 1 -parallel 1  -run=TestAccSESV2ConfigurationSet_deliveryOptions -timeout 360m
2024/12/21 16:22:19 Initializing Terraform AWS Provider...
=== RUN   TestAccSESV2ConfigurationSet_deliveryOptions
=== PAUSE TestAccSESV2ConfigurationSet_deliveryOptions
=== CONT  TestAccSESV2ConfigurationSet_deliveryOptions
--- PASS: TestAccSESV2ConfigurationSet_deliveryOptions (39.83s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/sesv2      44.954s

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/sesv2 Issues and PRs that pertain to the sesv2 service. needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Dec 21, 2024
@stefanfreitag
Copy link
Contributor

Hi @kamilturek,

thanks for raising the pull request!

I did a bit of manual testing and expandDeliveryOptions is one place to update, it resolves the issue when creating the resource. Resource updates still failed. We may need to review/ update resourceConfigurationSetUpdate, too.

@kamilturek kamilturek force-pushed the b-aws-sesv2-configuration-set-max-delivery-seconds branch from b860032 to 498679b Compare December 22, 2024 13:32
@kamilturek
Copy link
Collaborator Author

Hey @stefanfreitag! Good point. This should be now fixed. Thanks.

@kamilturek kamilturek marked this pull request as ready for review December 22, 2024 13:51
@kamilturek kamilturek requested a review from a team as a code owner December 22, 2024 13:51
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Dec 23, 2024
@ewbankkit ewbankkit self-assigned this Dec 23, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Dec 23, 2024
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccSESV2ConfigurationSet_deliveryOptions' PKG=sesv2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/sesv2/... -v -count 1 -parallel 20  -run=TestAccSESV2ConfigurationSet_deliveryOptions -timeout 360m
2024/12/23 08:19:23 Initializing Terraform AWS Provider...
=== RUN   TestAccSESV2ConfigurationSet_deliveryOptions
=== PAUSE TestAccSESV2ConfigurationSet_deliveryOptions
=== CONT  TestAccSESV2ConfigurationSet_deliveryOptions
--- PASS: TestAccSESV2ConfigurationSet_deliveryOptions (29.42s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/sesv2	34.933s

Copy link
Contributor

@johnsonaj johnsonaj left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ewbankkit ewbankkit merged commit af1f67a into hashicorp:main Dec 23, 2024
35 checks passed
@ewbankkit
Copy link
Contributor

@kamilturek Thanks for the contribution 🎉 👏.

@github-actions github-actions bot added this to the v5.83.0 milestone Dec 23, 2024
@kamilturek kamilturek deleted the b-aws-sesv2-configuration-set-max-delivery-seconds branch December 23, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-maintainer Contribution from a trusted external contributor. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/sesv2 Issues and PRs that pertain to the sesv2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: SES configuration set required deliveryOptions.maxDeliverySeconds
4 participants