Skip to content

Fix MSI installation scripts #5887

Fix MSI installation scripts

Fix MSI installation scripts #5887

GitHub Actions / SDK CLI Test Result [chenyin/fix_msi_install](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:chenyin/fix_msi_install++) failed Feb 7, 2024 in 0s

1 fail, 18 skipped, 399 pass in 39m 14s

   12 files  + 8     12 suites  +8   39m 14s ⏱️ + 5m 27s
  418 tests +23    399 ✅ +22  18 💤 +2  1 ❌  - 1 
1 672 runs  +92  1 596 ✅ +88  72 💤 +8  4 ❌  - 4 

Results for commit 9a3aea5. ± Comparison against earlier commit bce09fe.

Annotations

Check warning on line 0 in tests.sdk_pfs_test.e2etests.test_cli.TestPromptflowServiceCLI

See this annotation in the file changed.

@github-actions github-actions / SDK CLI Test Result [chenyin/fix_msi_install](https://github.com/microsoft/promptflow/actions/workflows/promptflow-sdk-cli-test.yml?query=branch:chenyin/fix_msi_install++)

All 4 runs failed: test_start_service (tests.sdk_pfs_test.e2etests.test_cli.TestPromptflowServiceCLI)

artifacts/Test Results (Python 3.10) (OS ubuntu-latest)/test-results-pfs.xml [took 30s]
artifacts/Test Results (Python 3.11) (OS ubuntu-latest)/test-results-pfs.xml [took 30s]
artifacts/Test Results (Python 3.8) (OS ubuntu-latest)/test-results-pfs.xml [took 30s]
artifacts/Test Results (Python 3.9) (OS ubuntu-latest)/test-results-pfs.xml [took 30s]
Raw output
psutil.TimeoutExpired: timeout after 10 seconds (pid=13876)
pid = 13876, timeout = 10, proc_name = None
_waitpid = <built-in function waitpid>, _timer = <built-in function monotonic>
_min = <built-in function min>, _sleep = <built-in function sleep>
_pid_exists = <function pid_exists at 0x7faf57cfb4c0>

    def wait_pid(
        pid,
        timeout=None,
        proc_name=None,
        _waitpid=os.waitpid,
        _timer=getattr(time, 'monotonic', time.time),  # noqa: B008
        _min=min,
        _sleep=time.sleep,
        _pid_exists=pid_exists,
    ):
        """Wait for a process PID to terminate.
    
        If the process terminated normally by calling exit(3) or _exit(2),
        or by returning from main(), the return value is the positive integer
        passed to *exit().
    
        If it was terminated by a signal it returns the negated value of the
        signal which caused the termination (e.g. -SIGTERM).
    
        If PID is not a children of os.getpid() (current process) just
        wait until the process disappears and return None.
    
        If PID does not exist at all return None immediately.
    
        If *timeout* != None and process is still alive raise TimeoutExpired.
        timeout=0 is also possible (either return immediately or raise).
        """
        if pid <= 0:
            # see "man waitpid"
            msg = "can't wait for PID 0"
            raise ValueError(msg)
        interval = 0.0001
        flags = 0
        if timeout is not None:
            flags |= os.WNOHANG
            stop_at = _timer() + timeout
    
        def sleep(interval):
            # Sleep for some time and return a new increased interval.
            if timeout is not None:
                if _timer() >= stop_at:
                    raise TimeoutExpired(timeout, pid=pid, name=proc_name)
            _sleep(interval)
            return _min(interval * 2, 0.04)
    
        # See: https://linux.die.net/man/2/waitpid
        while True:
            try:
>               retpid, status = os.waitpid(pid, flags)
E               ChildProcessError: [Errno 10] No child processes

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/psutil/_psposix.py:130: ChildProcessError

During handling of the above exception, another exception occurred:

self = <sdk_pfs_test.e2etests.test_cli.TestPromptflowServiceCLI object at 0x7faf56916cd0>

    def test_start_service(self):
        try:
            # start pfs by pf.yaml
            self._test_start_service()
            # Start pfs by specified port
            random_port = get_random_port()
            self._test_start_service(port=random_port, force=True)
    
            # Force start pfs
            start_pfs = subprocess.Popen("pfs start", shell=True)
            # Wait for service to be started
            sleep(5)
            self._test_start_service(force=True)
            # previous pfs is killed
            assert start_pfs.poll() is not None
        finally:
            port = get_port_from_config()
>           kill_exist_service(port=port)

tests/sdk_pfs_test/e2etests/test_cli.py:60: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
promptflow/_sdk/_service/utils/utils.py:89: in kill_exist_service
    proc.wait(10)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/psutil/__init__.py:1325: in wait
    self._exitcode = self._proc.wait(timeout)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/psutil/_pslinux.py:1714: in wrapper
    return fun(self, *args, **kwargs)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/psutil/_pslinux.py:1941: in wait
    return _psposix.wait_pid(self.pid, timeout, self._name)
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/psutil/_psposix.py:141: in wait_pid
    interval = sleep(interval)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

interval = 0.04

    def sleep(interval):
        # Sleep for some time and return a new increased interval.
        if timeout is not None:
            if _timer() >= stop_at:
>               raise TimeoutExpired(timeout, pid=pid, name=proc_name)
E               psutil.TimeoutExpired: timeout after 10 seconds (pid=13876)

/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/psutil/_psposix.py:123: TimeoutExpired