-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Compose] Cast values to expected type after interpolating values #601
[Compose] Cast values to expected type after interpolating values #601
Conversation
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
3dd96e1
to
ea107b5
Compare
@@ -80,7 +76,7 @@ func recursiveInterpolate( | |||
case []interface{}: | |||
out := make([]interface{}, len(value)) | |||
for i, elem := range value { | |||
interpolatedElem, err := recursiveInterpolate(elem, mapping) | |||
interpolatedElem, err := recursiveInterpolate(elem, path, opts) |
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 maybe lists should have a []
item in the path to differentiate a path to a scalar or a path to an item in the list.
ea107b5
to
eff766d
Compare
Signed-off-by: Daniel Nephin <dnephin@docker.com>
eff766d
to
af8f563
Compare
Would be amazing to get this soon :) |
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.
LGTM
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.
LGTM 🐸
Fixes #229
Required a change to the order of operations to handle interpolation before schema validation. This should be safe because interpolation should not require any specific structure.
cc @shin-
@vdemeester sorry in advance for conflicts with #569 if this merges first