[Feature]: Transports — LocalTransport + SSHTransport

Open
#19 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python

Research direction

Start by reading IC-ADR-001 §3, ADR-REVIEW.md comments 7 and 9, and the dependency on IC-ADR-003 (#) to understand the transport boundary and credential requirements. Inspect the ssh-slurm stack's sshd setup and existing entry-point configuration before defining the shared conformance tests. Done means LocalTransport and SSHTransport cover run/put/get, timeouts, quoting, connection reuse, jump-host configuration, registration, and the listed integration tests.

Written by the indexing model from the issue text.

Description

User Story

As the BatchBackend (and any composed scheduler),
I want Transport implementations for local execution and SSH,
So that reaching a resource is an orthogonal, swappable axis (IC-ADR-001 §3) validated against the
real sshd stack.

Feature Description

  • Transport protocol finalised: run(argv) -> CommandResult,
    put(local, remote), get(remote, local); timeouts; typed errors (auth vs connectivity vs
    command failure); async context-manager lifecycle (connections are held state — DIRAC's
    shutdown() closes ssh gateways today).
  • LocalTransport: asyncio subprocess exec + local file ops.
  • SSHTransport: async SSH library; key auth; pinned known-hosts; connection reuse across bulk calls; optional
    jump/gateway host (parity with DIRAC's SSHTunnel).
  • Design consequence to state in docs: unlike DIRAC (which ships a stdlib-only python driver
    to the remote host and execs it), interCEde builds commands locally and sends only argv —
    no python required on the remote host (ADR-REVIEW.md comment 9).
  • Integration: transport-level tests (run/put/get, quoting, timeouts) against the ssh-slurm
    stack's sshd; local variant against the container itself.

Definition of Done

  • LocalTransport + SSHTransport pass a shared transport conformance suite (unit + against
    the sshd stack)
  • Quoting/escaping torture tests (spaces, quotes, globs in argv and paths)
  • Jump-host path covered (config + at least a unit-level test)
  • Registered via intercede.transports entry points
  • Credential supply follows IC-ADR-003 (#) for SSH keys

Alternatives Considered

  • Fabric/Paramiko (DIRAC's choice) — sync; would force asyncio.to_thread around every call.
  • Keeping DIRAC's ship-a-python-driver model — requires python2/3 on every remote host and
    stdlib-only drivers; dropped by the ADR (commands over the wire instead).

Related Issues

Additional Context

SSHMultiHostTransport (DIRAC SSHBatch: N hosts + per-host slot spreading) is deferred
placement policy vs transport question flagged in ADR-REVIEW.md comment 7.

Dominant language
Python
Stars
3
Forks
3
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DIRACGrid/intercede

All issues in DIRACGrid/intercede

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.