You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5afc5e6
Browse filesBrowse the repository at this point in the historyBrowse files
- Crux's command log (`GET /v1/runs/{id}/cmdlog`) no longer pins a follower's `next_seq` forever ([#17410](https://github.com/hivecommons/hive/issues/17410)). A command that ended `unfinished` (the launcher failed without an exit the runtime could read) is now terminal, so `next_seq` moves past it; a command left in flight by a runner that died is ended `unfinished` when its log is next opened, which `crux serve` now does for every run it reconciles at start; and `more` is never true on a page whose `next_seq` did not move, so a "page while `more`" loop such as `crux cmdlog list --all` can no longer spin on the same request.
Copy file name to clipboardExpand all lines: src/crux/cmdlog/cmdlog.go
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,10 @@
5
5
//
6
6
// The log is one commands.jsonl file in the run's directory. Each command
7
7
// contributes a "started" line when it is dispatched and an "ended" line
8
-
// when its exit is known; a command with no "ended" line is unfinished,
9
-
// never guessed. Readers fold the two into one api.CommandRecord per seq.
8
+
// once the runtime stops waiting on it, carrying the exit when it is
9
+
// known; a command with no "ended" line is in flight and reads as
10
+
// unfinished, never guessed. Readers fold the two into one
11
+
// api.CommandRecord per seq.
10
12
//
11
13
// Honest scope: a record says how the command was observed in its
12
14
// capture field. The S2 runner records what it hands to the sandbox
@@ -34,6 +36,10 @@ const (
34
36
EventEnded="ended"
35
37
)
36
38
39
+
// OrphanReason is the reason on the unfinished ended line Open appends
40
+
// for a command whose started line an earlier writer never ended.
41
+
constOrphanReason="the log was reopened with no exit recorded for this command (the runtime restarted, or its ended write failed); the exit is not knowable"
42
+
37
43
// Output policy defaults: how much of each stream a record keeps. The
38
44
// full output stays with the run (runs.StdoutArtifact); the record keeps
39
45
// enough of both ends to tell what happened without re-reading it.
0 commit comments