-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix(python): Register all output pcollections of a transform rather than only ones that happened to be accessed in DoOutputsTuple #37556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
… _pcolls The previous code iterated over _pcolls.items() to register composite outputs, but _pcolls is lazily populated — entries are only added when accessed via __getitem__. This caused unaccessed outputs (e.g. the main output) to be missing from the composite's registered outputs in the pipeline proto. Fix by iterating over all declared tags (_main_tag + _tags) and accessing each via __getitem__ to ensure lazy creation. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Summary of ChangesHello @hjtran, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical issue in Apache Beam's Python SDK where composite transforms returning Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
The single CI failure is unrelated to this change — it's a flaky BigQuery cloud test ( |
Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Assigning reviewers: R: @jrmccluskey for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Summary
_pcollsdictDoOutputsTupleDescription
PR #36220 changed composite output registration to iterate over
result._pcolls.items(). However,_pcollsis lazily populated — entries are only added when accessed via__getitem__. Any output that hasn't been accessed at registration time is silently missing from the composite's outputs in the pipeline proto, producing an incorrect graph with disconnected edges.Fix: Iterate over all declared tags (
_main_tag+_tags) and access each viaresult[tag], ensuring all outputs are materialized and registered regardless of prior access patterns.🤖 Generated with Claude Code