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

[WIP] feat: update mlflow UI #12334

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from

Merge branch 'master' into feat/update-mlflow-ui

31dd659
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Draft

[WIP] feat: update mlflow UI #12334

Merge branch 'master' into feat/update-mlflow-ui
31dd659
Select commit
Loading
Failed to load commit list.
GitHub Actions / Unit Test Results (Prefect Plugin) failed Jan 20, 2025 in 0s

1 fail, 6 pass in 8s

7 tests   6 ✅  8s ⏱️
1 suites  0 💤
1 files    1 ❌

Results for commit 31dd659.

Annotations

Check warning on line 0 in tests.unit.test_datahub_emitter

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results (Prefect Plugin)

test_emit_flow (tests.unit.test_datahub_emitter) failed

artifacts/Test Results (Prefect Plugin 3.11)/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='140212924246032'>
mock_run_context = (<MagicMock name='TaskRunContext.get()' id='140212924460688'>, <MagicMock name='FlowRunContext.get()' id='140212924452624'>)
mock_prefect_client = <MagicMock name='orchestration.get_client()' id='140212920062480'>
mock_prefect_cloud_client = <MagicMock name='cloud.get_cloud_client()' id='140212937751056'>

    @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

See this annotation in the file changed.

@github-actions 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