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

Fix handling of Impulse transform in Dataflow runner.

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.17.0
    • sdk-py-core
    • None

    Description

      Following pipeline fails on Dataflow runner unless we use beam_fn_api experiment.

      class NoOpDoFn(beam.DoFn):
        def process(self, element):
          return element
      
      p = beam.Pipeline(options=pipeline_options)
      _ = p | beam.Impulse() | beam.ParDo(NoOpDoFn())
      result = p.run()
      

      The reason is that we encode Impluse payload using url-escaping in [1], while Dataflow runner expects base64 encoding in non-fnapi mode. In FnApi mode, DF runner expects URL escaping.

      We should fix or reconcile the encoding in non-FnAPI path, and add a ValidatesRunner test that catches this error.

      [1] https://github.com/apache/beam/blob/12d07745835e1b9c1e824b83beeeadf63ab4b234/sdks/python/apache_beam/runners/dataflow/dataflow_runner.py#L633

      Attachments

        Issue Links

          Activity

            People

              tvalentyn Valentyn Tymofieiev
              tvalentyn Valentyn Tymofieiev
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 2h 50m
                  2h 50m