Improved parsing of scontrol output#369
Conversation
| 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😄
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.