Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Pixi
uses: prefix-dev/setup-pixi@v0.9.0
with:
pixi-version: v0.65.0
pixi-version: v0.70.2
cache: true

- name: Lint
Expand Down
20 changes: 15 additions & 5 deletions cluster_api/executors/lsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,26 @@ async def _submit_array_job(
return self._job_id_from_submit_output(out), script_path

def _build_status_args(self) -> list[str]:
"""Build bjobs command with JSON output."""
"""Build bjobs command with JSON output.

When jobs are being tracked, always query their IDs explicitly: LSF
resolves explicit job IDs across user boundaries, whereas a
name-filtered query (``-J``) returns only the calling user's jobs
without ``-u all`` — so polling other users' jobs through one user's
account would silently miss them. Combining ``-J`` with explicit IDs
is an intersection, which would hide any tracked job whose name does
not match the prefix, so the prefix filter is applied only when there
is nothing tracked yet; :meth:`reconnect` has its own query builder
for name-based discovery.
"""
args = [self.status_command]
if self.config.poll_all_users:
args.extend(["-u", "all"])
if self._prefix:
active_ids = [jid for jid, r in self._jobs.items() if not r.is_terminal]
if not active_ids and self._prefix:
args.extend(["-J", f"{self._prefix}-*"])
args.extend(["-a", "-o", _BJOBS_FIELDS, "-json"])
if not self._prefix:
active_ids = [jid for jid, r in self._jobs.items() if not r.is_terminal]
args.extend(active_ids)
args.extend(active_ids)
return args

def _parse_job_statuses(
Expand Down
Loading