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

Breaking change: SDK v2 #42

Merged
merged 6 commits into from
Oct 8, 2020
Merged

Breaking change: SDK v2 #42

merged 6 commits into from
Oct 8, 2020

Conversation

kmoe
Copy link
Member

@kmoe kmoe commented May 12, 2020

closes #38

Upgrade SDK to v2.0.3

Enable binary acceptance test driver with reattach testing.

Absolute paths are now required for local filesystem resources created and checked during tests; use temporary directories for this purpose.

  • Match scaffolding provider directory layout
  • Remove outdated website targets in Makefile
  • Update Go version for development and CI

@kmoe kmoe requested review from aeschright and a team May 12, 2020 00:16
@ghost ghost added the size/XXL label May 12, 2020
@kmoe kmoe force-pushed the acctest-absolute-fixture-paths branch from 146f270 to a808802 Compare May 12, 2020 00:32
kmoe added 2 commits August 7, 2020 20:20
Absolute paths are now required for local filesystem resources created and checked during tests.
@kmoe kmoe force-pushed the acctest-absolute-fixture-paths branch from a808802 to 7bb1fcc Compare August 7, 2020 19:23
@kmoe kmoe changed the title Enable binary acceptance testing Breaking change: SDK v2 Oct 2, 2020
@kmoe
Copy link
Member Author

kmoe commented Oct 2, 2020

This PR has been repurposed as the SDKv2 upgrade, as that supersedes the earlier upgrade to binary testing.

@kmoe kmoe requested review from paultyng and removed request for paultyng October 5, 2020 13:34
@kmoe
Copy link
Member Author

kmoe commented Oct 7, 2020

The acceptance test failure is due to a bug introduced in Terraform 0.13, in which data sources with references to resources get evaluated too early.

With Terraform 0.11.0 and 0.12.20, the following config produces a file called local_file on terraform apply:

resource "local_file" "file" {
  content  = "This is some content"
  filename = "local_file"
}
data "local_file" "file" {
  filename = "${local_file.file.filename}"
}

With Terraform 0.13.3, terraform apply produces the following error:

❤ @up ➜  localdata  terraform apply

Error: open local_file: no such file or directory

  on main.tf line 5, in data "local_file" "file":
   5: data "local_file" "file" {

I think this is fixed in hashicorp/terraform#26458, not yet released. In any case, the problem is fixed in terraform built from 78322d5843daf76b72d6023a39094642f8d69886. Our options are:

  1. Wait until the fix is in latest stable Terraform 0.13 release, at which point the acc tests will pass as the latest stable version is automatically pulled in.
  2. Update this provider's CI to use that git ref to build the version of Terraform used in tests (and remove that later).
  3. Remove or change the test so it doesn't trigger this bug.

@paultyng, I'm happy with (1), but if we want to get this merged soon then (3) is probably more sensible.

@kmoe kmoe merged commit f8ddba4 into master Oct 8, 2020
@kmoe kmoe deleted the acctest-absolute-fixture-paths branch October 8, 2020 19:14
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable new binary acceptance test driver
2 participants