1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 14:31:44 +01:00

fix: fixes panic in agent with stopped containers (#3167)

This commit is contained in:
Amir Raminfar
2024-07-30 19:31:14 -07:00
committed by GitHub
parent b4277603cf
commit 657643e6ce
7 changed files with 45 additions and 76 deletions

View File

@@ -189,7 +189,7 @@ func (s *server) FindContainer(ctx context.Context, in *pb.FindContainerRequest)
Tty: container.Tty,
Labels: container.Labels,
Group: container.Group,
Started: timestamppb.New(*container.StartedAt),
Started: timestamppb.New(container.StartedAt),
},
}, nil
}
@@ -213,11 +213,6 @@ func (s *server) ListContainers(ctx context.Context, in *pb.ListContainersReques
})
}
var startedAt *timestamppb.Timestamp
if container.StartedAt != nil {
startedAt = timestamppb.New(*container.StartedAt)
}
pbContainers = append(pbContainers, &pb.Container{
Id: container.ID,
Name: container.Name,
@@ -230,7 +225,7 @@ func (s *server) ListContainers(ctx context.Context, in *pb.ListContainersReques
Tty: container.Tty,
Labels: container.Labels,
Group: container.Group,
Started: startedAt,
Started: timestamppb.New(container.StartedAt),
Stats: pbStats,
Command: container.Command,
})
@@ -276,7 +271,7 @@ func (s *server) StreamContainerStarted(in *pb.StreamContainerStartedRequest, ou
Tty: container.Tty,
Labels: container.Labels,
Group: container.Group,
Started: timestamppb.New(*container.StartedAt),
Started: timestamppb.New(container.StartedAt),
},
})
case <-out.Context().Done():