Monorepo for Tangled
0

Configure Feed

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

knotserver/internal: more logging around workflow compilation

Signed-off-by: oppiliappan <me@oppi.li>

authored by

oppiliappan and committed by
Tangled
(Jul 13, 2026, 5:42 PM +0300) 1a161332 f855dc67

+19
+19
knotserver/internal.go
··· 345 345 repoDid string, 346 346 repoPath string, 347 347 ) (workflow.Compiler, tangled.Pipeline, error) { 348 + l := h.l.With("func", "compileCiPipeline", "ref", line.Ref, "repo", repoDid) 349 + 348 350 if line.NewSha.IsZero() { 349 351 return workflow.Compiler{}, tangled.Pipeline{}, nil 350 352 } ··· 356 358 357 359 workflowDir, err := gr.FileTree(context.Background(), workflow.WorkflowDir) 358 360 if err != nil { 361 + l.Info("no workflow dir found, skipping ci compilation", "err", err) 359 362 return workflow.Compiler{}, tangled.Pipeline{}, nil 360 363 } 361 364 ··· 367 370 fpath := filepath.Join(workflow.WorkflowDir, e.Name) 368 371 contents, err := gr.RawContent(fpath) 369 372 if err != nil { 373 + l.Warn("failed to read workflow file", "file", fpath, "err", err) 370 374 continue 371 375 } 372 376 rawPipeline = append(rawPipeline, workflow.RawWorkflow{ ··· 375 379 }) 376 380 } 377 381 382 + l.Info("loaded workflow files", "count", len(rawPipeline)) 383 + 378 384 defaultBranch, _ := gr.FindMainBranch() 379 385 380 386 trigger := tangled.Pipeline_PushTriggerData{ ··· 406 412 } 407 413 408 414 compiled := compiler.Compile(compiler.Parse(rawPipeline)) 415 + 416 + l.Info("compiled ci pipeline", 417 + "workflows", len(compiled.Workflows), 418 + "errors", len(compiler.Diagnostics.Errors), 419 + "warnings", len(compiler.Diagnostics.Warnings), 420 + ) 421 + for _, e := range compiler.Diagnostics.Errors { 422 + l.Error("ci compilation error", "path", e.Path, "err", e.Error) 423 + } 424 + for _, w := range compiler.Diagnostics.Warnings { 425 + l.Warn("ci compilation warning", "path", w.Path, "kind", w.Type, "reason", w.Reason) 426 + } 427 + 409 428 return compiler, compiled, nil 410 429 } 411 430