Skip to content
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

Preserve types in pipelines #696

Merged
merged 5 commits into from
Mar 19, 2018
Merged

Preserve types in pipelines #696

merged 5 commits into from
Mar 19, 2018

Conversation

lox
Copy link
Contributor

@lox lox commented Mar 19, 2018

In #668 we made some changes to the underlying YAML library which have caused a regression where bools, ints, floats and null get juggled to strings before being uploaded as JSON.

This passes through those types and panics if an unhandled type is encountered.

Closes #695.

@@ -293,9 +293,9 @@ func cleanupMapValue(v interface{}) interface{} {
return cleanupInterfaceArray(v)
case map[interface{}]interface{}:
return cleanupInterfaceMap(v)
case string:
case nil, bool, string, int, float64:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the change in question.

Copy link
Contributor

@ticky ticky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks good, and the new tests should cover us for this and many other cases!

@lox lox merged commit c1faf81 into master Mar 19, 2018
@keithduncan keithduncan deleted the preserve-types-in-pipelines branch September 22, 2021 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants