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_medialive_multiplex: handle read failure during delete #39498

Merged
merged 6 commits into from
Sep 26, 2024

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Sep 26, 2024

Description

  • Fixes an error which was silently swallowed by a diagnostic helper that did not append to the response Diagnostics field.
  • Fixes generated tagging tests for the aws_medialive_multiplex resource.
  • Removes unused helpers from the create package.

Output from Acceptance Testing

% make testacc PKG=medialive TESTS=TestAccMediaLive_serial/Multiplex/basic
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/medialive/... -v -count 1 -parallel 20 -run='TestAccMediaLive_serial/Multiplex/basic'  -timeout 360m

--- PASS: TestAccMediaLive_serial (129.39s)
    --- PASS: TestAccMediaLive_serial/MultiplexProgram (74.15s)
        --- PASS: TestAccMediaLive_serial/MultiplexProgram/basic (74.15s)
    --- PASS: TestAccMediaLive_serial/Multiplex (55.23s)
        --- PASS: TestAccMediaLive_serial/Multiplex/basic (55.23s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/medialive  134.612s
% make testacc PKG=medialive TESTS=TestAccMediaLive_serial/Multiplex/updateTags
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.1 test ./internal/service/medialive/... -v -count 1 -parallel 20 -run='TestAccMediaLive_serial/Multiplex/updateTags'  -timeout 360m

--- PASS: TestAccMediaLive_serial (1366.68s)
    --- PASS: TestAccMediaLive_serial/Multiplex (1366.68s)
        --- PASS: TestAccMediaLive_serial/Multiplex/updateTags (1366.68s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/ComputedTag_OnUpdate_Replace (89.24s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/EmptyTag_OnUpdate_Replace (69.56s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/ComputedTag_OnCreate (60.76s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/DefaultTags_updateToProviderOnly (70.58s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/DefaultTags_updateToResourceOnly (66.00s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/DefaultTags_nullOverlappingResourceTag (56.95s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/basic (101.66s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/EmptyTag_OnUpdate_Add (107.59s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/DefaultTags_nonOverlapping (92.64s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/DefaultTags_overlapping (93.36s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/DefaultTags_emptyResourceTag (57.71s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/ComputedTag_OnUpdate_Add (71.31s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/null (61.18s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/AddOnUpdate (70.43s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/DefaultTags_providerOnly (105.57s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/DefaultTags_nullNonOverlappingResourceTag (57.85s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/EmptyMap (62.57s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/EmptyTag_OnCreate (71.73s)
    --- PASS: TestAccMediaLive_serial/MultiplexProgram (0.00s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/medialive  1371.937s

Previously this error was silently swallowed by a diagnostic helper which did not append to the response diagnostic.

```console
% make testacc PKG=medialive TESTS=TestAccMediaLive_serial/Multiplex/basic
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/medialive/... -v -count 1 -parallel 20 -run='TestAccMediaLive_serial/Multiplex/basic'  -timeout 360m

--- PASS: TestAccMediaLive_serial (129.39s)
    --- PASS: TestAccMediaLive_serial/MultiplexProgram (74.15s)
        --- PASS: TestAccMediaLive_serial/MultiplexProgram/basic (74.15s)
    --- PASS: TestAccMediaLive_serial/Multiplex (55.23s)
        --- PASS: TestAccMediaLive_serial/Multiplex/basic (55.23s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/medialive  134.612s
```
Previously:

```
    multiplex_tags_gen_test.go:53: Step 1/8 error: Error running pre-apply plan: exit status 1
        Error: Invalid expression
          on main_gen.tf line 5, in resource "aws_medialive_multiplex" "test":
           5:   name               = %[1]q
        Expected the start of an expression, but found an invalid expression token.
    panic.go:626: Error retrieving state, there may be dangling resources: exit status 1
        Error: Invalid expression
          on main_gen.tf line 5, in resource "aws_medialive_multiplex" "test":
           5:   name               = %[1]q
        Expected the start of an expression, but found an invalid expression token.
```

```console
% make testacc PKG=medialive TESTS=TestAccMediaLive_serial/Multiplex/updateTags/basic
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.7 test ./internal/service/medialive/... -v -count 1 -parallel 20 -run='TestAccMediaLive_serial/Multiplex/updateTags/basic'  -timeout 360m

--- PASS: TestAccMediaLive_serial (102.80s)
    --- PASS: TestAccMediaLive_serial/Multiplex (102.80s)
        --- PASS: TestAccMediaLive_serial/Multiplex/updateTags (102.80s)
            --- PASS: TestAccMediaLive_serial/Multiplex/updateTags/basic (102.79s)
    --- PASS: TestAccMediaLive_serial/MultiplexProgram (0.00s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/medialive  109.524s
```
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/medialive Issues and PRs that pertain to the medialive service. create Pertains to generating names, hashcodes, etc. generators Relates to code generators. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Sep 26, 2024
@jar-b jar-b marked this pull request as ready for review September 26, 2024 19:22
@jar-b jar-b requested a review from a team as a code owner September 26, 2024 19:22
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 🚀.

@jar-b jar-b merged commit 470e2a4 into main Sep 26, 2024
46 of 47 checks passed
@jar-b jar-b deleted the td-create-DiagError branch September 26, 2024 20:34
@github-actions github-actions bot added this to the v5.69.0 milestone Sep 26, 2024
terraform-aws-provider bot pushed a commit that referenced this pull request Sep 26, 2024
Copy link

This functionality has been released in v5.69.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 Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create Pertains to generating names, hashcodes, etc. generators Relates to code generators. service/medialive Issues and PRs that pertain to the medialive 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.

2 participants