- Notifications
You must be signed in to change notification settings - Fork907
chore: fix terraform/provider testdata to use latest terraform-provider#16309
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Have we validated that using version 1.x of thecoder/coder
provider still works after this change (in a template)?
🚀 Deploying PR 16309 ... |
dannykopping left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think we have a wider problem here, if we're concerned about compatibility.
$ grep coder/coder -A1 provisioner/terraform/testdata/**/*.tf -rh| grep version| sort| uniq -c 20 version ="0.22.0"
We have sprawl across our modules, although they at least all evaluate to the latest version:
$ grep coder/coder -A1**/*.tf -rh| grep version| sort| uniq -c 2 version =">= 0.11" 11 version =">= 0.12" 4 version =">= 0.12.4" 9 version =">= 0.17" 7 version =">= 0.23"
Our example templates are a bit all over the place; only 2 of the 18 example templates haveany version constraint, and the two that do:
$ grep'"coder/coder"' -A1 examples/templates/**/*.tf -rh| grep version| uniq -c 2 version ="~> 1.0.0"
willonly get patch versions on the 1.0 release (source), i.e. nothing from1.1
onwards.
I think this is a larger effort that we need to undertake.
We should either remove the version constraint from all modules/templates/testdata to always use the latest version (my preference), or add a linter to ensure they're all set to a specific version.
@defelmnq as an aside, where in this PR did you update the version to the latest? I can't see that in the changes; I just see the result.
matifali commentedJan 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
We intentionally dropped the version constraint from example templates so that we could encourage the use of the latest providers. A better option would be to set version constraints that we auto-bump when new provider versions are released. We should definitely drop support for |
We could possibly couple this to the release workflow of the provider:
WDYT@matifali ? |
I agree. This should work. We can move this as an issue to |
johnstcn commentedJan 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
For now:
|
Smoke tested as discussed together - with the following steps : ✅ Started Docker in localusing this version ✅ Defined the terraform-provider version to 1.0.0 using
in the Docker template. ✅ Built the template, started a workspace, all good. ✅ Tried to use parameters that are deprecated in >2.0.0based on that:
Worked, with a deprecated warning. (Failed later due to the example used) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for double-checking@defelmnq !
6caa29a
intomainUh oh!
There was an error while loading.Please reload this page.
provisioner/terraform/testdata current version has been generated using outdated version of terraform-provider - with some parameters that are not relevant anymore, causing
generate.sh
to fail when trying to generate new data.