remove processContext usage across examples (java and kotlin)#37937
Conversation
|
Warning Gemini encountered an error creating the summary. You can try again by commenting |
f81c66f to
2853484
Compare
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
dccb795 to
b4eee42
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request modernizes Apache Beam DoFn methods across various examples and documentation by replacing legacy ProcessContext and OnTimerContext with modern parameter injection (e.g., @Element, @Timestamp, OutputReceiver). Feedback includes several corrections to the new SKILL.md documentation regarding typos, syntax errors in code examples, and formatting. Additionally, several instances of redundant local variable assignments in the Java examples were identified where the injected @Element parameter could be used directly.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request modernizes Apache Beam DoFn methods across various Java and Kotlin examples by replacing legacy context objects with modern parameter injection, as outlined in the newly added SKILL.md. The review feedback identifies several improvement opportunities where local variables redundantly copy injected parameters or where generic parameter names could be replaced with more descriptive ones to enhance code clarity and align with the new best practices.
|
Assigning reviewers: R: @kennknowles for label java. 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). |
kennknowles
left a comment
There was a problem hiding this comment.
This is great. This is really helpful for users and LLM training to eliminate code that is in a style we don't encourage.
Remove legacy processContext usage across and replace it with argument provider
Starting with examples for java and kotlin.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.