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(agent): update the validate_job_state validator to support data_parser 0.0.40 #739

Merged
merged 2 commits into from
Mar 7, 2025

Conversation

matheushent
Copy link
Member

This PR modifies the validator function validate_job_state from the SlurmJobData model in order to support the data_parser 0.0.40.

Essentialy, in Slurm 24.11, the --json flag from the scontrol show job command uses the data_parser 0.0.40. According to the official documentation, the job flags can be returned alongside the job state, which can make the job_state key to have multiple keys.

…_parser 0.0.40

This commit modifies the validator function `validate_job_state` from the `SlurmJobData` model
in order to support the data_parser 0.0.40.

Essentialy, in Slurm 24.11, the `--json` flag from the `scontrol show job` command uses the
data_parser 0.0.40. According to the official [documentation](https://slurm.schedmd.com/job_state_codes.html#overview),
the job flags can be returned alongside the job state, which can make the `job_state` key to have multiple keys.
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.00%. Comparing base (6da5042) to head (235c9ff).
Report is 2 commits behind head on release/5.5.

Additional details and impacted files
@@             Coverage Diff              @@
##           release/5.5     #739   +/-   ##
============================================
  Coverage        93.00%   93.00%           
============================================
  Files               88       88           
  Lines             4859     4859           
============================================
  Hits              4519     4519           
  Misses             340      340           
Flag Coverage Δ
agent 94.45% <ø> (ø)
api 95.43% <ø> (ø)
cli 88.62% <ø> (ø)
core 96.31% <ø> (ø)

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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@fschuch fschuch left a comment

Choose a reason for hiding this comment

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

The code looks good, but please, add a news fragment so we can track it on new releases.

@matheushent
Copy link
Member Author

The code looks good, but please, add a news fragment so we can track it on new releases.

check 235c9ff please.

@matheushent matheushent merged commit 1d97b8c into release/5.5 Mar 7, 2025
14 checks passed
@matheushent matheushent deleted the task/fix-job-state-for-data-parser-v0.0.40 branch March 7, 2025 19:19
github-actions bot pushed a commit that referenced this pull request Mar 7, 2025
…_parser 0.0.40 (#739)

This commit modifies the validator function `validate_job_state` from the `SlurmJobData` model
in order to support the data_parser 0.0.40.

Essentialy, in Slurm 24.11, the `--json` flag from the `scontrol show job` command uses the
data_parser 0.0.40. According to the official [documentation](https://slurm.schedmd.com/job_state_codes.html#overview),
the job flags can be returned alongside the job state, which can make the `job_state` key to have multiple keys.

(cherry picked from commit 1d97b8c)
matheushent added a commit that referenced this pull request Mar 7, 2025
…_parser 0.0.40 (#739) (#742)

This commit modifies the validator function `validate_job_state` from the `SlurmJobData` model
in order to support the data_parser 0.0.40.

Essentialy, in Slurm 24.11, the `--json` flag from the `scontrol show job` command uses the
data_parser 0.0.40. According to the official [documentation](https://slurm.schedmd.com/job_state_codes.html#overview),
the job flags can be returned alongside the job state, which can make the `job_state` key to have multiple keys.

(cherry picked from commit 1d97b8c)

Co-authored-by: Matheus Tosta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants