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 remaining states to the working STATES for LSF driver #7423

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

xjules
Copy link
Contributor

@xjules xjules commented Mar 11, 2024

Issue
Resolves #7215

Approach
Implement a helper function lsf_driver._process_job_update and write tests.

(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 tests pass locally (after every commit!)

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

@xjules xjules self-assigned this Mar 11, 2024
@xjules xjules added release-notes:skip If there should be no mention of this in release notes scheduler labels Mar 11, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.49%. Comparing base (55b9e3a) to head (cc99cc3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7423      +/-   ##
==========================================
+ Coverage   84.48%   84.49%   +0.01%     
==========================================
  Files         384      384              
  Lines       22857    22864       +7     
  Branches      884      874      -10     
==========================================
+ Hits        19310    19319       +9     
  Misses       3435     3435              
+ Partials      112      110       -2     

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

@xjules xjules changed the title WIP: Add remaining states to the working STATES for LSF driver Add remaining states to the working STATES for LSF driver Mar 12, 2024
@xjules xjules marked this pull request as ready for review March 12, 2024 12:08
class FinishedJob(BaseModel):
job_state: Literal["DONE", "EXIT"]
job_state: Literal["DONE", "EXIT", "PDONE", "ZOMBI"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we split this into two classes, one for successes and one for failures?

Copy link
Contributor Author

@xjules xjules Mar 12, 2024

Choose a reason for hiding this comment

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

Do you mean FInishedJobSuccess and FinishedJobFailure? I think it makes sense.

Copy link
Contributor

@berland berland left a comment

Choose a reason for hiding this comment

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

jolly good

This commit moves status update into its own function
(_process_job_udpate). Additionally, it adds two standalone
states FinishedJobFailure and FinishedJobSuccess.
It adds test for process_job_update that it handles all the states properly.
@xjules xjules merged commit 2b180e9 into equinor:main Mar 12, 2024
51 of 52 checks passed
@xjules xjules deleted the lsf_states branch March 12, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:skip If there should be no mention of this in release notes scheduler
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Ensure all job states from LSF are handled properly in Python driver
3 participants