-
Notifications
You must be signed in to change notification settings - Fork 44
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
Fill in Parameterization Value #2202
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2202 +/- ##
==========================================
- Coverage 61.30% 60.62% -0.69%
==========================================
Files 353 354 +1
Lines 38512 46297 +7785
==========================================
+ Hits 23611 28068 +4457
- Misses 13354 16674 +3320
- Partials 1547 1555 +8 ☔ View full report in Codecov by Sentry. |
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.
Could you update the description on the PR to actually describe the change before committing so we get a more useful commit message in the git history?
// IntoArgs converts a [Value] into an [Args]. | ||
// | ||
// We can do this because [Value] is a fully resolved [Args], and so it is always possible to | ||
// go from [Value] to [Args]. |
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.
nit. I assume the reverse is true as well and we should probably have testing that validates the round trip
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.
The reverse is not true without contacting a registry and resolving the provider. Value is resolved, so it will look like this:
Value{Remote: &RemoteValue{
URL: "registry.opentofu.org/azure/alz",
Version: "0.11.1",
}}
There are many possible Args
that could resolve into Value
:
nameOnly := Args{Remote: &RemoteArgs{
Name: "azure/alz",
}}
versionRange := Value{Remote: &RemoteValue{
URL: "azure/alz",
Version: "<=0.12.0",
}}
fullySpecified := Value{Remote: &RemoteValue{
URL: "registry.opentofu.org/azure/alz",
Version: "0.11.1",
}}
For a given Value
, it can always be converted into a fully resolved Args
value.
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.
ah thanks for clarifying. (Sounds like there's still a possible round trip test, but only values -> args -> values, not args -> values -> args)
85ed620
to
786b508
Compare
This commit adds support for the new `.Parameterization` field on the schema. As part of doing so, I have moved parsing parameterization into it's own package. Fixes #2149
786b508
to
cfd70ae
Compare
This PR has been shipped in release v3.88.0. |
This commit adds support for the new
.Parameterization
field on the schema. As part ofdoing so, I have moved parsing parameterization into it's own package.
Fixes #2149