Skip to content
Open
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- File transfer examples with .NET
- Fix error for PBS jobs when no nodes are assigned to it.

## [2.4.1]

Expand Down Expand Up @@ -57,7 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fixed Slurm sacct integration and data parsing.
- Fixed Slurm sacct integration and data parsing.

- Docker Compose startup: Added dependency for Slurm to wait for Keycloak health check before starting, preventing JWT certificate download failures.
- Upload and Download transfer endpoints now require to specify transfer directives
Expand Down
10 changes: 10 additions & 0 deletions src/lib/scheduler_clients/pbs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ def __init__(self, **kwargs):
@field_validator("nodes", mode="before")
@classmethod
def _parse_nodelist(cls, v):
if v is None or v == "":
# This string has been chosen to keep compatibility with the
# Slurm scheduler.
return "None assigned"

nodes = []
for chunk in v.split("+"):
host = chunk.split("/")[0] # drop the “/0”
Expand All @@ -131,6 +136,11 @@ def _parse_nodelist(cls, v):
nodes.append(host)
return ",".join(nodes)

@field_validator("account", mode="before")
@classmethod
def cast_account_to_str(cls, v):
return str(v)


class PbsNode(NodeModel):
cpus: int = Field(alias=AliasChoices("pcpus"))
Expand Down