Fix error reading remote workspace with version constraint#36356
Fix error reading remote workspace with version constraint#36356shwetamurali merged 16 commits intomainfrom
Conversation
dc706ad to
8323e45
Compare
There was a problem hiding this comment.
👋🏻 Hi Shweta! I think this PR looks good, though I've not worked on the cloud/remote backends before so needed to dig in a little.
I believe before your PR users would see a "Malformed version" error if the workspace's Terraform version is a version constraint string, and after your PR's fixes users will only get an error if their Terraform version doesn't match the version constraint ("Terraform version mismatch").
Could you please add a new test case to cover this scenario? E.g. you could set the workspace's Terraform version to something like ">= 9.9.9" and assert about the error string in TestRemote_VerifyWorkspaceTerraformVersion_workspaceErrors. However if I've overlooked existing test coverage for the problem this PR is fixing please let me know.
Also, could you please resolve the CLA issue mentioned on the PR? Thanks!
SarahFrench
left a comment
There was a problem hiding this comment.
Thanks for the test! There's an edit required in the change file, but once that's done I'm happy to approve
sebasslash
left a comment
There was a problem hiding this comment.
Really nice work! 😄
@SarahFrench's initial suggestion was fantastic. I think we can further improve our tests to make sure we have all our bases covered.
Co-authored-by: Sebastian Rivera <sebastian.rivera@hashicorp.com>
…github.com/hashicorp/terraform into shwetamurali/TF-21401_workspace_constraint
SarahFrench
left a comment
There was a problem hiding this comment.
Some small comments as I saw you'd pushed more work.
Once you're ready for review again please let me know by re-requesting review via the GitHub UI 🙇🏻
Co-authored-by: Sebastian Rivera <sebastian.rivera@hashicorp.com>
|
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. |
Implementing the functionality that exists in cloud backend to remote as well to avoid errors on certain terraform commands when a version constraint is present.
CHANGELOG entry