MaxonT opened a new pull request, #41751:
URL: https://github.com/apache/beam/pull/41751

   I ran a small Maven project on Beam 2.70.0 and PAssert-0 shows up as an 
unfused root with an empty URN, so this adds a paragraph about that to the 
runner guide's Working with pipelines section.
   
   Fixes #19343.
   
   ## Description
   
   The issue reports that when it traversed the pipeline of a trivial `Impulse` 
plus `PAssert.thatSingleton` test, the transform `PAssert$0` had no URN, and 
that `GreedyPipelineFuser` made the problem go away, and it asks for this to be 
written down in the runner authoring guide. Thank you to the reporter for 
writing up what the debugging looked like.
   
   This adds one paragraph to "Working with pipelines" in `runner-guide.md`: a 
composite transform can have an empty URN in its spec and only lists its 
children in `subtransforms`, an unfused pipeline can have such composites among 
its root transforms, and a runner that wants only primitives can read the 
leaves or fuse first with `GreedyPipelineFuser.fuse`. Docs only, no code 
changed.
   
   The issue does not say why the fuser helps, so the paragraph only states 
what I saw: after fusing, the roots are executable stages plus `Impulse`, 
`Flatten` and `GroupByKey`.
   
   ## How Has This Been Tested?
   
   I did not build the website. What I ran, in a separate Maven project against 
the released Beam 2.70.0 (`beam-sdks-java-core`) with the issue's pipeline 
(`Impulse.create()` followed by `PAssert.thatSingleton(result).isEqualTo(new 
byte[]{})`) translated with `PipelineTranslation.toProto`:
   
   - Unfused: two root transforms, `impulse` (URN `beam:transform:impulse:v1`) 
and `PAssert-0` (the `PAssert$0` composite) with an empty URN and 4 
subtransforms.
   - After `GreedyPipelineFuser.fuse(proto).toPipeline()`: seven roots, all 
with a URN: three `beam:runner:executable_stage:v1`, two 
`beam:transform:impulse:v1`, one `beam:transform:flatten:v1` and one 
`beam:transform:group_by_key:v1`.
   
   Not checked: 2.79.0-SNAPSHOT (the version on this branch), the Python SDK's 
translation, other pipelines than this one, and how the paragraph renders on 
the site. I did not check whether every composite has an empty URN; the 
paragraph says "can".


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to