Monorepo for Tangled tangled.org
1

Configure Feed

Select the types of activity you want to include in your feed.

Labels

None yet.

Participants 1
AT URI
at://did:plc:dfl62fgb7wtjj3fcbb72naae/sh.tangled.repo.pull/3mqzoslh2qi22
+43 -14
Interdiff #4 #5
api/tangled/cbor_gen.go

This file has not been changed.

api/tangled/tangledpipeline.go

This file has not been changed.

buf.gen.yaml

This file has not been changed.

buf.yaml

This file has not been changed.

cmd/spindle/main.go

This file has not been changed.

docker-compose.mill.yml

This file has not been changed.

docker-compose.yml

This file has not been changed.

eventstream/eventstream_test.go

This file has not been changed.

eventstream/store.go

This file has not been changed.

lexicons/pipeline/pipeline.json

This file has not been changed.

localinfra/readme.md

This file has not been changed.

localinfra/scripts/prepare-spindle-images.sh

This file has not been changed.

localinfra/spindle.Dockerfile

This file has not been changed.

netutil/ssrf.go

This file has not been changed.

nix/modules/spindle.nix

This file has not been changed.

nix/vm.nix

This file has not been changed.

spindle/artifactstore/artifactstore.go

This file has not been changed.

spindle/artifactstore/artifactstore_test.go

This file has not been changed.

spindle/config/config.go

This file has not been changed.

spindle/db/db.go

This file has not been changed.

spindle/db/events.go

This file has not been changed.

spindle/db/mill_state.go

This file has not been changed.

spindle/db/mill_state_test.go

This file has not been changed.

spindle/db/mill_tokens.go

This file has not been changed.

spindle/db/mill_tokens_test.go

This file has not been changed.

spindle/engine/engine.go

This file has not been changed.

spindle/engine/engine_test.go

This file has not been changed.

spindle/engine/manifest_test.go

This file has not been changed.

spindle/engine/placement.go

This file has not been changed.

spindle/engine/s3.go

This file has not been changed.

spindle/engine/scheduler.go

This file has not been changed.

spindle/engine/scheduler_test.go

This file has not been changed.

spindle/engine/slot.go

This file has not been changed.

spindle/engine/slot_test.go

This file has not been changed.

+10 -2
spindle/engines/dummy/engine.go
··· 17 17 // step output to the workflow logger. Useful for testing pipeline plumbing 18 18 // without a real execution backend. 19 19 type DummyEngine struct { 20 - l *slog.Logger 20 + l *slog.Logger 21 + StepDelay time.Duration 21 22 } 22 23 23 24 func New(l *slog.Logger) *DummyEngine { ··· 90 91 return nil 91 92 } 92 93 93 - func (e *DummyEngine) RunStep(_ context.Context, wid models.WorkflowId, w *models.Workflow, idx int, _ []secrets.UnlockedSecret, wfLogger models.WorkflowLogger) error { 94 + func (e *DummyEngine) RunStep(ctx context.Context, wid models.WorkflowId, w *models.Workflow, idx int, _ []secrets.UnlockedSecret, wfLogger models.WorkflowLogger) error { 94 95 step := w.Steps[idx] 95 96 e.l.Info("running step", "wid", wid, "step", step.Name(), "command", step.Command()) 96 97 fmt.Fprintf(wfLogger.DataWriter(idx, "stdout"), "$ %s", step.Command()) 98 + if e.StepDelay > 0 { 99 + select { 100 + case <-ctx.Done(): 101 + return ctx.Err() 102 + case <-time.After(e.StepDelay): 103 + } 104 + } 97 105 return nil 98 106 }
spindle/engines/microvm/budget.go

This file has not been changed.

spindle/engines/microvm/engine.go

This file has not been changed.

+3
spindle/engines/microvm/image.go
··· 209 209 210 210 // check if image name is not a path 211 211 func isPlainImageName(name string) bool { 212 + if name == "" || name == "." || name == ".." { 213 + return false 214 + } 212 215 if filepath.IsAbs(name) || strings.ContainsRune(name, '/') || strings.ContainsRune(name, filepath.Separator) { 213 216 return false 214 217 }
spindle/engines/microvm/image_test.go

This file has not been changed.

spindle/engines/microvm/placement/placement.go

This file has not been changed.

spindle/engines/microvm/placement/placement_test.go

This file has not been changed.

spindle/engines/microvm/placement_linux.go

This file has not been changed.

spindle/engines/microvm/qemu.go

This file has not been changed.

spindle/engines/microvm/vm.go

This file has not been changed.

spindle/engines/nixery/engine.go

This file has not been changed.

spindle/logview/logview.go

This file has not been changed.

spindle/mill/README.md

This file has not been changed.

spindle/mill/auth_test.go

This file has not been changed.

spindle/mill/engine.go

This file has not been changed.

spindle/mill/executor/capability_test.go

This file has not been changed.

spindle/mill/executor/executor.go

This file has not been changed.

+1 -1
spindle/mill/executor/observe.go
··· 218 218 var once sync.Once 219 219 res.stopTail = func() { 220 220 once.Do(func() { 221 - _ = t.Stop() 221 + _ = t.StopAtEOF() 222 222 <-done 223 223 }) 224 224 }
spindle/mill/executor/outbox.go

This file has not been changed.

spindle/mill/executor/reserved.go

This file has not been changed.

spindle/mill/executor/reserved_test.go

This file has not been changed.

spindle/mill/handler.go

This file has not been changed.

