Skip to content

Commit

Permalink
Fix non-constant log strings
Browse files Browse the repository at this point in the history
Newer versions of the go compiler (1.24 in this case) fail when running
go test during a mock rebuild of the srpm created by 'make srpm' on
Fedora 42.

Even though we currently don't support go1.24, fix these so they don't
become an issue when we do.
  • Loading branch information
bcl committed Jan 22, 2025
1 parent af0543d commit 73101d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/osbuild-composer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func main() {

listeners, err := activation.ListenersWithNames()
if err != nil {
logrus.Fatalf("Could not get listening sockets: " + err.Error())
logrus.Fatalf("Could not get listening sockets: %v", err)
}

if l, exists := listeners["osbuild-composer.socket"]; exists {
Expand Down
2 changes: 1 addition & 1 deletion cmd/osbuild-worker-executor/handler_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func runOsbuild(logger *logrus.Logger, buildDir string, control *controlJSON, ou
out, err := cmd.CombinedOutput()
if err != nil {
err = fmt.Errorf("cannot tar output directory: %w, output:\n%s", err, out)
logger.Errorf(err.Error())
logger.Errorf("%v", err)
_, _ = mw.Write([]byte(err.Error()))
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/auth/jwt_auth_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func BuildJWTAuthHandler(keysURLs []string, caFile, aclFile string, exclude []st
return
}

logger.Info(context.Background(), aclFile)
logger.Info(context.Background(), "aclFile = %s", aclFile)

builder := authentication.NewHandler().
Logger(logger)
Expand Down

0 comments on commit 73101d2

Please sign in to comment.