-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Always install the latest plugin versions for Terraform tests #11447
Conversation
/test pull-kops-verify-terraform |
will this mean we no longer catch situations where we use a recently-added field for a terraform resource but forget to update the minimum provider version to match? kops/upup/pkg/fi/cloudup/terraform/target_hcl2.go Lines 102 to 117 in c3cd96b
|
Should still respect the constraints, but upgrade the plugins cached on dev machines to latest allowed.
|
Should we have the tests always specify the lowest provider versions? |
Test twice, once with oldest and once with newest? |
This is how I noticed that it doesn't work. It failed all tests for me this morning because the AWS provider was too old locally and it didn't what to do. Had to add this change to work. |
/retest |
I'm not sure I understand why it would have failed for you. If you had a version < 3.34.0 cached locally, I would expect I do like the idea of testing twice, once with the oldest and once with the newest. I'm not sure how easily we can do that though, it might require editing the required_providers block to use |
This is how it behaves for me: > terraform init
Initializing the backend...
Initializing provider plugins...
- Reusing previous version of hashicorp/aws from the dependency lock file
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider hashicorp/aws:
locked provider registry.terraform.io/hashicorp/aws 3.31.0 does not match
configured version constraint >= 3.34.0; must use terraform init -upgrade to
allow selection of new versions |
ah, that makes (a bit) more sense. does |
Yup :) |
but using |
Yes, will download the latest 3.X, but it's the same as what the automated test does.
|
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.
you're right that this preserves the existing functionality of the prow job so I'm inclined to merge as-is and if we can add more testing in a separate PR with =
instead of >=
that would be ideal.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rifelpet The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @rifelpet