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

Added RPC invocation for PreUpdate #443

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Added RPC invocation for PreUpdate #443

wants to merge 14 commits into from

Conversation

rakhiagr
Copy link
Contributor

@rakhiagr rakhiagr commented Oct 7, 2024

Summary

Added grpcPreUpdateRouting method to BaseLocalDao. We will inject routingMap in BaseLocalDao through the setter method and then get the BlockingStub, RequestBuilder, and MethodDescriptor from the routingMap and invoke the RPC method.

Testing Done

./gradlew build

Checklist

@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 78.57143% with 6 lines in your changes missing coverage. Please review.

Project coverage is 67.72%. Comparing base (80c8b23) to head (232f1dc).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...n/java/com/linkedin/metadata/dao/BaseLocalDAO.java 71.42% 4 Missing ⚠️
...tadata/dao/ingestion/preupdate/PreRoutingInfo.java 75.00% 1 Missing ⚠️
...ata/dao/ingestion/preupdate/PreUpdateResponse.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #443      +/-   ##
============================================
+ Coverage     67.63%   67.72%   +0.09%     
- Complexity     1548     1576      +28     
============================================
  Files           138      142       +4     
  Lines          6077     6129      +52     
  Branches        658      661       +3     
============================================
+ Hits           4110     4151      +41     
- Misses         1688     1699      +11     
  Partials        279      279              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@JiaoMaWHU JiaoMaWHU left a comment

Choose a reason for hiding this comment

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

could you help understand why we’re not appending on the solution we built for DatasetAccountableOwnership? this seems to be a new framework

/**
* Set pre ingestion aspect registry for grpc implementation.
*/
public void setGrpcPreUpdateRegistry(@Nullable GrpcPreUpdateRegistry grpcPreUpdateRegistry) {

Choose a reason for hiding this comment

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

Where do we call this method? Should we do it through inject?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we will inject it in the AssetClass where we call the ingestion method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For RestliRegistry, I was setting it in DatasetLocalDao.

* @param aspectClass aspect class
* @param preUpdateRoutingMap pre update routing map
*/
public void registerPreUpdateLambda(@Nonnull Class<? extends RecordTemplate> aspectClass,

Choose a reason for hiding this comment

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

again, who should register this lambda?

Copy link
Contributor Author

@rakhiagr rakhiagr Oct 9, 2024

Choose a reason for hiding this comment

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

We can create a Factory PreUpdateAspectRegistryFactory

PreUpdateAspectRegistryFactory extends SimpleSingletonFactory<GrpcPreUpdateRegistry> {

protected GrpcPreUpdateRegistry createInstance(ConfigView view) {    
return GrpcPreUpdateRegistry.registerPreUpdateLambda(DatasetAccountableOwnership.class, getBean(DatasetAccountableOwnershipPreUpdateClient
       .class));

Choose a reason for hiding this comment

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

Let's include all those detail in your doc and trying to see which part can be covered by SMO in the future

@rakhiagr rakhiagr changed the title Added RPC invocation Added RPC invocation for PreUpdate Oct 9, 2024
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.

5 participants