-
Notifications
You must be signed in to change notification settings - Fork 3k
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(model): fixes DashboardContainsDashboard relationship in DashboardInfo aspect #12433
Changes from 9 commits
c2e0dac
cad0b37
7c92a0e
0fa4114
6479072
43072d5
3c33063
00adc98
a502458
49e0dc2
b582b47
08bb142
a0a3a46
bc46815
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -22,6 +22,7 @@ public class DashboardInfoTemplate implements ArrayMergingTemplate<DashboardInfo | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
private static final String DATASETS_FIELD_NAME = "datasets"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
private static final String CHARTS_FIELD_NAME = "charts"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
private static final String DESTINATION_URN_FIELD_NAME = "destinationUrn"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
private static final String DASHBOARDS_FIELD_NAME = "dashboards"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
@Override | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
public DashboardInfo getSubtype(RecordTemplate recordTemplate) throws ClassCastException { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -74,6 +75,12 @@ public JsonNode transformFields(JsonNode baseNode) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
DATASET_EDGES_FIELD_NAME, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collections.singletonList(DESTINATION_URN_FIELD_NAME)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
transformedNode = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If there isn't already a test for this let's create one, or if there is add in mapping this field There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had already added a test for The test operates on datahub/entity-registry/src/main/java/com/linkedin/metadata/aspect/patch/template/Template.java Lines 51 to 86 in 47134c2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
arrayFieldToMap( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
transformedNode, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
DASHBOARDS_FIELD_NAME, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collections.singletonList(DESTINATION_URN_FIELD_NAME)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
transformedNode = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
arrayFieldToMap(transformedNode, DATASETS_FIELD_NAME, Collections.emptyList()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -97,6 +104,12 @@ public JsonNode rebaseFields(JsonNode patched) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CHART_EDGES_FIELD_NAME, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collections.singletonList(DESTINATION_URN_FIELD_NAME)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rebasedNode = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
transformedMapToArray( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rebasedNode, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
DASHBOARDS_FIELD_NAME, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Collections.singletonList(DESTINATION_URN_FIELD_NAME)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rebasedNode = transformedMapToArray(rebasedNode, DATASETS_FIELD_NAME, Collections.emptyList()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rebasedNode = transformedMapToArray(rebasedNode, CHARTS_FIELD_NAME, Collections.emptyList()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add tests for these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found these tests for
DashboardInfoPatchBuilder
datahub/metadata-integration/java/datahub-client/src/test/java/datahub/client/patch/PatchTest.java
Line 619 in 79aa40f
I will add it there, even if they are all
@Ignore
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in commit 49e0dc2