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

[BEAM-4374, BEAM-6189] Delete and remove deprecated Metrics proto #11325

Merged
merged 1 commit into from Apr 7, 2020

Conversation

lukecwik
Copy link
Member

@lukecwik lukecwik commented Apr 6, 2020

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:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, 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.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- Build Status --- --- Build Status
Java Build Status Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
--- Build Status
Build Status
Build Status
Build Status
Build Status
--- --- Build Status
XLang --- --- --- Build Status --- --- Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status
Build Status
Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

This completes the migration off of the Metrics proto to the MonitoringInfo proto.
@lukecwik
Copy link
Member Author

lukecwik commented Apr 6, 2020

R: @Ardagan @lostluck
CC: @ajamato

// (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;
Copy link

@ajamato ajamato Apr 6, 2020

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.

Copy link
Member Author

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.

Copy link

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);
Copy link

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

Copy link
Member Author

@lukecwik lukecwik Apr 6, 2020

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) {

Copy link

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));
}
Copy link

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

Copy link
Member Author

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?

Copy link

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.

@lukecwik
Copy link
Member Author

lukecwik commented Apr 6, 2020

CC: @HuangLED

@lostluck
Copy link
Contributor

lostluck commented Apr 6, 2020

LGTM for Go
Note, any errors in this won't be caught by the Go precommit, but given the Go postcommit is still grumpy there's no open verification of this at this time. (Granted this isn't automated in any of the Go SDK tests at this time, as the SDK has no user side metric extraction API just yet.)

@Ardagan
Copy link
Contributor

Ardagan commented Apr 6, 2020

LGTM overall.

@lukecwik
Copy link
Member Author

lukecwik commented Apr 6, 2020

Run Python PreCommit

Copy link

@ajamato ajamato left a 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;
Copy link

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);
Copy link

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));
}
Copy link

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.

@lukecwik
Copy link
Member Author

lukecwik commented Apr 6, 2020

Run Java PreCommit

@lukecwik lukecwik merged commit 2a0b3f7 into apache:master Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants