Skip to content

Commit

Permalink
Dump logs for all containers when test fails (#10573)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-fong authored Jan 15, 2025
1 parent f7b6115 commit 65196f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
changelog:
- type: NON_USER_FACING
description: >-
Added pod/container name prefix to log lines and make sure all containers are logged on test failure
skipCI-kube-tests:true
skipCI-docs-build:true
2 changes: 1 addition & 1 deletion pkg/utils/statedumputils/state_dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func recordCRs(ctx context.Context, namespaceDir string, namespace string) error

// kubeLogs runs $(kubectl -n $namespace logs $pod --all-containers) and returns the string result
func kubeLogs(namespace string, pod string) (string, string, error) {
args := []string{"-n", namespace, "logs", pod, "--all-containers"}
args := []string{"-n", namespace, "logs", pod, "--all-containers=true", "--prefix=true"}
return kubeExecute(args)
}

Expand Down

0 comments on commit 65196f5

Please sign in to comment.