Skip to content
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

[Fixes #18679] Ensure that usage of metrics on a template job reports an error #18905

Merged
merged 2 commits into from
Jun 6, 2022

Conversation

lukecwik
Copy link
Member

@lukecwik lukecwik commented Jun 3, 2022

Note that the usage of DataflowMetrics with a template job was throwing an NPE due to the direct access of the jobId parameter.
I also ensured that getting transform step names was accessed via a method instead of reaching into the object directly.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Add a link to the appropriate issue in your description, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

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)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

…eports an error

Note that the usage of DataflowMetrics with a template job was throwing an NPE due to the direct access of the jobId parameter.
I also ensured that getting transform step names was accessed via a method instead of reaching into the object directly.
@lukecwik
Copy link
Member Author

lukecwik commented Jun 3, 2022

R: @oleg-semenov @pranavbhandari24
CC: @an2x

This came from a user getting stuck since they were launching a flex template that was creating a classic template which tried to access metrics for a non-existent job and it manifested as an NPE.

@pranavbhandari24
Copy link
Contributor

LGTM Thanks!

@lukecwik lukecwik merged commit 9a7c9ce into apache:master Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants