Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased on the 23.2.x branch
- New Classes to interact with Database Associations (WIP)
pyslurm.db.Associationpyslurm.db.Associations
 - New Classes to interact with Database QoS (WIP)
pyslurm.db.QualityOfServicepyslurm.db.QualitiesOfService
 
23.2.3 - 2025-01-03
Added
- Add 
truncate_timeoption topyslurm.db.JobFilter, which is the same as -T / --truncate from sacct. - Add new Attributes to 
pyslurm.db.Jobsthat help gathering statistics for a collection of Jobs more convenient. - Add new 
idle_memoryandallocated_tresattributes topyslurm.Nodeclass - Added 
statsattribute to bothpyslurm.Job,pyslurm.Jobsandpyslurm.db.Jobs - Added 
pidsattribute topyslurm.Jobwhich contains Process-IDs of the Job organized by node-name - Added 
load_statsmethod topyslurm.Jobandpyslurm.Jobsclasses. Together with thestatsandpidsattributes mentioned above, it is now possible to fetch live statistics (like sstat) - Switch to link with 
libslurmfull.soinstead oflibslurm.so
This change really has no impact from a user perspective. Everything will keep working the same, except that Slurms more internal librarylibslurmfull.sois linked with (which is located alongside the plugins inside theslurmdirectory, which itself is next tolibslurm.so)
Why the change? Because it will likely make development easier. It allows access to more functions that might be needed in some places, without completely having to implement them on our own. Implementing the live-statistics feature, so basicallysstat, is for example not possible withlibslurm.so
You can keep providing the directory wherelibslurm.soresided as$SLURM_LIB_DIRto pyslurm, and it will automatically findlibslurmfull.sofrom there. - Added 
run_time_remainingandelapsed_cpu_timeattributes topyslurm.JobStep - Added 
run_time_remainingattribute topyslurm.Job 
Fixed
- Fix 
allocated_gresattribute in thepyslurm.NodeClass returning nothing. - Fix Node State being displayed as 
ALLOCATEDwhen it should actually beMIXED. - Fix crash for the 
gres_per_nodeattribute of thepyslurm.Jobclass when the GRES String received from Slurm contains no count. - Fixed 
total_cpu_time,system_cpu_timeanduser_cpu_timenot getting calculated correctly for Job statistics - Actually make sure that 
avg_cpu_time,min_cpu_time,total_cpu_time,system_cpu_timeanduser_cpu_timeare integers, not float. 
Changed
- Breaking: rename 
cpu_timetoelapsed_cpu_timeinpyslurm.Jobandpyslurm.Jobsclasses - Breaking: rename attribute 
alloc_cpusto justcpusinpyslurm.JobStep - Breaking: removed the following attributes from 
pyslurm.db.Jobs:consumed_energydisk_readdisk_writepage_faultsresident_memoryvirtual_memoryelapsed_cpu_timetotal_cpu_timeuser_cpu_timesystem_cpu_time
 - The removed attributes above are now all available within the 
statsattribute, which is of typepyslurm.db.JobStatistics - Renamed the original class of 
pyslurm.db.JobStatisticstopyslurm.db.JobStepStatistics.
All this class contains is really mostly applicable only to Steps, but doesn't fully apply at the Job Level.
Therefore, the newpyslurm.db.JobStatisticsclass only contains all statistics that make sense at the Job-level. - return 
1as a value for thecpusattribute inpyslurm.db.Jobwhen there is no value set from Slurm's side. 
Removed
- Removed 
pyslurm.version()function. Should use__version__attribute directly. - Removed 
--slurm-liband--slurm-incparameters tosetup.py.
SLURM_LIB_DIRandSLURM_INCLUDE_DIRenvironment variables should be used instead. 
23.2.2 - 2023-07-18
Added
- Ability to modify Database Jobs
 - New classes to interact with the Partition API
 - New attributes for a Database Job:
extrafailed_node
 - Added a new Base Class MultiClusterMap that some Collections inherit from.
 - Added 
to_jsonfunction to all Collections 
Fixed
- Fixes a problem that prevented loading specific Jobs from the Database if
  the following two conditions were met:
- no start/end time was specified
 - the Job was older than a day
 
 
Changed
- Improved Docs
 - Renamed 
JobSearchFilterto pyslurm.db.JobFilter - Renamed 
as_dictfunction of some classes toto_dict 
23.2.1 - 2023-05-18
Added
- Classes to interact with the Job and Submission API
 - Classes to interact with the Database Job API
 - Classes to interact with the Node API
 - Exceptions added:
 - Utility Functions
 
Changed
- Completely overhaul the documentation, switch to mkdocs
 - Rework the tests: Split them into unit and integration tests
 
Deprecated
- Following classes are superseded by new ones:
 
23.2.0 - 2023-04-07
Added
- Support for Slurm 23.02.x (f506d63)
 
Removed
Elasticsearchdebug flag fromget_debug_flagslaunch_type,launch_paramsandslurmctld_plugstackkeys from theconfig.get()output- Some constants (mostly 
ESLURM_*constants that do not exist anymore)