Skip to content

CI/TST: Call join on server process test #45628

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

Merged
merged 1 commit into from
Jan 26, 2022

Conversation

mroeschke
Copy link
Member

Troubleshooting this current CI failure

    @pytest.fixture
    def responder(request):
        """
        Fixture that starts a local http server in a separate process on localhost
        and returns the port.
    
        Running in a separate process instead of a thread to allow termination/killing
        of http server upon cleanup.
        """
        # Find an available port
        with socket.socket() as sock:
            sock.bind(("localhost", 0))
            port = sock.getsockname()[1]
    
        server_process = multiprocessing.Process(
            target=process_server, args=(request.param, port)
        )
        server_process.start()
        yield port
        server_process.terminate()
        kill_time = 5
        wait_time = 0
        while server_process.is_alive():
            if wait_time > kill_time:
                server_process.kill()
                break
            else:
                wait_time += 0.1
                time.sleep(0.1)
>       server_process.close()

pandas/tests/io/test_user_agent.py:231: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Process name='Process-10' pid=13556 parent=8289 started>

    def close(self):
        '''
        Close the Process object.
    
        This method releases resources held by the Process object.  It is
        an error to call this method if the child process is still running.
        '''
        if self._popen is not None:
            if self._popen.poll() is None:
>               raise ValueError("Cannot close a process while it is still running. "
                                 "You should first call join() or terminate().")
E               ValueError: Cannot close a process while it is still running. You should first call join() or terminate().

@mroeschke mroeschke added CI Continuous Integration IO Network Local or Cloud (AWS, GCS, etc.) IO Issues Testing pandas testing functions or related to the test suite labels Jan 26, 2022
@jbrockmendel
Copy link
Member

IIRC there was something about using pytest.mark.single for some of these. did that pan out?

At this point I'd be OK with just skipping this entire file.

@mroeschke
Copy link
Member Author

IIRC there was something about using pytest.mark.single for some of these. did that pan out?

At this point I'd be OK with just skipping this entire file.

Ya I'm trying to thin out the number of builds before adding a single build because GHA can supposedly run ~20 builds concurrently across all PRs/main.

If this doesn't work I'll skip this file until we have that single process build up.

@mroeschke mroeschke added this to the 1.4.1 milestone Jan 26, 2022
@mroeschke
Copy link
Member Author

This appears like a victory.

Failure due to the runners

2022-01-26T03:47:04.4612135Z Found online and idle hosted runner in the current repository's organization account that matches the required labels: 'ubuntu-latest'
2022-01-26T03:47:04.5087280Z Waiting for a Hosted runner in the 'organization' to pick this job...
2022-01-26T03:47:05.3360343Z Job is waiting for a hosted runner to come online.
2022-01-26T03:47:10.9423229Z Job is about to start running on the hosted runner: GitHub Actions 5 (hosted)

@mroeschke mroeschke merged commit c5ff649 into pandas-dev:main Jan 26, 2022
@mroeschke mroeschke deleted the debug/server_test branch January 26, 2022 05:12
@mroeschke
Copy link
Member Author

@meeseeksdev backport 1.4.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jan 26, 2022

Something went wrong ... Please have a look at my logs.

jreback pushed a commit that referenced this pull request Jan 26, 2022
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration IO Network Local or Cloud (AWS, GCS, etc.) IO Issues Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants