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

upgrade terraform-plugin-sdk to v2.1.0 #511

Closed
wants to merge 2 commits into from

Conversation

tdyas
Copy link
Contributor

@tdyas tdyas commented Oct 28, 2020

Upgrades terraform-plugin-sdk to v2.1.0 and switches to using the TypeSet test helpers in the SDK instead of the vendored copy of those helpers in internal/setutil.

@andrewsomething
Copy link
Member

andrewsomething commented Oct 28, 2020

Seeing a lot of failures in the acceptance tests. Quite a few data sources are erroring with:

=== CONT  TestAccDataSourceDigitalOceanImages_Basic
    datasource_digitalocean_images_test.go:23: Step 1/1 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        An execution plan has been generated and is shown below.
        Resource actions are indicated with the following symbols:
         <= read (data resources)
        
        Terraform will perform the following actions:
        
          # data.digitalocean_images.ubuntu will be read during apply
          # (config refers to values not yet known)
         <= data "digitalocean_images" "ubuntu"  {
              ~ id     = "terraform-2020102814244965780000002d" -> "terraform-2020102814245267210000002f"
              ~ images = [
                    {

This looks to be related to this change hashicorp/terraform-plugin-sdk#594

Seems like we'll need to add checks that the ID has not been previously set in places like:


There are also a number of Spaces related failures:

    resource_digitalocean_spaces_bucket_object_test.go:169: Step 1/1 error: Error running apply: 
        Error: Provider produced inconsistent result after apply
        
        When applying changes to digitalocean_spaces_bucket.object_bucket_3, provider
        "registry.terraform.io/hashicorp/digitalocean" produced an unexpected new
        value: Root resource was present, but now absent.
        
        This is a bug in the provider, which should be reported in the provider's own
        issue tracker.
        
2020/10/28 10:23:13 [INFO] DigitalOcean Client configured for URL: https://api.digitalocean.com
--- FAIL: TestAccDigitalOceanSpacesBucketObject_NonVersioned (9.37s)

These may not be related to the SDK changes. Running them w/ TF_LOG=DEBUG they look simular to #510

This was indeed separate and has been resolved.

@tdyas
Copy link
Contributor Author

tdyas commented Nov 3, 2020

At least for the digitaocean_images datasource, the plan is also showing changes for the actual data:

                 ~ {
                        created        = "2020-10-12T18:57:09Z"
                        description    = "PhpMyAdmin 5.0.3 on Ubuntu 20.04"
                        distribution   = "Ubuntu"
                        error_message  = ""
                        id             = 71628256
                        image          = "71628256"
                        min_disk_size  = 25
                        name           = "PhpMyAdmin 5.0.3 on Ubuntu 20.04"
                        private        = false
                      ~ regions        = [
                            "ams2",
                            "ams3",
                            "blr1",
                            "fra1",
                            "lon1",
                            "nyc1",
                            "nyc2",
                            "nyc3",
                            "sfo1",
                            "sfo2",
                          + "sfo3",
                            "sgp1",
                            "tor1",
                        ]
                        size_gigabytes = 2.42
                        slug           = "phpmyadmin-20-04"
                        status         = "available"
                        tags           = []
                        type           = "snapshot"
                    },

Unclear to me why sfo3 is being added as a region in this plan. The data should not have changed during the test run.

@holms
Copy link

holms commented Nov 10, 2020

Wonder if this could be related #520 because no previous version of this provider adds node pools to the cluster.

@tdyas
Copy link
Contributor Author

tdyas commented Nov 23, 2020

I'm not going to have time to complete this PR. Closing for now.

@tdyas tdyas closed this Nov 23, 2020
@andrewsomething
Copy link
Member

There is this upstream issue: hashicorp/terraform-plugin-sdk#586

The problem with the IDs for data sources only effects Terraform 0.13.x binaries. Using a Terraform 0.14.x binary, the problem is resolved. Though there no promise that it won't cause issues in future releases as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants