Details
-
Improvement
-
Status: Resolved
-
P2
-
Resolution: Fixed
-
None
-
None
Description
Attempting to parse complex types in PipelineOptions can have a suboptimal UX. For example, if the option type being parsed is an Instant, simply passing in:
--myInstant=2021-07-17 }}{{will fail. Instead the user must pass in --myInstant="2021-07-17", however, this is complicated by the fact that the quotes will be stripped from the arguments in many cases, requiring a user to actually pass in --myInstant='"2021-07-17"'.
This can be improved by attempting to parse the input twice, once as-is, and then trying again by automatically wrapping it in quotes.
Additionally, it's impossible to use a custom JsonDeserializer on a pipeline option property. We should allow using @JsonDeserialize on the getters to supply a custom one.