beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Shirley (JIRA)" <j...@apache.org>
Subject [jira] [Created] (BEAM-2434) Pipeline options are not properly validated
Date Sat, 10 Jun 2017 17:51:18 GMT
Bill Shirley created BEAM-2434:
----------------------------------

             Summary: Pipeline options are not properly validated
                 Key: BEAM-2434
                 URL: https://issues.apache.org/jira/browse/BEAM-2434
             Project: Beam
          Issue Type: Bug
          Components: sdk-py
            Reporter: Bill Shirley
            Assignee: Ahmet Altay
            Priority: Minor


Invalid argument names are not properly caught using the recommended way of parsing arguments.

For example:
{quote}
  parser = argparse.ArgumentParser()
  known_args, pipeline_args = parser.parse_known_args(argv)
  pipeline_options = PipelineOptions(pipeline_args)
  print(pipeline_options.display_data())
  p = beam.Pipeline(options=pipeline_options)
{quote}

If I call the script like this:
{quote}
python test_parallel.py --not_a_valid_arg=foo
{quote}

No error is raised. This is relatively error prone. For example, I was passing an incorrect
Dataflow arg which was causing unexpected behavior and took me quite a while to figure out
the root cause.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message