auditJobRun performs a targeted audit of a specific job within a workflow run If stepNumber > 0, focuses on extracting output for that specific step
(opts auditJobRunOptions)
| 947 | // auditJobRun performs a targeted audit of a specific job within a workflow run |
| 948 | // If stepNumber > 0, focuses on extracting output for that specific step |
| 949 | func auditJobRun(opts auditJobRunOptions) error { |
| 950 | opts.hostname = resolveAuditHostname(opts.hostname) |
| 951 | auditLog.Printf("Starting job-specific audit: runID=%d, jobID=%d, stepNumber=%d, hostname=%s", opts.runID, opts.jobID, opts.stepNumber, opts.hostname) |
| 952 | if err := os.MkdirAll(opts.outputDir, constants.DirPermSensitive); err != nil { |
| 953 | return fmt.Errorf("failed to create output directory: %w", err) |
| 954 | } |
| 955 | jobLogContent, jobLogPath, err := fetchAuditJobLog(opts) |
| 956 | if err != nil { |
| 957 | return err |
| 958 | } |
| 959 | if err := extractAuditJobDetails(opts, jobLogContent); err != nil { |
| 960 | return err |
| 961 | } |
| 962 | renderAuditJobSummary(opts, jobLogPath) |
| 963 | return nil |
| 964 | } |
| 965 | |
| 966 | func fetchAuditJobLog(opts auditJobRunOptions) (string, string, error) { |
| 967 | args := []string{"run", "view"} |
no test coverage detected