DIRACGrid / DIRACGrid/intercede
[Feature]: Transports — LocalTransport + SSHTransport
- Dominant language
- Python
- Stars
- 3
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
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.
Contributor guide
Assessment
This issue has not been assessed yet.