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

Release 0.18.0 #73

Merged
merged 2 commits into from
Jul 27, 2021
Merged

Conversation

northernSage
Copy link
Member

@northernSage northernSage commented Jun 29, 2021

Our 0.18.0 release 🎉

Change summary:

Public

  • ProcessInfo.terminate will now terminate outer leaves in process tree first and work its way towards root process. For example, if a process has child and grandchild, xprocess will terminate first child and grandchild and only then will the root process receive a termination signal.

  • ProcessStarter now has terminate_on_interrupt. This flag will
    make xprocess attempt to terminate and clean up all started process resources
    upon interruptions during pytest runs (CTRL+C, SIGINT and internal errors)
    when set to True. It will default to False, so if the described behaviour
    is desired the flag must be explicitly set True.

  • Add a new popen_kwargs variable to ProcessStarter, this variable can
    be used for passing keyword values to the subprocess.Popen constructor,
    giving the user more control over how the process is initialized.

Internal

  • Process Clean-up logic moved to XProcess class. Also, only processes with a termination_signal issued will be waited during tear-down, as opposed to assuming that all processes would always be terminated by the end of the test run and waiting on all Popen instances exit code.

@northernSage
Copy link
Member Author

northernSage commented Jun 29, 2021

I have noticed just know due to a totally unrelated PR (#74) that 0.18.0 may have introduced some flaky termination behaviour.

From CI raw logs:

FAILED test_functional_workflow.py::test_functional_work_flow
FAILED test_process_termination.py::test_clean_shutdown[6777-s1] - AssertionE..
...
6-29T22:46:03.6561320Z > result.stdout.fnmatch_lines("TERMINATED")
2021-06-29T22:46:03.6562270Z E Failed: nomatch: 'TERMINATED'
2021-06-29T22:46:03.6563150Z E and: '1231 server_workflow_test FAILED TO TERMINATE'
2021-06-29T22:46:03.6565050Z E and: "pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'."
2021-06-29T22:46:03.6566460Z E remains unmatched: 'TERMINATED'
...

So I'll have to look into that before the release can happen 😞

I have create an issue to address this: #75

@northernSage
Copy link
Member Author

northernSage commented Jul 21, 2021

The flaky behaviour seems to be fixed so we should be good to go. WDYT @nicoddemus ?

@nicoddemus
Copy link
Member

Sounds good, thanks for tackling this!

@northernSage northernSage merged commit 85b50fe into pytest-dev:master Jul 27, 2021
@northernSage northernSage deleted the release-0.18.0 branch July 27, 2021 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants