Skip to content

fix: report why an scp to the cluster failed - #185

Draft
tabedzki wants to merge 1 commit into
masterfrom
tabedzki/fix/scp-transfer-errors
Draft

tabedzki wants to merge 1 commit into
masterfrom
tabedzki/fix/scp-transfer-errors

Conversation

@tabedzki

@tabedzki tabedzki commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Refs #184. This PR does not end the outage, so #184 stays open.

Problem

Jobs 1465 to 1468 failed on 2026-11-05 with Error while generating/transfering parameter file and error_stack : None. All four are the first scp to spock exiting non-zero. scp's stderr never reached the job's error info, so the alert couldn't say why.

Fix

  • Parameter, chanmap and slurm file transfers raise ScpTransferError with the file, destination, exit code and scp's stderr. slurm_job_queue's exception handler puts that in error_message and error_exception, and so in Slack. The existing crop keeps the end of the message, which is where stderr is.
  • A failed preparams transfer is no longer reported as a slurm file error.
  • scp_file_transfer still returns the exit code, for cluster log copies and pupillometry.

This does not end the outage

spock is refusing u19prod's login, including the key its SSH config names for this host, so jobs will keep failing until that is sorted out on the spock or account side. Details are in #184. This PR makes that failure visible in the alert, and it can merge independently.

Tests

tests/automatic_job/test_scp_transfer_errors.py runs slurm_job_queue against a fake scp on PATH. It covers imaging and ephys, empty stderr, scp not installed, a failed preparams or slurm transfer, a local job that doesn't call scp, and the exit code return.

The regression test failed on 372a626d with AssertionError: assert 'Permission denied (publickey)' in 'Error while generating/transfering parameter file'. With the fix: 635 passed, 6 skipped (uv run pytest -rs), and uvx prek run --all-files passes. Nothing has run against the real cluster.

Assisted-by: ClaudeCode:claude-opus-5-5

A failed scp of a job's parameter file produced only "Error while
generating/transfering parameter file" with no stack, because
scp_file_transfer dropped stderr and returned the exit code. Parameter, chanmap
and slurm file transfers now raise ScpTransferError with the file, destination,
exit code and scp's stderr, and slurm_job_queue's exception handler puts that
in the job's error info and the Slack alert. A failed preparams transfer is no
longer reported as a slurm file error.

scp_file_transfer still returns the exit code for callers that tolerate a
failure, such as cluster log copies.

Refs #184

Assisted-by: ClaudeCode:claude-opus-5-5
@tabedzki
tabedzki force-pushed the tabedzki/fix/scp-transfer-errors branch from 376fed1 to e9b662d Compare November 6, 2026 19:31
@tabedzki tabedzki changed the title fix: report why an scp to the cluster failed and use the private key fix: report why an scp to the cluster failed Nov 6, 2026
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