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(ingest): correctly handle transformer patch semantics #6505

Merged
merged 2 commits into from
Nov 22, 2022

Conversation

hsheth2
Copy link
Collaborator

@hsheth2 hsheth2 commented Nov 22, 2022

The ownership transformer contains a clever optimization, where if it is set to PATCH and does not need to make any changes, no aspect is generated. The surrounding code did not handle this logic correctly, and would issue an upsert with the original ownership object, hence overwriting anything that lived on the server. This bug would only be triggered if the server already contained a superset of what the transformer was trying to add.

Many other dataset transformers also had a similar, subtle bug. For example, if using the pattern_add_dataset_tags transformer and a no new tags applied to a given dataset, the server's tags would get overwritten even if PATCH was specified. This PR should also resolve that class of bugs.

Tested manually with the ownership, props, and tags transformers.

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 ingestion PR or Issue related to the ingestion of metadata label Nov 22, 2022
@github-actions
Copy link

Unit Test Results (metadata ingestion)

       8 files  ±0         8 suites  ±0   58m 6s ⏱️ + 2m 7s
   761 tests ±0     758 ✔️ +6  3 💤 ±0  0  - 1 
1 524 runs  ±0  1 517 ✔️ +7  7 💤 ±0  0  - 2 

Results for commit 959eedb. ± Comparison against base commit 490097e.

@github-actions
Copy link

Unit Test Results (build & test)

621 tests  ±0   617 ✔️ ±0   15m 49s ⏱️ +6s
157 suites ±0       4 💤 ±0 
157 files   ±0       0 ±0 

Results for commit 959eedb. ± Comparison against base commit 490097e.

Copy link
Collaborator

@mayurinehate mayurinehate left a comment

Choose a reason for hiding this comment

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

LGTM

@jjoyce0510 jjoyce0510 merged commit 74cc88f into datahub-project:master Nov 22, 2022
@hsheth2 hsheth2 deleted the transformer-fixes branch November 22, 2022 19:24
cccs-Dustin pushed a commit to CybercentreCanada/datahub that referenced this pull request Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants