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

[Bug]: TestAccBatchJobQueue_MigrateFromPluginSDK failing on v5.66.0 #39320

Closed
t0yv0 opened this issue Sep 13, 2024 · 3 comments
Closed

[Bug]: TestAccBatchJobQueue_MigrateFromPluginSDK failing on v5.66.0 #39320

t0yv0 opened this issue Sep 13, 2024 · 3 comments
Labels
bug Addresses a defect in current functionality. service/batch Issues and PRs that pertain to the batch service.

Comments

@t0yv0
Copy link
Contributor

t0yv0 commented Sep 13, 2024

Terraform Core Version

1.8.3

AWS Provider Version

5.66.0

Affected Resource(s)

  • aws_batch_job_queue

Expected Behavior

Migrating aws_batch_job_queue instances from V0 schema (SDKv2) to the current schema is no longer working. This is evidenced by the following failing acceptance test:

TF_ACC=1 go test -run TestAccBatchJobQueue_MigrateFromPluginSDK -test.v                                                          ~/code/terraform-provider-aws/internal/service/batch
=== RUN   TestAccBatchJobQueue_MigrateFromPluginSDK
=== PAUSE TestAccBatchJobQueue_MigrateFromPluginSDK
=== CONT  TestAccBatchJobQueue_MigrateFromPluginSDK
    job_queue_test.go:160: Step 2/2 error: Error running pre-apply plan: exit status 1
        
        Error: Value Conversion Error
        
          with aws_batch_job_queue.test,
          on terraform_plugin_test.tf line 110, in resource "aws_batch_job_queue" "test":
         110: resource "aws_batch_job_queue" "test" {
        
        An unexpected error was encountered trying to convert into a Terraform value.
        This is always an error in the provider. Please report the following to the
        provider developer:
        
        Cannot use attr.Value basetypes.MapValue, only tags.Map is supported because
        tags.mapType is the type in the schema
    panic.go:629: Error retrieving state, there may be dangling resources: exit status 1
        Failed to marshal state to json: schema version 0 for aws_batch_job_queue.test in state does not match version 1 from the provider
--- FAIL: TestAccBatchJobQueue_MigrateFromPluginSDK (49.14s)

Note that the test passes on 5.65.0 version of the provider.

It seems to be related to tags handling and I suspect one of these commits triggered the issue, though I have not taken the time to root cause it.

commit 5d81c01bb1a6481f021b82df1e2ec46d747bbee6
Author: Graham Davison <gdavison@hashicorp.com>
Date:   Mon Aug 12 15:13:24 2024 -0700

    Uses `tags.MapValue` for `tags_all`

commit 2b4ac7036179b159f35889d6df623e58c831cc2f
Author: Graham Davison <gdavison@hashicorp.com>
Date:   Mon Aug 12 14:16:13 2024 -0700

    Supports `null` valued tags in Framework. Implements in `batch`

commit b401ff780a19957d164fbb673582af695c85269f
Author: Graham Davison <gdavison@hashicorp.com>
Date:   Mon Aug 12 16:09:36 2024 -0700

    Adds Semgrep check for type of Tags and TagsAll fields

Actual Behavior

See failing test above.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

See failing acc test above.

Steps to Reproduce

See failing acc test above.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

@t0yv0 t0yv0 added the bug Addresses a defect in current functionality. label Sep 13, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@t0yv0 t0yv0 changed the title [Bug]: [Bug]: TestAccBatchJobQueue_MigrateFromPluginSDK failing on v5.66.0 Sep 13, 2024
@github-actions github-actions bot added service/batch Issues and PRs that pertain to the batch service. needs-triage Waiting for first response or review from a maintainer. labels Sep 13, 2024
@t0yv0
Copy link
Contributor Author

t0yv0 commented Sep 13, 2024

Looks like this duplicates #39257 which already is fixed on latest, good news.

@t0yv0 t0yv0 closed this as completed Sep 13, 2024
Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot removed the needs-triage Waiting for first response or review from a maintainer. label Sep 13, 2024
t0yv0 added a commit to pulumi/pulumi-aws that referenced this issue Sep 16, 2024
This change upgrades upstream to v5.67.0.

Fixes #4435
Fixes #4454

**v5.66.0 changes:**

Notable upstream additions:

New resources:

- datazone/environment.Environment

New functions:

- glue/getRegistry.getRegistry
- organizations/....getOrganizationalUnitDescendantOrganizationalUnits
- quicksight/getAnalysis.getAnalysis
- quicksight/getQuicksightAnalysis.getQuicksightAnalysis

Unfortunately the aws_quicksight_analysis datasource cannot yet be fully
supported in the provider because excessively large type hierarchies in
Quicksight cause issues for Pulumi SDKs. This is the same problem that
makes "definition" fields unavailable for Quicksight resources. A
solution is being explored in
#4449 but in the meantime the
"definition" field is not available yet in Pulumi for the given
datasource.

There also was a regression
hashicorp/terraform-provider-aws#39320 in
v5.66.0 that tripped pulumi-aws testing so the matching pulumi-aws
release is skipped.

**v5.67.0 changes:**

- cloudformation/stackInstances.StackInstances
- codebuild/fleet.Fleet
- computeoptimizer/enrollmentStatus.EnrollmentStatus
- computeoptimizer/recommendationPreferences.RecommendationPreferences
- costoptimizationhub/enrollmentStatus.EnrollmentStatus
- costoptimizationhub/preferences.Preferences
- datazone/assetType.AssetType
- lambda/functionRecursionConfig.FunctionRecursionConfig

New functions:

- codebuild/getFleet.getFleet

Unfortunately one of the upstream features that introduced support for
IAM role chaining is projecting as a breaking change to Pulumi types.
Since our policy is to prioritize backwards compatibility, this feature
has been backed out and is not yet available in the upcoming pulumi-aws
release.

See: hashicorp/terraform-provider-aws#22728

Reminder opened to track this in
#4459
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. service/batch Issues and PRs that pertain to the batch service.
Projects
None yet
Development

No branches or pull requests

1 participant