Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: warning log formatting #29

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/cmd/local/k8s/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (d *DefaultK8sClient) EventsWatch(ctx context.Context, namespace string) (w
}

func (d *DefaultK8sClient) LogsGet(ctx context.Context, namespace string, name string) (string, error) {
req := d.ClientSet.CoreV1().Pods(namespace).GetLogs(name, &coreV1.PodLogOptions{Previous: true})
req := d.ClientSet.CoreV1().Pods(namespace).GetLogs(name, &coreV1.PodLogOptions{})
reader, err := req.Stream(ctx)
if err != nil {
return "", fmt.Errorf("could not get logs for pod %s: %w", name, err)
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/local/local/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func (c *Command) handleEvent(ctx context.Context, e *v1events.Event) {
if logs != "" {
pterm.Warning.Printfln(
"Encountered an issue deploying Airbyte:\n Pod: %s\n Reason: %s\n Message: %s\n Count: %d\n Logs: %s",
e.Name, e.Reason, e.Note, e.DeprecatedCount, logs,
e.Name, e.Reason, e.Note, e.DeprecatedCount, strings.TrimSpace(logs),
)
} else {
pterm.Warning.Printfln(
Expand Down