-
Notifications
You must be signed in to change notification settings - Fork 90
[develop] Avoid duplication of nodes in ClusterManager._find_active_nodes()
#538
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
Merged
jdeamicis
merged 3 commits into
aws:develop
from
jdeamicis:fix/devel/fix_nodelists_multiple_partitions
Jun 19, 2023
Merged
[develop] Avoid duplication of nodes in ClusterManager._find_active_nodes()
#538
jdeamicis
merged 3 commits into
aws:develop
from
jdeamicis:fix/devel/fix_nodelists_multiple_partitions
Jun 19, 2023
Conversation
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
Codecov Report
@@ Coverage Diff @@
## develop #538 +/- ##
========================================
Coverage 87.88% 87.88%
========================================
Files 16 16
Lines 2427 2427
========================================
Hits 2133 2133
Misses 294 294
Flags with carried forward coverage won't be shown. Click here to find out more.
|
davprat
previously approved these changes
Jun 16, 2023
Contributor
davprat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
This is relevant only in cases when the Slurm partition configuration is edited and PC-managed nodes are added to multiple custom partitions. Add unit test to verify that overlapping partitions do not lead to duplication of nodes in the group returned by ClusterManager._find_active_nodes(). Adapt existing unit tests to the changes. Signed-off-by: Jacopo De Amicis <jdamicis@amazon.it>
be72632 to
63b3220
Compare
This preserves the insertion order of nodes in the list of active nodes and removed the need to sort nodelists manually to compare them in unit tests. Signed-off-by: Jacopo De Amicis <jdamicis@amazon.it>
5953042 to
310a456
Compare
This removed the need to extend the constructor of SlurmPartition to pass the list of SlurmNode objects `slurm_nodes`, removing the risk of wrong implementations in the future. Include additional cases to test_find_active_nodes(). Signed-off-by: Jacopo De Amicis <jdamicis@amazon.it>
c1cd661 to
008f6d1
Compare
4 tasks
lukeseawalker
approved these changes
Jun 19, 2023
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.
Description of changes
ClusterManager._find_active_nodes()when nodes belong to multiple Slurm partitions.SlurmNodeclass constructor to allow specifying theslurm_nodesattribute at object creation.Tests
ClusterManager._find_active_nodes().References
ClusterManager._find_active_nodes()#537Checklist
Check if documentation is impacted by this change.Please review the guidelines for contributing and Pull Request Instructions.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.