-
Notifications
You must be signed in to change notification settings - Fork 13
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
ImportStateVerify
fails for TypeSet
fields in terraform-plugin-testing but not terraform-plugin-sdk
#327
Comments
Hey there @trodge 👋🏻, thanks for submitting the bug and sorry you're running into an issue here. I don't have access to the CI logs posted to that linked PR, would you mind taking one/a couple of those error message logs and publishing them in this GitHub issue if possible? (I've been chatting with @SarahFrench internally, so you both may be already working on this) As for #269, that bug report didn't come to a conclusion on the specific root cause, but was closed by the reporter as one of the likely causes of the behavior were related to the upstream That being said, it would still be useful to see the exact error messages and related SDKv2 schemas, so I can recreate the bug you're experiencing and then definitively describe what's happening and whether we can actually fix it. |
Here is the error message from one of the tests:
The test makes this POST request:
Then updates with this PUT request:
With this response:
|
Alright, I pulled down the BackgroundIn both The reason that this bug is only being exposed in your testing with the new I haven't run the other tests that were failing in your CI, but I'd guess a lot of them are failing either because of the set ordering bug described above, or another related bug to the removal of "explicit refreshes" (#223). SolutionsRewriting the We also could reintroduce the explicit refresh command just for the With either solution, before applying a fix, it would be useful to know how many resources/tests are being affected by this set order bug. Workarounds
{
Config: testAccBigQueryDatasetWithOneAccess(datasetID),
},
{
ResourceName: "google_bigquery_dataset.access_test",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"labels", "terraform_labels", "access"},
}, |
terraform-plugin-testing version
Expected Behavior
Set fields should pass
ImportStateVerify
regardless of the order of elements as they do in terraform-plugin-sdk.Actual Behavior
ImportStateVerify
fails with a different ordering of the same elements in a set field.Steps to Reproduce
Run any of the tests from this list in the google provider after migrating to terraform-plugin-sdk.
References
This issue was previously closed as being caused by an upstream library, but it was never explained what the upstream issue was or why the tests pass in terraform-plugin-sdk but not in terraform-plugin-testing
#269
The text was updated successfully, but these errors were encountered: