Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-12767

Improve UX of PipelineOptions parsing

Details

    • Improvement
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.34.0
    • sdk-java-core
    • 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.

      Attachments

        Activity

          People

            SteveNiemitz Steve Niemitz
            SteveNiemitz Steve Niemitz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 21h 20m
                21h 20m