-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use SemVer matching constraints #1266
Use SemVer matching constraints #1266
Conversation
The contributing documentation doesn't explicitly cover vendoring. If you want changes on this PR's structure please let me know |
4a68de9
to
e272564
Compare
Codecov Report
@@ Coverage Diff @@
## master #1266 +/- ##
==========================================
+ Coverage 70.00% 70.15% +0.14%
==========================================
Files 74 75 +1
Lines 5585 5596 +11
==========================================
+ Hits 3910 3926 +16
+ Misses 1312 1309 -3
+ Partials 363 361 -2
Continue to review full report at Codecov.
|
8d3d362
to
30badbe
Compare
looks like you need to rebase a bit for your changes. |
e751c22
to
b4b28a6
Compare
Was missing upstream vendor changes, got them sorted. Sorry about the inconvenience, and thank you for taking a look! |
d814d41
to
7cfa7ea
Compare
for _, version := range versions { | ||
if constraints.Check(version) { | ||
ctx.Log.Info("detected module requires version: %q", version) | ||
return version | ||
} | ||
|
||
} |
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.
Doesn't this change the implementation to basically allow more than just "=" version constraints? I don't think we want to just silently upgrade/downgrade the terraform version for a workspace based on the constraints.
Please tell me if im not understanding this correctly.
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.
@nishkrishnan This allows for us to use any version constraints supported by Terraform (which follows the SemVer spec). The expected behaviour is that I can use any of the SemVer operators allowed by Terraform and that Atlantis will use the correct version based on the SemVer constraint.
If a user wants to use an explicit version they can do that by using the =
operator. If they want to use the most recent patch version of 0.12
for example they could specify ~> 0.12.0
. You can read more in my comment on the issue.
enables mocking and testing via the interface
7cfa7ea
to
32bff6c
Compare
Any updates regarding this? Anything I can do to help? |
@TiagoJMartins I am just waiting on review, though it looks like other PR's touching the same sections have landed so I have some rebasing to do here to bring this back into a mergable state. Hopefully I can devote some cycles to this in the next few days, but I am not sure I can free many up atm. |
Use SemVer matching constraints to find the correct version of Terraform for non-explicit constraint patterns.
Fixes #1217