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
[BEAM-4374, BEAM-6189] Delete and remove deprecated Metrics proto #11325
Conversation
This completes the migration off of the Metrics proto to the MonitoringInfo proto.
// (Optional) Specifies that the bundle has not been completed and the | ||
// following applications need to be scheduled and executed in the future. | ||
// A runner that does not yet support residual roots MUST still check that | ||
// this is empty for correctness. | ||
repeated DelayedBundleApplication residual_roots = 2; | ||
|
||
// (Required) The list of metrics or other MonitoredState | ||
// DEPRECATED (Required) The list of metrics or other MonitoredState | ||
// collected while processing this bundle. | ||
repeated org.apache.beam.model.pipeline.v1.MonitoringInfo monitoring_infos = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these also deprecated now?
Will you be only using the bytes map now? I don't really get how this will work by looking at the ProcessBundle(Progress)Response protos. It seems like you would need the MonitoringInfo at least once to have enough metadata be able to decode the bytes and associate multiple updates together. I don't really understand the protocol that you have in mind here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plan is to go with short ids system as the one and only implementation and may not have enough time to remove these two fields before the 2.21 release.
I want to have the option to un-deprecate them or remove them after the release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm, Using ProcessBundleProgressMetadata should be called after the get the IDs, makes sense.
updateMetrics(monitoringInfosList); | ||
updateMetricsDeprecated(metrics); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this won't break existing integrations? I believe only the Python and Java SDK have moved everything to MonitoringInfos. The Go SDK has not yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go SDK has, @lostluck and I worked on the changes. See:
func monitoring(p *exec.Plan) (*fnpb.Metrics, []*ppb.MonitoringInfo, map[string][]byte) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
userMetric = metrics.getPtransformsOrThrow(stepName).getUser(0); | ||
assertThat(userMetric.getMetricName(), equalTo(metricName)); | ||
assertThat(userMetric.getCounterData().getValue(), equalTo(finalCounterValue)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You way want to add this back, if you truly cannot yet delete the deprecated metrics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which deprecated metrics are you referring to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The legacy metrics proto deleted in this PR. You may want to check with to make sure no other runner is consuming this.
CC: @HuangLED |
LGTM for Go |
LGTM overall. |
Run Python PreCommit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as a whole. There are some issues I mentioned which might be worth checking with others, but moving forward is fine with me.
// (Optional) Specifies that the bundle has not been completed and the | ||
// following applications need to be scheduled and executed in the future. | ||
// A runner that does not yet support residual roots MUST still check that | ||
// this is empty for correctness. | ||
repeated DelayedBundleApplication residual_roots = 2; | ||
|
||
// (Required) The list of metrics or other MonitoredState | ||
// DEPRECATED (Required) The list of metrics or other MonitoredState | ||
// collected while processing this bundle. | ||
repeated org.apache.beam.model.pipeline.v1.MonitoringInfo monitoring_infos = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm, Using ProcessBundleProgressMetadata should be called after the get the IDs, makes sense.
updateMetrics(monitoringInfosList); | ||
updateMetricsDeprecated(metrics); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
userMetric = metrics.getPtransformsOrThrow(stepName).getUser(0); | ||
assertThat(userMetric.getMetricName(), equalTo(metricName)); | ||
assertThat(userMetric.getCounterData().getValue(), equalTo(finalCounterValue)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The legacy metrics proto deleted in this PR. You may want to check with to make sure no other runner is consuming this.
Run Java PreCommit |
This completes the migration off of the Metrics proto to the MonitoringInfo proto.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.