Skip to content

Commit

Permalink
add some more debug stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
djeebus committed Jan 16, 2024
1 parent 60aec72 commit 67e558b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion pkg/events/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,14 @@ func (ce *CheckEvent) createRunner(span trace.Span, grpCtx context.Context, app
}()

ce.logger.Info().Str("app", app).Str("check", desc).Msgf("running check")

cr, err := fn()
ce.logger.Info().
Err(err).
Str("app", app).
Str("check", desc).
Uint8("result", uint8(cr.State)).
Msg("check result")

if err != nil {
telemetry.SetError(span, err, desc)
result := pkg.CheckResult{State: pkg.StateError, Summary: desc, Details: fmt.Sprintf(errorCommentFormat, desc, err)}
Expand Down
7 changes: 6 additions & 1 deletion pkg/vcs/gitlab_client/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ func (c *Client) CommitStatus(ctx context.Context, repo *repo.Repo, state pkg.Co
status.PipelineID = &pipelineStatus.ID
}

log.Debug().Str("project", repo.FullName).Str("commit_sha", repo.SHA).Msg("gitlab client: updating commit status")
log.Debug().
Str("project", repo.FullName).
Str("commit_sha", repo.SHA).
Str("kubechecks_status", state.String()).
Str("gitlab_status", string(status.State)).
Msg("gitlab client: updating commit status")
_, err = c.setCommitStatus(repo.FullName, repo.SHA, status)
if err != nil {
log.Error().Err(err).Str("project", repo.FullName).Msg("gitlab client: could not set commit status")
Expand Down

0 comments on commit 67e558b

Please sign in to comment.