-
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(ingestion/metabase): Fetch Dashboards through Collections #9631
Changes from 12 commits
68318c8
ae3c739
f3552ac
52bb1c0
e716b03
7faaa51
4ce5b6f
db6c33e
0c57b51
d9022bc
fa5851b
fcc330c
58c6593
81f3eb2
b6150b4
4c758f8
34cdf55
9bde535
a262a63
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 |
---|---|---|
|
@@ -57,7 +57,8 @@ | |
}, | ||
"systemMetadata": { | ||
"lastObserved": 1636614000000, | ||
"runId": "metabase-test" | ||
"runId": "metabase-test", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
|
@@ -112,7 +113,8 @@ | |
}, | ||
"systemMetadata": { | ||
"lastObserved": 1636614000000, | ||
"runId": "metabase-test" | ||
"runId": "metabase-test", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
|
@@ -167,7 +169,8 @@ | |
}, | ||
"systemMetadata": { | ||
"lastObserved": 1636614000000, | ||
"runId": "metabase-test" | ||
"runId": "metabase-test", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
|
@@ -180,10 +183,55 @@ | |
"customProperties": {}, | ||
"title": "Dashboard 1", | ||
"description": "", | ||
"charts": [ | ||
"urn:li:chart:(metabase,1)", | ||
"urn:li:chart:(metabase,2)" | ||
"charts": [], | ||
"datasets": [], | ||
"lastModified": { | ||
"created": { | ||
"time": 1639417721742, | ||
"actor": "urn:li:corpuser:[email protected]" | ||
}, | ||
"lastModified": { | ||
"time": 1639417721742, | ||
"actor": "urn:li:corpuser:[email protected]" | ||
} | ||
}, | ||
"dashboardUrl": "http://localhost:3000/dashboard/10" | ||
} | ||
}, | ||
{ | ||
"com.linkedin.pegasus2avro.common.Ownership": { | ||
"owners": [ | ||
{ | ||
"owner": "urn:li:corpuser:[email protected]", | ||
"type": "DATAOWNER" | ||
} | ||
], | ||
"lastModified": { | ||
"time": 0, | ||
"actor": "urn:li:corpuser:unknown" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"systemMetadata": { | ||
"lastObserved": 1636614000000, | ||
"runId": "metabase-test", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
"proposedSnapshot": { | ||
"com.linkedin.pegasus2avro.metadata.snapshot.DashboardSnapshot": { | ||
"urn": "urn:li:dashboard:(metabase,1)", | ||
"aspects": [ | ||
{ | ||
"com.linkedin.pegasus2avro.dashboard.DashboardInfo": { | ||
"customProperties": {}, | ||
"title": "Dashboard 1", | ||
"description": "", | ||
"charts": [], | ||
"datasets": [], | ||
"lastModified": { | ||
"created": { | ||
|
@@ -195,7 +243,7 @@ | |
"actor": "urn:li:corpuser:[email protected]" | ||
} | ||
}, | ||
"dashboardUrl": "http://localhost:3000/dashboard/1" | ||
"dashboardUrl": "http://localhost:3000/dashboard/10" | ||
} | ||
}, | ||
{ | ||
|
@@ -217,7 +265,8 @@ | |
}, | ||
"systemMetadata": { | ||
"lastObserved": 1636614000000, | ||
"runId": "metabase-test" | ||
"runId": "metabase-test", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
|
@@ -232,7 +281,8 @@ | |
}, | ||
"systemMetadata": { | ||
"lastObserved": 1636614000000, | ||
"runId": "metabase-test" | ||
"runId": "metabase-test", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
|
@@ -247,7 +297,8 @@ | |
}, | ||
"systemMetadata": { | ||
"lastObserved": 1636614000000, | ||
"runId": "metabase-test" | ||
"runId": "metabase-test", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
|
@@ -262,7 +313,8 @@ | |
}, | ||
"systemMetadata": { | ||
"lastObserved": 1636614000000, | ||
"runId": "metabase-test" | ||
"runId": "metabase-test", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
}, | ||
{ | ||
|
@@ -277,7 +329,8 @@ | |
}, | ||
"systemMetadata": { | ||
"lastObserved": 1636614000000, | ||
"runId": "metabase-test" | ||
"runId": "metabase-test", | ||
"lastRunId": "no-run-id-provided" | ||
} | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"total": 1, "data": [{"description": null, "collection_position": null, "database_id": null, "name": "This is a test", "id": 10, "entity_id": "Q4gEaOmoBkfQX3_gXiH9g", "last-edit-info": {"id": 14, "last_name": "Doe", "first_name": "John", "email": "[email protected]", "timestamp": "2024-01-12T14:55:38.43304Z"}, "model": "dashboard"}], "models": ["dashboard"], "limit": null, "offset": null} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"authority_level": null, "can_write": true, "name": "Our analytics", "effective_ancestors": [], "effective_location": null, "parent_id": null, "id": "root", "is_personal": false}, {"authority_level": null, "description": null, "archived": false, "slug": "john_doe_personal_collection", "can_write": true, "name": "John Doe", "personal_owner_id": 14, "type": null, "id": 150, "entity_id": "kdLA_-CQy4F5lL15k8-TU", "location": "/", "namespace": null, "is_personal": true, "created_at": "2024-01-12T11:51:24.394309Z"}] |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -330,4 +330,4 @@ | |
"created_at": "2021-12-13T17:46:48.185", | ||
"public_uuid": null, | ||
"points_of_interest": null | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,10 @@ | |
JSON_RESPONSE_MAP = { | ||
"http://localhost:3000/api/session": "session.json", | ||
"http://localhost:3000/api/user/current": "user.json", | ||
"http://localhost:3000/api/dashboard": "dashboard.json", | ||
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. can we delete the 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 struggled to run these tests, actually. I did set my machine to java 8 but couldn't run the gradlew successfully. 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. @hsheth2 I'm using my GH Actions to test it https://github.com/7onn/datahub/actions 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. We've actually migrated to java 17 now Have you taken a look at these docs https://datahubproject.io/docs/next/metadata-ingestion/developing/ Let me know if you run into issues with it - we want developing on ingestion, including tests, to be a smooth experience |
||
"http://localhost:3000/api/dashboard/1": "dashboard_1.json", | ||
"http://localhost:3000/api/collection/": "collections.json", | ||
"http://localhost:3000/api/collection/root/items?models=dashboard": "collection_dashboards.json", | ||
"http://localhost:3000/api/collection/150/items?models=dashboard": "collection_dashboards.json", | ||
"http://localhost:3000/api/dashboard/10": "dashboard_1.json", | ||
"http://localhost:3000/api/user/1": "user.json", | ||
"http://localhost:3000/api/card": "card.json", | ||
"http://localhost:3000/api/database/1": "bigquery_database.json", | ||
|
@@ -26,7 +28,7 @@ | |
"http://localhost:3000/api/card/3": "card_3.json", | ||
} | ||
|
||
RESPONSE_ERROR_LIST = ["http://localhost:3000/api/dashboard"] | ||
RESPONSE_ERROR_LIST = ["http://localhost:3000/api/dashboard/public"] | ||
|
||
test_resources_dir = pathlib.Path(__file__).parent | ||
|
||
|
@@ -114,9 +116,9 @@ def test_mode_ingest_success(pytestconfig, tmp_path): | |
}, | ||
} | ||
) | ||
|
||
pipeline.run() | ||
pipeline.raise_from_status() | ||
|
||
mce_helpers.check_golden_file( | ||
pytestconfig, | ||
output_path=f"{tmp_path}/metabase_mces.json", | ||
|
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.
seems like the relationships between dashboards and charts disappeared? Given that it's an important part of the integration, can we update the code / test data to make sure we're testing the dashboard -> chart relationship generation?
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.
Fixed by: