Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
sourishkrout committed Feb 6, 2025
1 parent f192d68 commit 597b87e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/notebook/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func NewNotebookService(logger *zap.Logger) notebookv1alpha1.NotebookServiceServ
}

func (r *notebookService) ResolveNotebook(ctx context.Context, req *notebookv1alpha1.ResolveNotebookRequest) (*notebookv1alpha1.ResolveNotebookResponse, error) {
r.logger.Info("running ResolveNotebook in notebookService")
commandMode := req.GetCommandMode()
if commandMode != runnerv1.CommandMode_COMMAND_MODE_DAGGER {
return nil, status.Error(codes.Unimplemented, "command mode is not supported")
Expand All @@ -45,6 +46,7 @@ func (r *notebookService) ResolveNotebook(ctx context.Context, req *notebookv1al
resolver := NewNotebookResolver(notebook)
script, err := resolver.ResolveDaggerShell(ctx, cellIndex.GetValue())
if err != nil {
r.logger.Error("failed to resolve dagger shell", zap.Error(err))
return nil, status.Error(codes.Internal, err.Error())
}
return &notebookv1alpha1.ResolveNotebookResponse{Script: script}, nil
Expand Down

0 comments on commit 597b87e

Please sign in to comment.