Skip to content

Normalize job-state vocabulary across plugins (queue_info / psij → batch_system.STATE_*) #93

Description

@andre-merzky

Follow-up split out of #14 (error propagation & status normalization) — the status-vocabulary half, which was explicitly scoped OUT of PR #91.

Problem

There is one shared job-state vocabulary — `batch_system.STATE_*` (`PENDING/RUNNING/DONE/FAILED/CANCELLED/HELD/UNKNOWN` + `TERMINAL_STATES`) — but plugins don't use it consistently:

So cross-plugin/job-state logic and the UI have no single vocabulary.

Proposed approach (non-destructive)

  • Add a shared `normalize_job_state(raw) -> STATE_*` in `batch_system`.
  • `queue_info` adds a `state_norm` field alongside the raw `state` (so Fix #40: surface more quinfo job info + consistent state formatting #90's raw-state badge map keeps working); re-point `psij._normalize_state` at the shared normalizer.
  • Unit-test the mapping for SLURM + PBS raw states.

Out of scope: the HTTP-error envelope (done in #91).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions