CI without debug info; the retry test reads whole requests f3b4fdeb2bc2
The rust sandbox's env turns off incremental builds and debug info for
every job, as oxygenhub's pipeline does (its build job went from 390-495 s
to 347 s, test from about 235 s to 182 s; oxygenhub#29).
The runner's retry test failed once under a loaded full test run: its
fake hub answered after one read and closed while the client was still
sending, a reset rather than an HTTP status. It now reads the headers and
the whole body first.
Author Andy McCall @andymccall <[email protected] >
When 1 month ago · 2026-09-29 03:17 UTC
Signature ✔ signed by Andy McCall
Hash f3b4fdeb2bc21583e58191fb9ea2314236f472de8d70333cbe2f8e45ee167b43
Depends on 1b2229dab1a4 e0918b887850 f29b88af0d9b fe128fa67a06
Depended on by nothing yet
In bookmarks main newer-pipeline push-uses-login
In tags v0.2.0 v0.3.0 v0.3.1 v0.4.0 v0.5.0 v0.5.1 v0.5.2 v0.5.3
Edits 5 atoms, 0 tree operations, 2 files
Browse the tree at this change
.flow/pipeline.kdl crates/flow/src/runner.rs
modified
.flow/pipeline.kdl
+8 −6
…
40 unchanged lines
41
41
memory-limit "8GiB"
42
42
cpu-limit 4
43
43
network "loopback"
44
+
// CI builds are thrown away: no incremental state and no debug info,
45
+
// so less to compile, link and write (as in oxygenhub's pipeline).
46
+
env {
47
+
CARGO_INCREMENTAL "0"
48
+
CARGO_PROFILE_DEV_DEBUG "0"
49
+
CARGO_PROFILE_TEST_DEBUG "0"
50
+
CARGO_PROFILE_RELEASE_DEBUG "0"
51
+
}
44
52
}
45
53
46
54
sandbox "rust-small" {
…
17 unchanged lines
64
72
source "ephemeral://disk"
65
73
target "/src/target"
66
74
size "16GiB"
67
-
}
68
-
env {
69
-
CARGO_INCREMENTAL "0"
70
75
}
71
76
exec "cargo" "clippy" "--workspace" "--all-targets" "--locked" "--" "-D" "warnings"
72
77
}
…
5 unchanged lines
78
83
source "ephemeral://disk"
79
84
target "/src/target"
80
85
size "16GiB"
81
-
}
82
-
env {
83
-
CARGO_INCREMENTAL "0"
84
86
}
85
87
exec "cargo" "test" "--workspace" "--locked"
86
88
}
…
9 unchanged lines
modified
crates/flow/src/runner.rs
+23 −1
…
327 unchanged lines
328
328
std::thread::spawn(move || {
329
329
for code in codes {
330
330
let (mut s, _) = listener.accept().unwrap();
331
+
// Read the whole request (headers, then Content-Length bytes
332
+
// of body) before answering: closing early would reset the
333
+
// connection while the client is still sending.
334
+
let mut req = Vec::new();
331
335
let mut buf = [0u8; 8192];
332
-
let _ = s.read(&mut buf);
336
+
loop {
337
+
let n = s.read(&mut buf).unwrap_or(0);
338
+
if n == 0 {
339
+
break;
340
+
}
341
+
req.extend_from_slice(&buf[..n]);
342
+
let text = String::from_utf8_lossy(&req);
343
+
if let Some(end) = text.find("\r\n\r\n") {
344
+
let len = text[..end]
345
+
.lines()
346
+
.find_map(|l| {
347
+
l.to_ascii_lowercase().strip_prefix("content-length:").map(|v| v.trim().parse::<usize>().unwrap_or(0))
348
+
})
349
+
.unwrap_or(0);
350
+
if req.len() >= end + 4 + len {
351
+
break;
352
+
}
353
+
}
354
+
}
333
355
count.fetch_add(1, std::sync::atomic::Ordering::SeqCst);
334
356
let reason = if code == 204 { "No Content" } else { "Error" };
335
357
let _ = write!(s, "HTTP/1.1 {code} {reason}\r\nContent-Length: 0\r\nConnection: close\r\n\r\n");
…
42 unchanged lines