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

Fix bug in aws_datasync_task #35778

Merged
merged 5 commits into from
Feb 14, 2024
Merged

Fix bug in aws_datasync_task #35778

merged 5 commits into from
Feb 14, 2024

Conversation

bruceharrison1984
Copy link
Contributor

@bruceharrison1984 bruceharrison1984 commented Feb 12, 2024

Description

This fixes 2 bugs:

  • One could cause a complete plugin crash due to accessing an uninitialized object in the AWS read response
    • This would occur in the flattenTaskReportConfigReportOverrides method
  • Leaving a report_override property blank could cause empty quotes to be sent in certain circumstances
    • This would cause validation failures on the AWS side, preventing the resource from being created.
    • This would occur in the expandTaskReportOverrides method

A third change was made in the docs to highlight how setting report_override to the same value as the report default would cause changes to always be detected.

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 size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/datasync Issues and PRs that pertain to the datasync service. labels Feb 12, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 12, 2024
@bruceharrison1984 bruceharrison1984 marked this pull request as ready for review February 12, 2024 22:52
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Feb 13, 2024
@jar-b jar-b self-assigned this Feb 14, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Feb 14, 2024
Copy link
Member

@jar-b jar-b 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 PKG=datasync TESTS=TestAccDataSyncTask_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/datasync/... -v -count 1 -parallel 20 -run='TestAccDataSyncTask_'  -timeout 360m

--- PASS: TestAccDataSyncTask_DefaultSyncOptions_gid (205.36s)
=== CONT  TestAccDataSyncTask_DefaultSyncOptions_bytesPerSecond
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_posixPermissions (218.69s)
=== CONT  TestAccDataSyncTask_DefaultSyncOptions_uid
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_logLevel (224.08s)
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_taskQueueing (226.86s)
--- PASS: TestAccDataSyncTask_disappears (229.44s)
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_transferMode (232.27s)
--- PASS: TestAccDataSyncTask_basic (234.39s)
--- PASS: TestAccDataSyncTask_schedule (246.85s)
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_atimeMtime (264.94s)
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_objectTags (266.16s)
--- PASS: TestAccDataSyncTask_excludes (291.31s)
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_preserveDeletedFiles (300.60s)
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_overwriteMode (312.83s)
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_verifyMode (322.92s)
--- PASS: TestAccDataSyncTask_tags (329.34s)
--- PASS: TestAccDataSyncTask_includes (329.36s)
--- PASS: TestAccDataSyncTask_taskReportConfig (358.14s)
--- PASS: TestAccDataSyncTask_cloudWatchLogGroupARN (358.73s)
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_bytesPerSecond (163.96s)
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_uid (166.33s)
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_preserveDevices (582.20s)
--- PASS: TestAccDataSyncTask_DefaultSyncOptions_securityDescriptorCopyFlags (3689.55s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/datasync   3696.642s

@jar-b
Copy link
Member

jar-b commented Feb 14, 2024

Thank you for your contribution, @bruceharrison1984! 👍

@jar-b jar-b merged commit 46a7e24 into hashicorp:main Feb 14, 2024
40 checks passed
@github-actions github-actions bot added this to the v5.37.0 milestone Feb 14, 2024
@bruceharrison1984 bruceharrison1984 deleted the datasync-task-fix branch February 15, 2024 15:26
Copy link

This functionality has been released in v5.37.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!

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Feb 15, 2024
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. service/datasync Issues and PRs that pertain to the datasync service. size/M Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants