Skip to content

fix: use squeue as primary job status source over sacct - #25

Merged
183amir merged 1 commit into
mainfrom
fix/scontrol-first-status
Mar 16, 2026
Merged

fix: use squeue as primary job status source over sacct#25
183amir merged 1 commit into
mainfrom
fix/scontrol-first-status

Conversation

@183amir

@183amir 183amir commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Use squeue (live Slurm state) as primary source for job status instead of sacct
  • Single batched squeue call for all jobs — efficient even with many jobs
  • Fall back to sacct for finished jobs no longer in Slurm's active memory, then scontrol as last resort
  • Works with all Slurm versions (tested on 20.11.4 where scontrol comma-separated IDs are not supported)
  • Update pixi to v0.65.0 in CI

Closes #17

🤖 Generated with Claude Code


📚 Documentation preview 📚: https://gridtk--25.org.readthedocs.build/en/25/

@github-actions

github-actions Bot commented Mar 16, 2026

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/gridtk
  manager.py 41-43, 60-69, 91-92, 100-101, 135-140
Project Total  

This report was generated by python-coverage-comment-action

@183amir
183amir force-pushed the fix/scontrol-first-status branch from 12cd2b6 to 2c923a2 Compare March 16, 2026 15:07
@183amir 183amir changed the title fix: use scontrol as primary job status source over sacct fix: use squeue as primary job status source over sacct Mar 16, 2026
@183amir
183amir force-pushed the fix/scontrol-first-status branch from 2c923a2 to c03664f Compare March 16, 2026 15:12
@183amir
183amir requested a review from Yannick-Dayer March 16, 2026 15:12
Yannick-Dayer
Yannick-Dayer previously approved these changes Mar 16, 2026
sacct has a delay after job resubmission, showing stale state.
squeue queries live Slurm state in a single batched call and is always
up-to-date. Falls back to sacct for finished jobs, then scontrol as
last resort. Works with all Slurm versions including old ones (tested
on 20.11.4).

Also updates pixi to v0.65.0 in CI.

Closes #17

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@183amir

183amir commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator Author

@Yannick-Dayer could you please review again? There were conflicts with #24 that I fixed nothing was changed.

@183amir
183amir merged commit e3a91ef into main Mar 16, 2026
10 checks passed
@183amir
183amir deleted the fix/scontrol-first-status branch March 16, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent Job Status Display in gridtk list After Resubmission Due to sacct Delay

2 participants