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_glue_catalog_database: fix crash expanding create_table_default_permission #40761

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Jan 3, 2025

Description

Previously a nil nested principal block could trigger a panic:

panic: interface conversion: interface {} is nil, not map[string]interface {}

Relations

Closes #40738

Output from Acceptance Testing

% make testacc PKG=glue TESTS=TestAccGlueCatalogDatabase_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/glue/... -v -count 1 -parallel 20 -run='TestAccGlueCatalogDatabase_'  -timeout 360m
2025/01/03 10:35:25 Initializing Terraform AWS Provider...

--- PASS: TestAccGlueCatalogDatabase_disappears (14.67s)
--- PASS: TestAccGlueCatalogDatabase_targetDatabaseWithRegion (24.83s)
--- PASS: TestAccGlueCatalogDatabase_createTablePermission (26.68s)
--- PASS: TestAccGlueCatalogDatabase_targetDatabase (29.36s)
--- PASS: TestAccGlueCatalogDatabase_full (35.43s)
--- PASS: TestAccGlueCatalogDatabase_tags (35.46s)
--- PASS: TestAccGlueCatalogDatabase_federatedDatabase (320.65s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/glue       325.906s

@jar-b jar-b requested a review from a team as a code owner January 3, 2025 15:43
Copy link

github-actions bot commented Jan 3, 2025

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 service/glue Issues and PRs that pertain to the glue service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Jan 3, 2025
…t_permission`

Previously a nil nested `principal` block could trigger a panic:

```
panic: interface conversion: interface {} is nil, not map[string]interface {}
```

```console
% make testacc PKG=glue TESTS=TestAccGlueCatalogDatabase_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/glue/... -v -count 1 -parallel 20 -run='TestAccGlueCatalogDatabase_'  -timeout 360m
2025/01/03 10:35:25 Initializing Terraform AWS Provider...

--- PASS: TestAccGlueCatalogDatabase_disappears (14.67s)
--- PASS: TestAccGlueCatalogDatabase_targetDatabaseWithRegion (24.83s)
--- PASS: TestAccGlueCatalogDatabase_createTablePermission (26.68s)
--- PASS: TestAccGlueCatalogDatabase_targetDatabase (29.36s)
--- PASS: TestAccGlueCatalogDatabase_full (35.43s)
--- PASS: TestAccGlueCatalogDatabase_tags (35.46s)
--- PASS: TestAccGlueCatalogDatabase_federatedDatabase (320.65s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/glue       325.906s
```
@jar-b jar-b changed the title r/aws_glue_catalog_database: fix crash expanding database_principal_permission r/aws_glue_catalog_database: fix crash expanding create_table_default_permission Jan 3, 2025
@jar-b jar-b added crash Results from or addresses a Terraform crash or kernel panic. bug Addresses a defect in current functionality. labels Jan 3, 2025
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 🚀

% make testacc PKG=glue TESTS=TestAccGlueCatalogDatabase_

make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/glue/... -v -count 1 -parallel 20 -run='TestAccGlueCatalogDatabase_'  -timeout 360m
2025/01/03 10:19:23 Initializing Terraform AWS Provider...
--- PASS: TestAccGlueCatalogDatabase_disappears (19.36s)
--- PASS: TestAccGlueCatalogDatabase_targetDatabaseWithRegion (30.01s)
--- PASS: TestAccGlueCatalogDatabase_createTablePermission (31.23s)
--- PASS: TestAccGlueCatalogDatabase_targetDatabase (33.04s)
--- PASS: TestAccGlueCatalogDatabase_full (40.08s)
--- PASS: TestAccGlueCatalogDatabase_tags (40.09s)
--- PASS: TestAccGlueCatalogDatabase_federatedDatabase (413.61s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/glue       420.082s

@jar-b jar-b merged commit f4dbe2e into main Jan 3, 2025
58 checks passed
@jar-b jar-b deleted the b-glue-crash branch January 3, 2025 16:34
@github-actions github-actions bot added this to the v5.83.0 milestone Jan 3, 2025
terraform-aws-provider bot pushed a commit that referenced this pull request Jan 3, 2025
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/glue Issues and PRs that pertain to the glue service.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: panic: interface conversion: interface {} is nil, not map[string]interface {}
2 participants