Skip to content

Improved parsing of scontrol output#369

Merged
trz42 merged 7 commits intoEESSI:developfrom
bedroge:fix_scontrol_output_parsing
Mar 3, 2026
Merged

Improved parsing of scontrol output#369
trz42 merged 7 commits intoEESSI:developfrom
bedroge:fix_scontrol_output_parsing

Conversation

@bedroge
Copy link
Copy Markdown
Contributor

@bedroge bedroge commented Feb 26, 2026

Closes #368 by looking for keys starting with an uppercase letter. Already tested this with the RISC-V bot, but I'll also try to add a test for this. edit: done.

@bedroge bedroge marked this pull request as ready for review February 26, 2026 12:51
Comment thread eessi_bot_job_manager.py Outdated
Comment thread eessi_bot_job_manager.py Outdated
Comment thread eessi_bot_job_manager.py
separated by whitespaces.
Note that with newer Slurm versions, some values can also contain whitespaces
(e.g. for SubmitLine), making it complex to distinguish between keys and values.
To solve this, we assume that all Slurm keys start with an uppercase letter.
Copy link
Copy Markdown
Contributor

@trz42 trz42 Mar 3, 2026

Choose a reason for hiding this comment

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

I wonder if we could have constrained this a bit more by handing over a list of "expected" keys (and only return key-value pairs for those). While the new assumption may be correct now, we don't know if it will be in the future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I did consider that, but I found this a bit more flexible, and it's now doing the exact same thing as before. They're using these kinds of names everywhere (in scontrol, sacct, sstat, etc), so I guess it's a rather safe assumption?

But I can easily change this if you want to, though it could still break in the future if they decide to change the structure/names.

Ah, you merged it while I was typing this, then I guess I'll leave it like this 😄

Copy link
Copy Markdown
Contributor

@trz42 trz42 left a comment

Choose a reason for hiding this comment

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

This fixes issue #368 for newer Slurm versions and retains compatibility with older versions.

@trz42 trz42 merged commit 167da4a into EESSI:develop Mar 3, 2026
7 checks passed
@bedroge bedroge deleted the fix_scontrol_output_parsing branch March 3, 2026 09:15
@boegel
Copy link
Copy Markdown
Contributor

boegel commented Mar 12, 2026

@trz42 Can we tag a new release that includes this fix?

We hit the problem reported in #368 with one of our bot instances after updating to Slurm 25.11.3...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bot is not compatible with newer Slurm versions

3 participants