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

Add some detached <-> scheduler edge cases #8898

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

yngve-sk
Copy link
Contributor

@yngve-sk yngve-sk commented Oct 7, 2024

Issue
Resolves #8896

Approach
At first the job exists as a FAILED job in scheduler: if context is not None and context.has_job_failed(0):, then on the next line it may still be failed, OR (1) set to JobStatus.WAITING, or (2) removed from context.scheduler._jobs, these edge cases are currently not handled, and can occur if we are lucky enough for this change to happen in scheduler between these two lines of code:

            if context is not None and context.has_job_failed(0):
                path = context.job_progress(0).steps[0].std_err_file
  • 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

@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.67%. Comparing base (9817d75) to head (2a90a10).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8898      +/-   ##
==========================================
- Coverage   90.70%   90.67%   -0.03%     
==========================================
  Files         349      349              
  Lines       21776    21776              
==========================================
- Hits        19751    19746       -5     
- Misses       2025     2030       +5     
Flag Coverage Δ
cli-tests 38.99% <ø> (+<0.01%) ⬆️
gui-tests 71.70% <ø> (ø)
performance-tests 49.24% <ø> (ø)
unit-tests 79.51% <ø> (-0.03%) ⬇️

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
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.

I think a few tests should be added for the new behavior and then get this merged as a fix for #8896

@yngve-sk yngve-sk force-pushed the handle-some-race-condition branch 2 times, most recently from cf87d61 to a9ac1e8 Compare October 25, 2024 06:24
@yngve-sk yngve-sk marked this pull request as ready for review October 25, 2024 06:24
@yngve-sk yngve-sk self-assigned this Oct 25, 2024
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.

👍 (Just need to fix the style workflow)

@yngve-sk yngve-sk merged commit 9b5c933 into equinor:main Oct 28, 2024
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

everest detached wait_for_server gives AttributeError
3 participants