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

Make sure event loop is running before running coroutines in executor #9664

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

Conversation

jonathan-eq
Copy link
Contributor

Issue
Resolves #9307

Approach
Make sure event loop is running before running coroutines in executor

(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 added the release-notes:bug-fix Automatically categorise as bug fix in release notes label Jan 6, 2025
@jonathan-eq jonathan-eq marked this pull request as ready for review January 6, 2025 13:14
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.73%. Comparing base (719a81e) to head (5934c72).
Report is 13 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #9664       +/-   ##
===========================================
+ Coverage   80.54%   91.73%   +11.19%     
===========================================
  Files         428      430        +2     
  Lines       26619    26668       +49     
===========================================
+ Hits        21439    24463     +3024     
+ Misses       5180     2205     -2975     
Flag Coverage Δ
cli-tests 39.69% <100.00%> (+<0.01%) ⬆️
everest-models-test 34.16% <50.00%> (-0.04%) ⬇️
gui-tests 71.81% <50.00%> (-0.01%) ⬇️
integration-test 38.27% <50.00%> (-0.05%) ⬇️
performance-tests 51.66% <50.00%> (-0.03%) ⬇️
test 39.59% <50.00%> (-0.04%) ⬇️
unit-tests 73.99% <100.00%> (?)

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.

Copy link

codspeed-hq bot commented Jan 6, 2025

CodSpeed Performance Report

Merging #9664 will improve performances by 13.32%

Comparing jonathan-eq:fix-bugs2 (5934c72) with main (18fb2b1)

Summary

⚡ 1 improvements
✅ 23 untouched benchmarks

Benchmarks breakdown

Benchmark main jonathan-eq:fix-bugs2 Change
test_direct_dark_performance_with_storage[gen_x: 20, sum_x: 20 reals: 10-gen_data-get_record_observations] 1.6 ms 1.4 ms +13.32%

Copy link
Contributor

@eivindjahren eivindjahren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to put the application in a bad state in case the condition is ever false.

@jonathan-eq
Copy link
Contributor Author

I was unable to reproduce this with asyncio, but it was possible when using lower level ThreadPoolExecutor. https://superfastpython.com/threadpoolexecutor-shutdown/

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.

Cancelling jobs could result in "unexpected error: cannot schedule new futures after shutdown"
3 participants