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_securitylake_data_lake: Fix panic on import #34820

Merged
merged 4 commits into from
Dec 8, 2023

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Dec 8, 2023

Description

The underlying cause was the auto-flattening of a nil string pointer into the ARN custom type.
AutoFlEx was not correctly dealing with flattening nil pointers to any primitive type into a custom type -- it always assumed that the target was the "non-custom", base type.

I foresee problems with slices and maps of custom primitive types...

Relations

Closes #34802.

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccSecurityLake_serial/DataLake' PKG=securitylake
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/securitylake/... -v -count 1 -parallel 20  -run=TestAccSecurityLake_serial/DataLake -timeout 360m
=== RUN   TestAccSecurityLake_serial
=== PAUSE TestAccSecurityLake_serial
=== CONT  TestAccSecurityLake_serial
=== RUN   TestAccSecurityLake_serial/DataLake
=== RUN   TestAccSecurityLake_serial/DataLake/lifecycle
=== RUN   TestAccSecurityLake_serial/DataLake/lifecycleUpdate
=== RUN   TestAccSecurityLake_serial/DataLake/replication
=== RUN   TestAccSecurityLake_serial/DataLake/basic
=== RUN   TestAccSecurityLake_serial/DataLake/disappears
=== RUN   TestAccSecurityLake_serial/DataLake/tags
--- PASS: TestAccSecurityLake_serial (414.81s)
    --- PASS: TestAccSecurityLake_serial/DataLake (414.81s)
        --- PASS: TestAccSecurityLake_serial/DataLake/lifecycle (61.88s)
        --- PASS: TestAccSecurityLake_serial/DataLake/lifecycleUpdate (81.90s)
        --- PASS: TestAccSecurityLake_serial/DataLake/replication (74.20s)
        --- PASS: TestAccSecurityLake_serial/DataLake/basic (82.44s)
        --- PASS: TestAccSecurityLake_serial/DataLake/disappears (48.61s)
        --- PASS: TestAccSecurityLake_serial/DataLake/tags (65.78s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/securitylake	420.475s

Another set of resources using AutoFlex to ensure no regression:

% make testacc TESTARGS='-run=TestAccS3ControlAccessGrants_serial/Grant' PKG=s3control
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3control/... -v -count 1 -parallel 20  -run=TestAccS3ControlAccessGrants_serial/Grant -timeout 360m
=== RUN   TestAccS3ControlAccessGrants_serial
=== PAUSE TestAccS3ControlAccessGrants_serial
=== CONT  TestAccS3ControlAccessGrants_serial
=== RUN   TestAccS3ControlAccessGrants_serial/Grant
=== RUN   TestAccS3ControlAccessGrants_serial/Grant/basic
=== RUN   TestAccS3ControlAccessGrants_serial/Grant/disappears
=== RUN   TestAccS3ControlAccessGrants_serial/Grant/tags
=== RUN   TestAccS3ControlAccessGrants_serial/Grant/locationConfiguration
--- PASS: TestAccS3ControlAccessGrants_serial (227.76s)
    --- PASS: TestAccS3ControlAccessGrants_serial/Grant (227.76s)
        --- PASS: TestAccS3ControlAccessGrants_serial/Grant/basic (51.24s)
        --- PASS: TestAccS3ControlAccessGrants_serial/Grant/disappears (43.03s)
        --- PASS: TestAccS3ControlAccessGrants_serial/Grant/tags (84.71s)
        --- PASS: TestAccS3ControlAccessGrants_serial/Grant/locationConfiguration (48.79s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3control	233.249s

Copy link

github-actions bot commented Dec 8, 2023

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 the size/L Managed by automation to categorize the size of a PR. label Dec 8, 2023
@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 Dec 8, 2023
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label Dec 8, 2023
@ewbankkit ewbankkit added the flex Pertains to FLatteners and EXpanders. label Dec 8, 2023
@github-actions github-actions bot removed the flex Pertains to FLatteners and EXpanders. label Dec 8, 2023
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels Dec 8, 2023
@ewbankkit ewbankkit merged commit bc1b46e into main Dec 8, 2023
43 checks passed
@ewbankkit ewbankkit deleted the b-aws-securitylake_data_lake-import.crash branch December 8, 2023 19:34
@github-actions github-actions bot added this to the v5.31.0 milestone Dec 8, 2023
github-actions bot pushed a commit that referenced this pull request Dec 8, 2023
@github-actions github-actions bot removed the bug Addresses a defect in current functionality. label Dec 15, 2023
Copy link

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

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 Jan 15, 2024
@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Feb 10, 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. crash Results from or addresses a Terraform crash or kernel panic. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. size/L Managed by automation to categorize the size of a PR. 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]: Panic when importing aws_securitylake_data_lake
2 participants