Skip to content

Commit

Permalink
add extra log
Browse files Browse the repository at this point in the history
  • Loading branch information
dleviminzi committed Mar 5, 2025
1 parent 9ade02d commit 5c02d63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/worker/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func (s *Worker) RunContainer(ctx context.Context, request *types.ContainerReque
InitialSpec: initialBundleSpec,
}

err = s.containerMountManager.SetupContainerMounts(request)
err = s.containerMountManager.SetupContainerMounts(request, outputLogger)
if err != nil {
s.containerLogger.Log(request.ContainerId, request.StubId, fmt.Sprintf("failed to setup container mounts: %v", err))
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/worker/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package worker

import (
"fmt"
"log/slog"
"os"
"path"

Expand All @@ -25,7 +26,7 @@ func NewContainerMountManager(config types.AppConfig) *ContainerMountManager {
}

// SetupContainerMounts initializes any external storage for a container
func (c *ContainerMountManager) SetupContainerMounts(request *types.ContainerRequest) error {
func (c *ContainerMountManager) SetupContainerMounts(request *types.ContainerRequest, outputLogger *slog.Logger) error {
// Create local workspace path so we can symlink volumes before the container starts
os.MkdirAll(defaultContainerDirectory, os.FileMode(0755))

Expand All @@ -49,6 +50,7 @@ func (c *ContainerMountManager) SetupContainerMounts(request *types.ContainerReq

err := c.setupMountPointS3(request.ContainerId, m)
if err != nil {
outputLogger.Info(fmt.Sprintf("failed to setup mount point s3 error: %w\n", err))

Check failure on line 53 in pkg/worker/mount.go

View workflow job for this annotation

GitHub Actions / lint_and_test_go_pkg

fmt.Sprintf does not support error-wrapping directive %w
return err
}
}
Expand Down

0 comments on commit 5c02d63

Please sign in to comment.