feat: update mlflow UI #5397
GitHub Actions / Unit Test Results (Prefect Plugin)
failed
Dec 23, 2024 in 0s
1 fail, 6 pass in 7s
7 tests 6 ✅ 7s ⏱️
1 suites 0 💤
1 files 1 ❌
Results for commit b0ae81d.
Annotations
Check warning on line 0 in tests.unit.test_datahub_emitter
github-actions / Unit Test Results (Prefect Plugin)
test_emit_flow (tests.unit.test_datahub_emitter) failed
artifacts/Test Results (Prefect Plugin 3.10)/metadata-ingestion-modules/prefect-plugin/junit.quick.xml [took 0s]
Raw output
AssertionError: assert 'dataPlatformInstance' == 'dataProcessInstanceRunEvent'
- dataProcessInstanceRunEvent
+ dataPlatformInstance
mock_emit = <MagicMock name='DatahubRestEmitter' spec='DataHubRestEmitter' id='139716193990352'>
mock_run_context = (<MagicMock name='TaskRunContext.get()' id='139716194282048'>, <MagicMock name='FlowRunContext.get()' id='139716193691264'>)
mock_prefect_client = <MagicMock name='orchestration.get_client()' id='139716183695536'>
mock_prefect_cloud_client = <MagicMock name='cloud.get_cloud_client()' id='139716192582624'>
@patch("prefect_datahub.datahub_emitter.DatahubRestEmitter", autospec=True)
def test_emit_flow(
mock_emit, mock_run_context, mock_prefect_client, mock_prefect_cloud_client
):
mock_emitter = Mock()
mock_emit.return_value = mock_emitter
platform_instance = "datahub_workspace"
datahub_emitter = DatahubEmitter(platform_instance=platform_instance)
datahub_emitter.add_task()
datahub_emitter.emit_flow()
task_run_ctx = mock_run_context[0]
flow_run_ctx = mock_run_context[1]
expected_dataflow_urn = (
f"urn:li:dataFlow:(prefect,{platform_instance}.{flow_run_ctx.flow.name},PROD)"
)
expected_dataflow_urn = (
f"urn:li:dataFlow:(prefect,{platform_instance}.{flow_run_ctx.flow.name},PROD)"
)
# Ignore the first call (index 0) which is a connection call
# DataFlow assertions
assert mock_emitter.method_calls[1][1][0].aspectName == "dataFlowInfo"
assert mock_emitter.method_calls[1][1][0].entityUrn == expected_dataflow_urn
assert mock_emitter.method_calls[2][1][0].aspectName == "status"
assert mock_emitter.method_calls[2][1][0].entityUrn == expected_dataflow_urn
assert mock_emitter.method_calls[3][1][0].aspectName == "ownership"
assert mock_emitter.method_calls[3][1][0].entityUrn == expected_dataflow_urn
assert mock_emitter.method_calls[4][1][0].aspectName == "globalTags"
assert mock_emitter.method_calls[4][1][0].entityUrn == expected_dataflow_urn
assert mock_emitter.method_calls[5][1][0].aspectName == "browsePaths"
assert mock_emitter.method_calls[5][1][0].entityUrn == expected_dataflow_urn
# DataProcessInstance assertions for the flow
assert (
mock_emitter.method_calls[10][1][0].aspectName
== "dataProcessInstanceProperties"
)
assert (
mock_emitter.method_calls[10][1][0].entityUrn
== "urn:li:dataProcessInstance:56231547bcc2781e0c14182ceab6c9ac"
)
assert (
mock_emitter.method_calls[11][1][0].aspectName
== "dataProcessInstanceRelationships"
)
assert (
mock_emitter.method_calls[11][1][0].entityUrn
== "urn:li:dataProcessInstance:56231547bcc2781e0c14182ceab6c9ac"
)
> assert (
mock_emitter.method_calls[12][1][0].aspectName == "dataProcessInstanceRunEvent"
)
E AssertionError: assert 'dataPlatformInstance' == 'dataProcessInstanceRunEvent'
E
E - dataProcessInstanceRunEvent
E + dataPlatformInstance
tests/unit/test_datahub_emitter.py:622: AssertionError
Check notice on line 0 in .github
github-actions / Unit Test Results (Prefect Plugin)
7 tests found
There are 7 tests, see "Raw output" for the full list of tests.
Raw output
tests.unit.test_block_standards.TestAllBlocksAdhereToStandards ‑ test_has_a_description[DatahubEmitter]
tests.unit.test_block_standards.TestAllBlocksAdhereToStandards ‑ test_has_a_valid_code_example[DatahubEmitter]
tests.unit.test_datahub_emitter ‑ test__get_workspace
tests.unit.test_datahub_emitter ‑ test_add_task
tests.unit.test_datahub_emitter ‑ test_emit_flow
tests.unit.test_datahub_emitter ‑ test_entities_to_urn_list
tests.unit.test_datahub_emitter ‑ test_get_flow_run_graph
Loading