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

refactor(gms): Adding Java Entity Services #5931

Merged

Conversation

jjoyce0510
Copy link
Collaborator

Summary

In this PR, we introduce handy and reusable service classes for Owners, Glossary Terms, Domains, and Tags. Currently, they allow you to bulk add and remove each of these items.

Specifically:

  1. Owners Service
  2. Domains Service
  3. Glossary Terms Service
  4. Tags Service

along with unit tests for each.

In future PRs, we will migrate resolvers to using these services.

Status

Ready to review

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Sep 14, 2022
@github-actions
Copy link

github-actions bot commented Sep 14, 2022

Unit Test Results (build & test)

571 tests  ±0   571 ✔️ ±0   14m 27s ⏱️ +19s
141 suites ±0       0 💤 ±0 
141 files   ±0       0 ±0 

Results for commit b6637f0. ± Comparison against base commit c606abd.

♻️ This comment has been updated with latest results.



@Slf4j
public class DomainService {
Copy link
Contributor

Choose a reason for hiding this comment

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

does it make sense to create an interface for these tag/term/owner/domain services that they all implement?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think so. No shared methods really.

If anything, a shared base class

Copy link
Contributor

Choose a reason for hiding this comment

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

what if we replaced things like batchSetDomain with batchSet

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

refactored common code into BaseService

}

@VisibleForTesting
List<MetadataChangeProposal> buildRemoveGlossaryTermsProposals(
Copy link
Contributor

Choose a reason for hiding this comment

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

buildRemoveGlossaryTermsMetadataChangeProposals? Since proposal is an overloaded word

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh interesting....

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i think in the context here... it should be okay. what im thinking for saas is that we'll build a ProposalService or ActionRequestService most likely to complement

@jjoyce0510 jjoyce0510 force-pushed the jj--adding-entity-services branch from 996ac24 to bc38c8f Compare September 14, 2022 15:50
@jjoyce0510 jjoyce0510 merged commit 38f1111 into datahub-project:master Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants