Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
772a115
Share SSH monitoring connections and persist host retry backoff
sox8502 Oct 22, 2026
ee67264
Fix explicit reconnect, growing logs, and long SSH setup
sox8502 Oct 22, 2026
97df5cd
Require idle SSH monitors before dev-slot data cleanup
sox8502 Oct 22, 2026
d2ee43a
Merge remote-tracking branch 'origin/main' into daniel/or-558-shared-ssh
sox8502 Oct 22, 2026
39cb2e4
Show SSH connection and run monitoring diagnostics
sox8502 Oct 22, 2026
aca6872
Preserve quoted SSH known-hosts filename lists
sox8502 Oct 22, 2026
b06a279
Merge remote-tracking branch 'origin/main' into daniel/or-558-shared-ssh
sox8502 Oct 22, 2026
6d046a0
Merge remote-tracking branch 'origin/main' into daniel/or-558-shared-ssh
sox8502 Oct 22, 2026
18157f6
Include shared SSH log files in run artifact cleanup
sox8502 Oct 22, 2026
575f8fa
Support Python 3.6 remote SSH helpers
sox8502 Oct 22, 2026
74d4901
Merge remote-tracking branch 'origin/main' into daniel/or-558-shared-ssh
sox8502 Oct 22, 2026
cc13526
Finish Slurm runs despite unavailable logs
sox8502 Oct 22, 2026
55af17d
Validate SSH log chunks during concurrent rewrites
sox8502 Oct 22, 2026
778114b
Merge origin/main and preserve shared SSH monitoring compatibility
sox8502 Oct 23, 2026
6025952
Detect full-prefix log rewrites and isolate legacy SSH monitors
sox8502 Oct 23, 2026
1e6c37d
Preserve whitespace in interactive SSH credentials
sox8502 Oct 23, 2026
21906b7
Reuse verified log digests and ignore unrelated obsolete SSH routes
sox8502 Oct 23, 2026
ca8fb01
Merge latest main and rebuild the reviewed dashboard
sox8502 Oct 23, 2026
99e8a39
Keep pinned SSH connections stable across unrelated config edits
sox8502 Oct 23, 2026
5cfb903
Merge current main and migrate saved SSH connection bindings
sox8502 Oct 23, 2026
cde56e5
Merge current main and isolate Slurm status read failures
sox8502 Oct 23, 2026
13b0bdf
Merge current main and close SSH retry and Slurm completion gaps
sox8502 Oct 23, 2026
6bee71f
Stream large SSH command input through bounded upload frames
sox8502 Oct 23, 2026
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
Prev Previous commit
Next Next commit
Merge current main and isolate Slurm status read failures
  • Loading branch information
sox8502 committed Oct 23, 2026
commit cde56e503f938e1755d37f93a868ce40fd5108f6
27 changes: 8 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,6 @@ jobs:
run: node ui/scripts/check-i18n.mjs
- name: Style tokens
run: node ui/scripts/check-styles.mjs

- name: Dev-slot helper tests
run: node --test scripts/dev-slot.test.mjs

- name: Interactive chart authoring tests
run: python3 scripts/test_orx_chart.py

- name: Shared SSH helper protocol tests
run: |
python3 scripts/test_ssh_helper.py
for version in 3.6.15-slim-buster 3.7.17-slim-bullseye 3.8.20-slim-bookworm; do
docker run --rm --network none \
-v "$GITHUB_WORKSPACE:/work:ro" -w /work \
"python:$version" python scripts/test_ssh_helper.py
done

- name: Release notes composition
run: python3 scripts/test_release_notes.py

- uses: pnpm/action-setup@v4
with:
version: 10
Expand Down Expand Up @@ -153,6 +134,14 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source-sha || github.sha }}
- name: Shared SSH helper protocol tests
run: |
python3 scripts/test_ssh_helper.py
for version in 3.6.15-slim-buster 3.7.17-slim-bullseye 3.8.20-slim-bookworm; do
docker run --rm --network none \
-v "$GITHUB_WORKSPACE:/work:ro" -w /work \
"python:$version" python scripts/test_ssh_helper.py
done
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand Down
27 changes: 27 additions & 0 deletions scripts/test_ssh_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,33 @@ def test_slurm_reads_exit_code_from_custom_remote_directory(self):
"run": "run-one", "job": "42", "dir": path,
}]), {"run-one": "EXIT 7"})

def test_slurm_exit_file_error_does_not_block_other_jobs(self):
home = Path(self.home.name)
broken = home / ".orx" / "runs" / "run-one"
healthy = home / ".orx" / "runs" / "run-two"
(broken / "exit_code").mkdir(parents=True)
healthy.mkdir(parents=True)
(healthy / "exit_code").write_text("0")
queue = self.bin / "squeue"
queue.write_text("#!/bin/sh\necho '42|RUNNING'\n")
queue.chmod(0o700)
self.assertEqual(self.rpc(op="slurm", jobs=[
{"run": "run-one", "job": "42"}, {"run": "run-two", "job": "43"},
]), {"run-one": "SQ RUNNING", "run-two": "EXIT 0"})
queue.write_text("#!/bin/sh\nexit 1\n")
accounting = self.bin / "sacct"
accounting.write_text("#!/bin/sh\nexit 1\n")
accounting.chmod(0o700)
self.assertEqual(self.rpc(op="slurm", jobs=[
{"run": "run-one", "job": "42"}, {"run": "run-two", "job": "43"},
]), {"run-one": "UNAVAILABLE", "run-two": "EXIT 0"})
(broken / "exit_code").rmdir()
(broken / "exit_code").write_bytes(b"\xff")
queue.write_text("#!/bin/sh\necho '42|RUNNING'\n")
self.assertEqual(self.rpc(op="slurm", jobs=[
{"run": "run-one", "job": "42"}, {"run": "run-two", "job": "43"},
]), {"run-one": "SQ RUNNING", "run-two": "EXIT 0"})

def test_slurm_batches_and_distinguishes_hidden_from_unavailable(self):
queue = self.bin / "squeue"
queue.write_text("#!/bin/sh\necho \"$*\" >> \"$HOME/queue-calls\"\ncase \"$*\" in\n *'-j '*) exit 1;;\n *--all*--states=all*) echo '42|SUSPENDED';;\nesac\n")
Expand Down
2 changes: 1 addition & 1 deletion src/jobs/ssh/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def slurm_status(jobs):
directory = os.path.join(os.path.expanduser("~"), directory)
with open(os.path.join(directory, "exit_code")) as file:
result[run] = "EXIT " + file.read(64).strip()
except FileNotFoundError:
except (OSError, UnicodeError):
pending[job_id] = run
Comment thread
sox8502 marked this conversation as resolved.
Resolved
if not pending:
return result
Expand Down
60 changes: 5 additions & 55 deletions tests/cli/compute_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ fn interactive_ssh_retires_rejected_masters_without_unlinking_unknown_connection
std::thread::scope(|scope| {
for case in [
"healthy",
"legacy_other",
"legacy_unresolvable",
"legacy_same",
"rejection",
"exit_zero",
"stop_failure",
Expand Down Expand Up @@ -403,19 +406,7 @@ esac
"#).unwrap();
std::fs::set_permissions(&ssh, std::fs::Permissions::from_mode(0o755)).unwrap();

for case in [
"healthy",
"backoff",
"legacy_other",
"legacy_unresolvable",
"legacy_same",
"rejection",
"exit_zero",
"stop_failure",
"probe_timeout",
"check_timeout",
"stop_timeout",
] {
for case in std::iter::once(case).chain((case == "healthy").then_some("backoff")) {
let _ = std::fs::remove_file(sandbox.0.join("calls"));
let command = sandbox.command();
let mut builder = CommandBuilder::new(command.get_program());
Expand Down Expand Up @@ -542,47 +533,6 @@ esac
let _ = std::fs::remove_file(&socket);
let _ = std::fs::remove_file(socket.with_extension("lock"));
}
builder.env("PATH", format!("{}:/usr/bin:/bin", bin.display()));
builder.env("CASE", case);
builder.args(["compute", "connect", "ssh", "--host", "lab"]);
let pair = native_pty_system().openpty(PtySize::default()).unwrap();
let mut child = pair.slave.spawn_command(builder).unwrap();
drop(pair.slave);
let mut reader = pair.master.try_clone_reader().unwrap();
let mut output = Vec::new();
// Linux PTYs report EIO instead of EOF when the slave closes.
if let Err(error) = reader.read_to_end(&mut output) {
assert_eq!(error.raw_os_error(), Some(libc::EIO));
}
let status = child.wait().unwrap();
let calls = std::fs::read_to_string(sandbox.0.join("calls")).unwrap();
let socket = PathBuf::from(std::fs::read_to_string(sandbox.0.join("socket-path")).unwrap());
let output = String::from_utf8_lossy(&output);
match case {
"healthy" => {
assert!(status.success(), "{output}");
assert!(!calls.contains("-O stop"));
assert!(socket.exists());
assert!(output.contains("LOGIN"));
}
"rejection" | "exit_zero" => {
assert!(status.success(), "{output}");
assert!(calls.find("-O stop").unwrap() < calls.find("-- lab true").unwrap());
assert!(!socket.exists());
assert!(output.contains("LOGIN"));
}
_ => {
assert!(!status.success(), "{case}: {output}");
assert!(socket.exists(), "{case} removed an unknown/live socket");
assert!(!output.contains("LOGIN"));
if case != "stop_failure" && case != "stop_timeout" {
assert!(!calls.contains("-O stop"));
}
}
}
assert!(!calls.contains("-O exit"));
let _ = std::fs::remove_file(&socket);
let _ = std::fs::remove_file(socket.with_extension("lock"));
}

#[cfg(unix)]
Expand Down Expand Up @@ -692,7 +642,7 @@ exec python3 "$HOME/ssh-monitor-fixture.py" "$cmd"
std::fs::set_permissions(&ssh, std::fs::Permissions::from_mode(0o755)).unwrap();
std::fs::write(
sandbox.0.join("ssh-monitor-fixture.py"),
include_str!("ssh-monitor-fixture.py"),
include_str!("../ssh-monitor-fixture.py"),
)
.unwrap();
let phase = sandbox.0.join("phase");
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.