Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [unreleased]

### Fixed
- agent: Import of ClusterShell NodeSet class (#682). Contribution from
@faganihajizada.

## [6.0.0] - 2025-11-28

### Added
Expand Down
4 changes: 2 additions & 2 deletions slurmweb/slurmrestd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import logging

import requests
import ClusterShell
from ClusterShell.NodeSet import NodeSet

from .unix import SlurmrestdUnixAdapter
from .auth import SlurmrestdAuthentifier
Expand Down Expand Up @@ -222,7 +222,7 @@ def on_node(job):
"""Return True if job is allocated this node."""
if job["nodes"] == "":
return False
return node in ClusterShell.NodeSet.NodeSet(job["nodes"])
return node in NodeSet(job["nodes"])

def terminated(job):
"""Return True if job is terminated."""
Expand Down
6 changes: 3 additions & 3 deletions slurmweb/tests/slurmrestd/test_slurmrestd.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import urllib

import requests
import ClusterShell
from ClusterShell.NodeSet import NodeSet

from slurmweb.slurmrestd import Slurmrestd
from slurmweb.slurmrestd.errors import (
Expand Down Expand Up @@ -177,7 +177,7 @@ def terminated(job):
return False

# Select random busy node on cluster
busy_nodes = ClusterShell.NodeSet.NodeSet()
busy_nodes = NodeSet()
for job in asset:
if not terminated(job):
busy_nodes.update(job["nodes"])
Expand All @@ -195,7 +195,7 @@ def terminated(job):
self.assertNotIn(job["job_state"], ["COMPLETED", "FAILED", "TIMEOUT"])
self.assertIn(
random_busy_node,
ClusterShell.NodeSet.NodeSet(job["nodes"]),
NodeSet(job["nodes"]),
)

# Test get jobs on nonexistent node.
Expand Down
6 changes: 3 additions & 3 deletions slurmweb/tests/views/test_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from unittest import mock
import random

import ClusterShell
from ClusterShell.NodeSet import NodeSet

from racksdb.version import get_version as racksdb_get_version

Expand Down Expand Up @@ -191,7 +191,7 @@ def terminated(job):
return False

# Select random busy node on cluster
busy_nodes = ClusterShell.NodeSet.NodeSet()
busy_nodes = NodeSet()
for job in jobs_asset:
if not terminated(job):
busy_nodes.update(job["nodes"])
Expand All @@ -210,7 +210,7 @@ def terminated(job):
self.assertNotIn(job["job_state"], ["COMPLETED", "FAILED", "TIMEOUT"])
self.assertIn(
random_busy_node,
ClusterShell.NodeSet.NodeSet(job["nodes"]),
NodeSet(job["nodes"]),
)

@all_slurm_api_versions
Expand Down