Skip to content
GitHub Actions / SDK CLI Global Config Test Result [yigao/new_devkit](https://github.com/microsoft/promptflow/actions/workflows/promptflow-global-config-test.yml?query=branch:yigao/new_devkit++) failed Mar 28, 2024 in 0s

1 fail, 2 pass in 44s

3 tests  ±0   2 ✅ ±0   44s ⏱️ -2s
1 suites ±0   0 💤 ±0 
1 files   ±0   1 ❌ ±0 

Results for commit c20e2ea. ± Comparison against earlier commit cd8e1de.

Annotations

Check warning on line 0 in tests.sdk_cli_global_config_test.e2etests.test_global_config.TestGlobalConfig

See this annotation in the file changed.

@github-actions github-actions / SDK CLI Global Config Test Result [yigao/new_devkit](https://github.com/microsoft/promptflow/actions/workflows/promptflow-global-config-test.yml?query=branch:yigao/new_devkit++)

test_flow_as_func (tests.sdk_cli_global_config_test.e2etests.test_global_config.TestGlobalConfig) failed

artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results.xml [took 0s]
Raw output
promptflow.core._errors.MissingRequiredPackage: Please install 'promptflow-devkit' to use local connection.
cls = <class 'promptflow.core._connection_provider._connection_provider.ConnectionProvider'>
provider_config = None, credential = None

    @classmethod
    def init_from_provider_config(cls, provider_config: str, credential=None):
        """Initialize the connection provider from a provider config.
    
        Expected value:
        - local
        - azureml://subscriptions/<your-subscription>/resourceGroups/<your-resourcegroup>/
            providers/Microsoft.MachineLearningServices/workspaces/<your-workspace>
        """
        if not provider_config or provider_config == ConnectionProviderConfig.LOCAL:
            try:
>               from promptflow._sdk._connection_provider._local_connection_provider import LocalConnectionProvider
E               ModuleNotFoundError: No module named 'promptflow._sdk._connection_provider'

/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/promptflow/core/_connection_provider/_connection_provider.py:29: ModuleNotFoundError

The above exception was the direct cause of the following exception:

self = <sdk_cli_global_config_test.e2etests.test_global_config.TestGlobalConfig object at 0x7fef4e99d7c0>

    def test_flow_as_func(self):
        # Assert flow as func use azure provider, honor global connection config
        def assert_client(mock_self, provider, **kwargs):
            assert isinstance(provider, WorkspaceConnectionProvider)
            return {
                "azure_open_ai_connection": provider.get(
                    name="azure_open_ai_connection"
                )._to_execution_connection_dict()
            }
    
        flow = load_flow(source=f"{FLOWS_DIR}/web_classification")
        with mock.patch("promptflow.core._serving.flow_invoker.FlowInvoker.resolve_connections", assert_client):
>           FlowContextResolver.resolve(flow=flow)

tests/sdk_cli_global_config_test/e2etests/test_global_config.py:48: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/promptflow/_sdk/entities/_flow/_flow_context_resolver.py:42: in resolve
    return resolver._create_invoker(flow_context=flow.context)
/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/promptflow/_sdk/entities/_flow/_flow_context_resolver.py:135: in _create_invoker
    return FlowInvoker(
/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/promptflow/core/_serving/flow_invoker.py:73: in __init__
    self._init_connections(connection_provider)
/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/promptflow/core/_serving/flow_invoker.py:120: in _init_connections
    provider=ConnectionProvider.init_from_provider_config(connection_provider, credential=self._credential),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'promptflow.core._connection_provider._connection_provider.ConnectionProvider'>
provider_config = None, credential = None

    @classmethod
    def init_from_provider_config(cls, provider_config: str, credential=None):
        """Initialize the connection provider from a provider config.
    
        Expected value:
        - local
        - azureml://subscriptions/<your-subscription>/resourceGroups/<your-resourcegroup>/
            providers/Microsoft.MachineLearningServices/workspaces/<your-workspace>
        """
        if not provider_config or provider_config == ConnectionProviderConfig.LOCAL:
            try:
                from promptflow._sdk._connection_provider._local_connection_provider import LocalConnectionProvider
            except ImportError as e:
>               raise MissingRequiredPackage(
                    message="Please install 'promptflow-devkit' to use local connection."
                ) from e
E               promptflow.core._errors.MissingRequiredPackage: Please install 'promptflow-devkit' to use local connection.

/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/promptflow/core/_connection_provider/_connection_provider.py:31: MissingRequiredPackage

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / SDK CLI Global Config Test Result [yigao/new_devkit](https://github.com/microsoft/promptflow/actions/workflows/promptflow-global-config-test.yml?query=branch:yigao/new_devkit++)

3 tests found

There are 3 tests, see "Raw output" for the full list of tests.
Raw output
tests.sdk_cli_global_config_test.e2etests.test_global_config.TestGlobalConfig ‑ test_basic_flow_bulk_run
tests.sdk_cli_global_config_test.e2etests.test_global_config.TestGlobalConfig ‑ test_connection_operations
tests.sdk_cli_global_config_test.e2etests.test_global_config.TestGlobalConfig ‑ test_flow_as_func