Skip to content

Commit

Permalink
osbuild-worker: Add log statements for Splunk dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
diaasami authored and ondrejbudai committed Jan 27, 2023
1 parent a8b6fd4 commit 081cc37
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/osbuild-worker/jobimpl-osbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {

kojiAPI, err := koji.NewFromGSSAPI(targetOptions.Server, &kojiServer.creds, kojiTransport)
if err != nil {
logWithId.Warnf("[Koji] 🔑 login failed: %v", err) // DON'T EDIT: Used for Splunk dashboard
targetResult.TargetError = clienterrors.WorkerClientError(clienterrors.ErrorInvalidTargetConfig, fmt.Sprintf("failed to authenticate with Koji server %q: %v", kojiServerURL.Hostname(), err), nil)
break
}
Expand All @@ -804,6 +805,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
logWithId.Info("[Koji] ⬆ Uploading the image")
imageHash, imageSize, err := kojiAPI.Upload(file, targetOptions.UploadDirectory, jobTarget.ImageName)
if err != nil {
logWithId.Warnf("[Koji] ⬆ upload failed: %v", err) // DON'T EDIT: used for Splunk dashboard
targetResult.TargetError = clienterrors.WorkerClientError(clienterrors.ErrorUploadingImage, err.Error(), nil)
break
}
Expand Down

0 comments on commit 081cc37

Please sign in to comment.