+13 -7
spindle/mill/integration_test.go
··· 58 58 cfg.Mill.Seats = 2 59 59 cfg.Mill.SharedSecret = "test-token" 60 60 61 - engines := map[string]models.Engine{"dummy": dummy.New(l)} 61 + dummyEng := dummy.New(l) 62 + dummyEng.StepDelay = 50 * time.Millisecond 63 + engines := map[string]models.Engine{"dummy": dummyEng} 62 64 exec, err := executor.New(cfg, engines, edb, &en, l) 63 65 if err != nil { 64 66 t.Fatalf("executor.New: %v", err) ··· 91 93 92 94 sawLogContent := make(chan bool, 1) 93 95 go func() { 96 + ticker := time.NewTicker(20 * time.Millisecond) 97 + defer ticker.Stop() 98 + timeout := time.After(10 * time.Second) 94 99 for { 95 100 select { 96 101 case <-ch: 97 - data, err := os.ReadFile(logPath) 98 - if err == nil && strings.Contains(string(data), "echo hi") { 99 - sawLogContent <- true 100 - return 101 - } 102 - case <-time.After(5 * time.Second): 102 + case <-ticker.C: 103 + case <-timeout: 103 104 sawLogContent <- false 105 + return 106 + } 107 + data, err := os.ReadFile(logPath) 108 + if err == nil && strings.Contains(string(data), "echo hi") { 109 + sawLogContent <- true 104 110 return 105 111 } 106 112 }
spindle/mill/lease.go

This file has not been changed.

+16 -4
spindle/mill/mill.go
··· 1019 1019 if lease == nil || lease.nodeID != sess.nodeID { 1020 1020 return nil 1021 1021 } 1022 - if m.n != nil { 1023 - m.n.NotifyAll() 1024 - } 1025 - 1026 1022 raw := ll.GetRawJson() 1027 1023 if m.cfg.LogDir == "" || len(raw) == 0 { 1024 + if m.n != nil { 1025 + m.n.NotifyAll() 1026 + } 1028 1027 return nil 1029 1028 } 1030 1029 lease.mu.Lock() 1031 1030 isDone := (lease.state == leaseDone) 1032 1031 lease.mu.Unlock() 1033 1032 if isDone { 1033 + if m.n != nil { 1034 + m.n.NotifyAll() 1035 + } 1034 1036 return nil 1035 1037 } 1036 1038 1037 1039 logPath := models.LogFilePath(m.cfg.LogDir, lease.wid) 1038 1040 if err := os.MkdirAll(filepath.Dir(logPath), 0755); err != nil { 1039 1041 m.l.Warn("failed to create log dir", "path", filepath.Dir(logPath), "err", err) 1042 + if m.n != nil { 1043 + m.n.NotifyAll() 1044 + } 1040 1045 return nil 1041 1046 } 1042 1047 f, err := os.OpenFile(logPath, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0600) 1043 1048 if err != nil { 1044 1049 m.l.Warn("failed to open log file", "path", logPath, "err", err) 1050 + if m.n != nil { 1051 + m.n.NotifyAll() 1052 + } 1045 1053 return nil 1046 1054 } 1047 1055 if _, err := f.Write(raw); err != nil { 1048 1056 m.l.Warn("failed to write log file", "path", logPath, "err", err) 1049 1057 } 1050 1058 _ = f.Close() 1059 + 1060 + if m.n != nil { 1061 + m.n.NotifyAll() 1062 + } 1051 1063 return nil 1052 1064 } 1053 1065
spindle/mill/mill_test.go

This file has not been changed.

spindle/mill/proto/gen/mill.pb.go

This file has not been changed.

spindle/mill/proto/protocol.go

This file has not been changed.

spindle/mill/proto/protocol_test.go

This file has not been changed.

spindle/mill/proto/spindle/mill/v1/mill.proto

This file has not been changed.

spindle/mill/proto/ws.go

This file has not been changed.

spindle/mill/restore.go

This file has not been changed.

spindle/mill/restore_test.go

This file has not been changed.

spindle/mill/session.go

This file has not been changed.

spindle/mill/token.go

This file has not been changed.

spindle/server.go

This file has not been changed.

spindle/server.go.master

This file has not been changed.

spindle/server.go.mill

This file has not been changed.

spindle/server_test.go

This file has not been changed.

spindle/stream.go

This file has not been changed.

spindle/xrpc/ci_pipeline_subscribe_logs.go

This file has not been changed.

spindle/xrpc/xrpc.go

This file has not been changed.

workflow/compile.go

This file has not been changed.

workflow/compile_test.go

This file has not been changed.

workflow/def.go

This file has not been changed.

workflow/def_test.go

This file has not been changed.

History

9 rounds 0 comments
Sign up or Login to add to the discussion
1 commit
Expand
spindle: add artifact store
3/3 success
Expand
Checking mergeability…
Expand 0 comments
1 commit
Expand
spindle: add artifact store
1/3 failed, 2/3 cancelled
Expand
Expand 0 comments
1 commit
Expand
spindle: add artifact store
2/3 success, 1/3 failed
Expand
Expand 0 comments
ptr.pet submitted #5
1 commit
Expand
spindle: implement mill
3/3 success
Expand
Expand 0 comments
1 commit
Expand
spindle: implement mill
2/3 success, 1/3 failed
Expand
Expand 0 comments
1 commit
Expand
spindle: implement mill
2/3 success, 1/3 failed
Expand
Expand 0 comments
1 commit
Expand
spindle: implement mill
1/3 success, 2/3 failed
Expand
Expand 0 comments
1 commit
Expand
spindle: implement mill
3/3 failed
Expand
Expand 0 comments
ptr.pet submitted #0
1 commit
Expand
spindle: implement mill
3/3 success
Expand
Expand 0 comments