Skip to content

Conversation

@dpcollins-google
Copy link
Contributor

@dpcollins-google dpcollins-google commented Mar 15, 2022

Also fix possibly null field

@dpcollins-google
Copy link
Contributor Author

R: @lukecwik

@dpcollins-google
Copy link
Contributor Author

R: @scwhittle

@dpcollins-google
Copy link
Contributor Author

Run Java PreCommit

@dpcollins-google dpcollins-google changed the title Catch MonitoringInfoMetricName null keys or values in the constructor [BEAM-14116] Catch MonitoringInfoMetricName null keys or values in the constructor Mar 16, 2022
@dpcollins-google
Copy link
Contributor Author

Run Java PreCommit

1 similar comment
@dpcollins-google
Copy link
Contributor Author

Run Java PreCommit

@lukecwik
Copy link
Member

CC: @robertwb

Copy link
Member

@lukecwik lukecwik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge this as is once tests are green since it is an improvement but if you do fix the nit that would be great.


@Override
public String getName() {
if (labels.containsKey(MonitoringInfoConstants.Labels.NAME)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: ditto on not looking in the map multiple times

@lukecwik
Copy link
Member

Run Java PreCommit

@lukecwik
Copy link
Member

Run Java_Examples_Dataflow_Java11 PreCommit

@lukecwik
Copy link
Member

Run Portable_Python PreCommit

@lukecwik
Copy link
Member

Run Java PreCommit

2 similar comments
@lukecwik
Copy link
Member

Run Java PreCommit

@lukecwik
Copy link
Member

Run Java PreCommit

@dpcollins-google
Copy link
Contributor Author

Run Java PreCommit

@lukecwik
Copy link
Member

Manually kicked off Java PreCommit for this PR https://ci-beam.apache.org/job/beam_PreCommit_Java_Commit/21736 because the github comments aren't making it to Jenkins

@lukecwik
Copy link
Member

Run Java PreCommit

@lukecwik
Copy link
Member

Java PreCommit finally passed

@lukecwik lukecwik merged commit 836f82e into apache:master Mar 23, 2022
@lukecwik
Copy link
Member

@youngoli It looks like this change uncovered additional cases. We thought we caught the cases where this was happening but additional integration testing within Google caught that this fails for Datastore as well. Filed https://issues.apache.org/jira/browse/BEAM-14179

nielm added a commit to nielm/beam that referenced this pull request May 4, 2022
…ecution

PR apache#16547 added handling for null ProjectIDs on command line execution,
but did not handle the possibility of null ProjectIDs in template
execution. PR apache#17094 added nullness checks in MonitoringInfoMetricNames,
which then triggered NPEs if the ProjectID was not specified during a
template execution.
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.

3 participants