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
[Code Quality] Split oversized CompileWorkflowData/generateAndValidateYAML in compiler.go and add %w error wrapping #49094
pkg/workflow/compiler.go (584 lines) has two functions that exceed the ~50-line guidance and zero %w-wrapped errors across 7 return err sites, per the Daily Compiler Quality Check discussion #49027:
CompileWorkflowData — 172 lines
generateAndValidateYAML — 123 lines
Both carry good godoc but mix multiple concerns (parse, validate, generate, write) in a single function body, and none of the 7 return err statements in the file wrap errors with %w, losing call-site context for debugging compile failures.
Suggested Changes
Split CompileWorkflowData into focused steps (e.g. parse -> validate -> generate -> write), each as a small named helper with its own error handling.
Split generateAndValidateYAML similarly by concern (generate vs. validate).
Wrap the 7 bare return err statements in compiler.go with fmt.Errorf("...: %w", err) including relevant context (workflow name/path/stage).
Activity
github-actions commentedon Jul 31, 2026
This issue was automatically closed because it expired on 2026-07-31T07:40:50.940Z.