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

fix(policies): Remove exception on ingest policies #5050

Merged

Conversation

dexter-mh-lee
Copy link
Contributor

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

@@ -128,7 +128,8 @@ private void updatePolicyIndex() throws URISyntaxException {
private void insertPolicyDocument(EntityResponse entityResponse, AspectSpec aspectSpec) {
EnvelopedAspect aspect = entityResponse.getAspects().get(Constants.DATAHUB_POLICY_INFO_ASPECT_NAME);
if (aspect == null) {
throw new RuntimeException(String.format("Missing policy info aspect for urn %s", entityResponse.getUrn()));
log.info("Missing policy info aspect for urn {}", entityResponse.getUrn());
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the impact of not throwing the runtime exception? Could GMS crash later on? Why do we even get this exception in the first place?
Finally, shouldn't this be an error or warn level log at least?

Copy link
Contributor Author

@dexter-mh-lee dexter-mh-lee May 31, 2022

Choose a reason for hiding this comment

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

It is because of a time delay between what happens before this and after this. There is no impact

@github-actions
Copy link

Unit Test Results (build & test)

  77 files  ±0    77 suites  ±0   3m 8s ⏱️ +34s
333 tests ±0  333 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 761e971. ± Comparison against base commit 08a5fcf.

@dexter-mh-lee dexter-mh-lee merged commit b204357 into datahub-project:master May 31, 2022
@dexter-mh-lee dexter-mh-lee deleted the dl--fix-ingest-policies branch May 31, 2022 21:44
maggiehays pushed a commit to maggiehays/datahub that referenced this pull request Aug 1, 2022
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.

3 participants