Skip to content

Fix a bug in azslurm cost#486

Open
aditigaur4 wants to merge 2 commits into
masterfrom
fixcost
Open

Fix a bug in azslurm cost#486
aditigaur4 wants to merge 2 commits into
masterfrom
fixcost

Conversation

@aditigaur4
Copy link
Copy Markdown
Collaborator

Job State is a list and not a static field.

Job State is a list and not a static field.
Copilot AI review requested due to automatic review settings March 17, 2026 19:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes azslurm cost behavior with newer Slurm squeue --json output by correctly handling job_state as a list of states (while retaining compatibility with the older string form), and also corrects a typo that would prevent CostSlurm initialization.

Changes:

  • Fix self.end assignment typo in CostSlurm.__init__.
  • Update process_queue() to treat job_state as either a string or a list and filter running/configuring jobs accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@aditigaur4 aditigaur4 requested a review from Copilot March 17, 2026 19:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes azslurm cost processing when parsing squeue --json output by handling job_state as either a string (older Slurm) or a list (newer Slurm), ensuring running/configuring jobs are detected correctly.

Changes:

  • Fix a typo in CostSlurm.__init__ (self.end assignment).
  • Normalize job_state to a list and update the running/configuring filter logic in process_queue().

You can also share your feedback on Copilot code review. Take the survey.

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.

2 participants