Skip to content

Commit

Permalink
Improve logging and print url for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrylomiro committed Mar 6, 2024
1 parent 6c0f8c7 commit 6a511ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/actionsmetrics/event_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (reader *EventReader) ProcessWorkflowJobEvent(ctx context.Context, event in
log.Error(err, "reading workflow job log")
return
} else {
log.Info("reading workflow_job logs")
log.Info("reading workflow_job logs for in progress job", "parseResult", &parseResult)
}

githubWorkflowJobQueueDurationSeconds.With(labels).Observe(parseResult.QueueTime.Seconds())
Expand Down Expand Up @@ -160,7 +160,7 @@ func (reader *EventReader) ProcessWorkflowJobEvent(ctx context.Context, event in
s := parseResult.RunTime.Seconds()
runTimeSeconds = &s

log.Info("reading workflow_job logs", "exit_code", exitCode, "run_time_seconds", &runTimeSeconds, "parseResult", &parseResult)
log.Info("reading workflow_job logs for completed job", "exit_code", exitCode, "run_time_seconds", &runTimeSeconds, "parseResult", &parseResult)
}

if *e.WorkflowJob.Conclusion == "failure" {
Expand Down Expand Up @@ -232,6 +232,7 @@ func (reader *EventReader) fetchAndParseWorkflowJobLogs(ctx context.Context, e *
if err != nil {
return nil, err
}
println(url.String())
jobLogs, err := http.DefaultClient.Get(url.String())
if err != nil {
return nil, err
Expand Down

0 comments on commit 6a511ce

Please sign in to comment.