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

More readable PSI logs on odo prs #20

Open
prietyc123 opened this issue Apr 9, 2021 · 1 comment
Open

More readable PSI logs on odo prs #20

prietyc123 opened this issue Apr 9, 2021 · 1 comment

Comments

@prietyc123
Copy link
Collaborator

PSI logs for minikube, minishift, OCP (windows, macOS and linux) should be readable enough for the users. QE needs to fix behaviour of logging printable outputs on odo pr.

How logs looks like currently?

INFO[2021-04-08T12:36:29Z] I0408 12:26:26.905802      42 requestor.go:81] Raw message []byte{0x7b, 0x22, 0x4b, 0x69, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x4c, 0x6f, 0x67, 0x22, 0x2c, 0x22, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x22, 0x3a, 0x31, 0x33, 0x34, 0x35, 0x2c, 0x22, 0x4a, 0x65, 0x6e, 0x6b, 0x69, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x3a, 0x22, 0x6f, 0x64, 0x6f, 0x2d, 0x6d, 0x69, 0x6e, 0x69, 0x6b, 0x75, 0x62, 0x65, 0x2d, 0x70, 0x72, 0x2d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x22, 0x2c, 0x22, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x3a, 0x22, 0x5b, 0x73, 0x73, 0x68, 0x3a, 0x46, 0x65, 0x64, 0x6f, 0x72, 0x61, 0x20, 0x33, 0x32, 0x5d, 0x20, 0x5c, 0x75, 0x30, 0x30, 0x31, 0x62, 0x5b, 0x39, 0x30, 0x6d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x5c, 0x75, 0x30, 0x30, 0x31, 0x62, 0x5b, 0x30, 0x6d, 0x5c, 0x6e, 0x5b, 0x73, 0x73, 0x68, 0x3a, 0x46, 0x65, 0x64, 0x6f, 0x72, 0x61, 0x20, 0x33, 0x32, 0x5d, 0x20, 0x5c, 0x75, 0x30, 0x30, 0x31, 0x62, 0x5b, 0x39, 0x31, 0x6d, 0x5c, 0x75, 0x30, 0x30, 0x31, 0x62, 0x5b, 0x31, 0x6d, 0xe2, 0x80, 0xa2, 0x20, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x20, 0x5b, 0x35, 0x2e, 0x37, 0x34, 0x35, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x5d, 0x5c, 0x75, 0x30, 0x30, 0x31, 0x62, 0x5b, 0x30, 0x6d, 0x5c, 0x6e, 0x5b, 0x73, 0x73, 0x68, 0x3a, 0x46, 0x65, 0x64, 0x6f, 0x72, 0x61, 0x20, 0x33, 0x32, 0x5d, 0x20, 0x6f, 0x64, 0x6f, 0x20, 0x64, 0x65, 0x76, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x70, 
[...]
INFO[2021-04-08T12:36:29Z] I0408 12:26:26.905854      42 requestor.go:117] received log message 
INFO[2021-04-08T12:36:29Z] I0408 12:26:26.905877      42 requestor.go:124] log message &messages.LogsMessage{Message:(*messages.Message)(0xc0002a2420), Logs:"[ssh:Fedora 32] \x1b[90m------------------------------\x1b[0m\n[ssh:Fedora 32] \x1b[91m\x1b[1m• Failure [5.745 seconds]\x1b[0m\n[ssh:Fedora 32] odo devfile push command tests\n[ssh:Fedora 32] \x1b[90m/home/fedora/amqp_ci_rcv_odo-minikube-pr-build_PR_4561/repo/tests/integration/devfile/cmd_devfile_push_test.go:20\x1b[0m\n[ssh:Fedora 32]   Testing Push for Kubernetes specific scenarios\n[ssh:Fedora 32]   \x1b[90m/home/fedora/amqp_ci_rcv_odo-minikube-pr-build_PR_4561/repo/tests/integration/devfile/cmd_devfile_push_test.go:1127\x1b[0m\n[ssh:Fedora 32]     \x1b[91m\x1b[1mshould push successfully project value is default [It]\x1b[0m\n[ssh:Fedora 32]     \x1b[90m/home/fedora/amqp_ci_rcv_odo-minikube-pr-build_PR_4561/repo/tests/integration/devfile/cmd_devfile_push_test.go:1134\x1b[0m\n[ssh:Fedora 32] \n[ssh:Fedora 32]     \x1b[91mNo future change is possible.  Bailing out early after 0.132s.\n"} 
INFO[2021-04-08T12:36:29Z] [ssh:Fedora 32] ------------------------------ 
INFO[2021-04-08T12:36:29Z] [ssh:Fedora 32] • Failure [5.745 seconds] 
INFO[2021-04-08T12:36:29Z] [ssh:Fedora 32] odo devfile push command tests 
INFO[2021-04-08T12:36:29Z] [ssh:Fedora 32] /home/fedora/amqp_ci_rcv_odo-minikube-pr-build_PR_4561/repo/tests/integration/devfile/cmd_devfile_push_test.go:20 
INFO[2021-04-08T12:36:29Z] [ssh:Fedora 32]   Testing Push for Kubernetes specific scenarios 
INFO[2021-04-08T12:36:29Z] [ssh:Fedora 32]   /home/fedora/amqp_ci_rcv_odo-minikube-pr-build_PR_4561/repo/

Details: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_odo/4561/pull-ci-openshift-odo-master-psi-kubernetes-integration-e2e/1380123412982140928

@mohammedzee1000
Copy link
Owner

This is mostly a problem with levelled logs in klog where

  1. In some places I have missed converting raw data from the queue into a string before printing it. This is printed before the unmarshal happens to enable easy debugging of why unmarshal failed.
  2. Some of the structs being printed at level 4 and above are being printed as is. In this case, any embedded structs are being printed as hex valyes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants