expand queue_info - #965
Open
johrstrom wants to merge 2 commits into
Open
Conversation
Bubballoo3
reviewed
Aug 21, 2026
Comment on lines
+90
to
+91
| return 1 if max.nil? | ||
| return nil if max.to_s == 'UNLIMITED' |
Contributor
There was a problem hiding this comment.
Yeah I definitely am not sure about these defaults. Why would the max default to 1 if unset? It seems like both the unset and unlimited case would have the same behavior: defer to the cluster's limitations
Contributor
Author
There was a problem hiding this comment.
OK - these have been changed to default to nil.
Bubballoo3
reviewed
Aug 21, 2026
Comment on lines
+53
to
+54
| @max_nodes = parse_max(opts.fetch(:max_nodes, 1)) | ||
| @max_cpus = parse_max(opts.fetch(:max_cpus, 1)) |
Contributor
There was a problem hiding this comment.
It also seems like we are setting the 1 default in two different places. Is this necessary? Couldn't we default to nil here and parse_max would still convert it to 1?
Contributor
Author
There was a problem hiding this comment.
Yea that's not good. These have been updated to default to nil.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Expands the attributes of the QueueInfo class.
Related issue
Closes #955
Testing
Checklist
Anything else?
nildefaults. Specifically around UNLIMITED and not given. I wonder if usingnilas a default and value (to represent UNLIMITED) is a good idea.max_cpusshouldn't just bemax_cpus_per_nodedirectly. I think we need to consider howauto_coresis going to be used both in batch connect and in the project manager. As in, maybe we need anauto_cores_per_nodespecifically to differentiate the use cases.duration_in_secondsis a method in the outer class Slurm, not the inner class Slurm::Batch. I just duplicated it instead of refactoring it, but it should be refactored at some point along with some other maybe class methods.