Skip to content

Feat: HTCondor core - #33

Draft
Alexander-Auer wants to merge 3 commits into
DIRACGrid:mainfrom
Alexander-Auer:stack/htcondor-1-core
Draft

Alexander-Auer wants to merge 3 commits into
DIRACGrid:mainfrom
Alexander-Auer:stack/htcondor-1-core

Conversation

@Alexander-Auer

@Alexander-Auer Alexander-Auer commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

feat: the shared HTCondor core

Part of #23; #21 will reuse it. PR 1 of 6 for the HTCondor-CE backend.

No dependencies: this applies directly to main and can merge before or after #30.

Adds _backends/_htcondor, which holds what interCEde knows about HTCondor itself. Nothing calls it yet: the backend arrives in #35.

What's added

  • submit: renders a submit description from a plan, with one process per copy and per-copy values indexed by ProcId.
  • commands: builds the tools' command lines, splits job ids into chunks of 100, and reads the output of condor_submit -terse and condor_rm.
  • status: reads job ads from condor_q and condor_history and maps them to JobStatus.
  • test_fake_backend.py moves to tests/unit/backends/fake/, unchanged, so each backend has its own test folder.

Decisions to check

  • Finished jobs stay queued until purged (leave_in_queue = (JobStatus == 4)), so output can be collected again. This is the only policy set on a job: no holds, retries or periodic removal.
  • A job held for any reason other than spooling its inputs (hold code 16) counts as Aborted.
  • A removed job keeps its result: LastJobStatus decides, so a finished job that was purged stays Done or Failed.
  • Values a description cannot hold (a line break, a comma in a file list, a bad variable name) raise ValueError.

Testing

80 new unit tests, with no HTCondor needed. Expected values were checked against HTCondor 25 (condor_submit -dry-run and a live schedd).

alexander added 3 commits November 3, 2026 11:04
Moves test_fake_backend.py to tests/unit/backends/fake/, ready for the
HTCondor tests that follow. The tests themselves do not change.

Part of DIRACGrid#23.
Renders a submit description from a plan: one process per copy, per-copy
values indexed by ProcId, quoting, and refusing what a description cannot
hold. It sets no policy on the job except keeping finished jobs until they
are purged, so output can be collected again.

Shared with the HTCondor scheduler to come (DIRACGrid#21), so it knows nothing about
any backend. Expected values were checked against HTCondor 25.

Part of DIRACGrid#23.
Builds the tools' command lines and reads what they print: condor_submit
-terse, condor_rm, and the job ads of condor_q and condor_history, mapped
to the common JobStatus.

A finished job's result comes from its exit, a removed job keeps the result
it had, and any hold that interCEde did not cause counts as aborted.

Part of DIRACGrid#23.

This branch has not been deployed

No deployments
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.

1 participant