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

Fix _storage_main terminate_on_parent_death not working on mac #9110

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jonathan-eq
Copy link
Contributor

@jonathan-eq jonathan-eq commented Oct 31, 2024

Prior to this commit, the terminate_on_parent_death function was only usable on linux, due to it using the prctl command. This commit creates a new thread which polls the parent process, and signals terminate when it can no longer find the parent.

Issue
Resolves #8452

Approach
Short description of the approach

(Screenshot of new behavior in GUI if applicable)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@jonathan-eq jonathan-eq marked this pull request as ready for review October 31, 2024 08:57
@jonathan-eq jonathan-eq added the release-notes:bug-fix Automatically categorise as bug fix in release notes label Oct 31, 2024
@jonathan-eq jonathan-eq changed the title Have _storage_main teardown be platform independent Fix _storage_main terminate_on_parent_death not working on mac Oct 31, 2024
@jonathan-eq jonathan-eq self-assigned this Oct 31, 2024
@jonathan-eq
Copy link
Contributor Author

@JHolba Will outsourcing the parent-proccess-"living-situation"-polling to a new thread cause issues? This is the best thing chatgpt and I came up with.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 17.64706% with 14 lines in your changes missing coverage. Please review.

Project coverage is 90.70%. Comparing base (97478fa) to head (8bc64be).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/ert/services/_storage_main.py 17.64% 14 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9110   +/-   ##
=======================================
  Coverage   90.69%   90.70%           
=======================================
  Files         349      350    +1     
  Lines       21764    21787   +23     
=======================================
+ Hits        19738    19761   +23     
  Misses       2026     2026           
Flag Coverage Δ
cli-tests 39.01% <0.00%> (+0.01%) ⬆️
gui-tests 71.66% <0.00%> (-0.03%) ⬇️
performance-tests 49.23% <0.00%> (-0.02%) ⬇️
unit-tests 79.54% <17.64%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jonathan-eq jonathan-eq force-pushed the fix-storage-server-teardown branch 5 times, most recently from 225d82e to bb80e7a Compare November 4, 2024 14:04
@jonathan-eq jonathan-eq force-pushed the fix-storage-server-teardown branch 3 times, most recently from 69c07b0 to 09fdd16 Compare November 11, 2024 14:45
@jonathan-eq jonathan-eq force-pushed the fix-storage-server-teardown branch 5 times, most recently from 77a83ac to 440d10c Compare November 22, 2024 07:11
Prior to this commit, the `terminate_on_parent_death` function was only usable on linux, due to it using the prctl command.
This commit creates a new thread which polls the parent process, and signals terminate when it can no longer find the parent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:bug-fix Automatically categorise as bug fix in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storage_server json inhibits ert from plotting after error encountered
3 participants