Skip to content

promptflow-release-testing-matrix #141

promptflow-release-testing-matrix

promptflow-release-testing-matrix #141

GitHub Actions / Test Results failed Jan 18, 2024 in 0s

1 fail in 2m 8s

12 files  12 suites   2m 8s ⏱️
 1 tests  0 ✅ 0 💤  1 ❌
12 runs   0 ✅ 0 💤 12 ❌

Results for commit 9b38d91.

Annotations

Check warning on line 0 in tests.sdk_cli_test.e2etests.test_executable.TestExecutable

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 12 runs failed: test_flow_build_executable (tests.sdk_cli_test.e2etests.test_executable.TestExecutable)

artifacts/promptflow_sdk_cli_tests Test Results (Python 3.10) (OS macos-latest)/test-results-sdk-cli-executable.xml [took 9s]
artifacts/promptflow_sdk_cli_tests Test Results (Python 3.10) (OS ubuntu-latest)/test-results-sdk-cli-executable.xml [took 3s]
artifacts/promptflow_sdk_cli_tests Test Results (Python 3.10) (OS windows-latest)/test-results-sdk-cli-executable.xml [took 7s]
artifacts/promptflow_sdk_cli_tests Test Results (Python 3.11) (OS macos-latest)/test-results-sdk-cli-executable.xml [took 7s]
artifacts/promptflow_sdk_cli_tests Test Results (Python 3.11) (OS ubuntu-latest)/test-results-sdk-cli-executable.xml [took 4s]
artifacts/promptflow_sdk_cli_tests Test Results (Python 3.11) (OS windows-latest)/test-results-sdk-cli-executable.xml [took 9s]
artifacts/promptflow_sdk_cli_tests Test Results (Python 3.8) (OS macos-latest)/test-results-sdk-cli-executable.xml [took 6s]
artifacts/promptflow_sdk_cli_tests Test Results (Python 3.8) (OS ubuntu-latest)/test-results-sdk-cli-executable.xml [took 3s]
artifacts/promptflow_sdk_cli_tests Test Results (Python 3.8) (OS windows-latest)/test-results-sdk-cli-executable.xml [took 9s]
artifacts/promptflow_sdk_cli_tests Test Results (Python 3.9) (OS macos-latest)/test-results-sdk-cli-executable.xml [took 9s]
artifacts/promptflow_sdk_cli_tests Test Results (Python 3.9) (OS ubuntu-latest)/test-results-sdk-cli-executable.xml [took 4s]
artifacts/promptflow_sdk_cli_tests Test Results (Python 3.9) (OS windows-latest)/test-results-sdk-cli-executable.xml [took 9s]
Raw output
ImportError: Module main in file /var/folders/qv/pdh5wsgn0lq3dp77zj602b5c0000gn/T/tmpvcidp0wj/app.py does not exist
self = <sdk_cli_test.e2etests.test_executable.TestExecutable object at 0x1155fa440>

    def test_flow_build_executable(self):
        source = f"{FLOWS_DIR}/web_classification/flow.dag.yaml"
        target = "promptflow._sdk.operations._flow_operations.FlowOperations._run_pyinstaller"
        with mock.patch(target) as mocked:
            mocked.return_value = None
    
            with tempfile.TemporaryDirectory() as temp_dir:
                run_pf_command(
                    "flow",
                    "build",
                    "--source",
                    source,
                    "--output",
                    temp_dir,
                    "--format",
                    "executable",
                )
                with _change_working_dir(temp_dir):
                    for filename in os.listdir(temp_dir):
                        file_path = Path(temp_dir, filename)
                        if os.path.isfile(file_path) and filename.endswith('.py'):
                            with open(file_path, 'r') as file:
                                try:
                                    tree = ast.parse(file.read())
                                except SyntaxError as e:
                                    raise SyntaxError(f"Syntax error in file {file_path}: {e}")
    
                                for node in ast.walk(tree):
                                    if isinstance(node, (ast.Import, ast.ImportFrom)):
                                        for alias in node.names:
                                            module_name = alias.name
                                            if isinstance(node, ast.ImportFrom):
                                                module_name = node.module
                                            try:
>                                               module = importlib.import_module(module_name)

tests/sdk_cli_test/e2etests/test_executable.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/Users/runner/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1050: in _gcd_import
    ???
<frozen importlib._bootstrap>:1027: in _find_and_load
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = 'main', import_ = <function _gcd_import at 0x10ee47400>

>   ???
E   ModuleNotFoundError: No module named 'main'

<frozen importlib._bootstrap>:1004: ModuleNotFoundError

During handling of the above exception, another exception occurred:

self = <sdk_cli_test.e2etests.test_executable.TestExecutable object at 0x1155fa440>

    def test_flow_build_executable(self):
        source = f"{FLOWS_DIR}/web_classification/flow.dag.yaml"
        target = "promptflow._sdk.operations._flow_operations.FlowOperations._run_pyinstaller"
        with mock.patch(target) as mocked:
            mocked.return_value = None
    
            with tempfile.TemporaryDirectory() as temp_dir:
                run_pf_command(
                    "flow",
                    "build",
                    "--source",
                    source,
                    "--output",
                    temp_dir,
                    "--format",
                    "executable",
                )
                with _change_working_dir(temp_dir):
                    for filename in os.listdir(temp_dir):
                        file_path = Path(temp_dir, filename)
                        if os.path.isfile(file_path) and filename.endswith('.py'):
                            with open(file_path, 'r') as file:
                                try:
                                    tree = ast.parse(file.read())
                                except SyntaxError as e:
                                    raise SyntaxError(f"Syntax error in file {file_path}: {e}")
    
                                for node in ast.walk(tree):
                                    if isinstance(node, (ast.Import, ast.ImportFrom)):
                                        for alias in node.names:
                                            module_name = alias.name
                                            if isinstance(node, ast.ImportFrom):
                                                module_name = node.module
                                            try:
                                                module = importlib.import_module(module_name)
                                                if isinstance(node, ast.ImportFrom):
                                                    getattr(module, alias.name)
                                            except ImportError:
>                                               raise ImportError(f"Module {module_name} in file {file_path} does not exist")
E                                               ImportError: Module main in file /var/folders/qv/pdh5wsgn0lq3dp77zj602b5c0000gn/T/tmpvcidp0wj/app.py does not exist

tests/sdk_cli_test/e2etests/test_executable.py:65: ImportError