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

added nil check for nfs exports #22480

Conversation

awsaxeman
Copy link
Contributor

Community Note

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

Closes #22475

Output from acceptance testing:

$ make testacc TESTS=TestAccFSxOpenzfsFileSystem_rootVolume PKG=fsx
=== RUN   TestAccFSxOpenzfsFileSystem_rootVolume
=== PAUSE TestAccFSxOpenzfsFileSystem_rootVolume
=== CONT  TestAccFSxOpenzfsFileSystem_rootVolume
--- PASS: TestAccFSxOpenzfsFileSystem_rootVolume (1409.91s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/fsx        1414.120s
...

@github-actions github-actions bot added service/fsx Issues and PRs that pertain to the fsx service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. labels Jan 7, 2022
@awsaxeman
Copy link
Contributor Author

Seems problem is nfs exports returns an array with a single Null value instead just an overall Null. When iterator reaches first value it tries to read property of the null.

Add check to the loop to check if each item is a null and skip if it is.

@awsaxeman awsaxeman changed the title [wip] added nil check for nfs exports added nil check for nfs exports Jan 10, 2022
@awsaxeman awsaxeman marked this pull request as ready for review January 10, 2022 12:39
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jan 10, 2022
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 TESTS=TestAccFSxOpenzfsFileSystem_rootVolume PKG=fsx
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/fsx/... -v -count 1 -parallel 20 -run='TestAccFSxOpenzfsFileSystem_rootVolume' -timeout 180m
=== RUN   TestAccFSxOpenzfsFileSystem_rootVolume
=== PAUSE TestAccFSxOpenzfsFileSystem_rootVolume
=== CONT  TestAccFSxOpenzfsFileSystem_rootVolume
--- PASS: TestAccFSxOpenzfsFileSystem_rootVolume (1423.10s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/fsx	1426.744s

@ewbankkit
Copy link
Contributor

@awsaxeman Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit added bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. labels Jan 10, 2022
@ewbankkit ewbankkit merged commit fb6fac8 into hashicorp:main Jan 10, 2022
@github-actions github-actions bot added this to the v3.72.0 milestone Jan 10, 2022
@github-actions
Copy link

This functionality has been released in v3.72.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
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 May 27, 2022
@justinretzolk justinretzolk added the partner Contribution from a partner. label May 16, 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. partner Contribution from a partner. service/fsx Issues and PRs that pertain to the fsx service. size/M 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.

aws_fsx_openzfs_file_system runtime error: invalid memory address or nil pointer dereference
3 participants