Open boyism80 opened 2 weeks ago
Hello @boyism80, Thank you for the report. It was happening to github action too. I don't know exactly why it's not working anymore. I have to do workaround for this
@boyism80 I have made some change on the code. It seems to fix the problem on github action but I don't know how to test it on k8s
@boyism80 I have made some change on the code. It seems to fix the problem on github action but I don't know how to test it on k8s
really appreciate you. I'll apply it to my project and let you know the results.
I tested your update.
No more errors occurs on k8s but text doesn't appear.
In non k8s, text appears normally.
Additionally, I tested it using std::cout
instead of Term::cout
and it was appeared successfully on k8s.
tested on 802d7be9af07de6b7ae0dfcd21737220937242a8
@boyism80 Thx for the update. I think the two bugs are not related. cpp-terminal open the /dev/tty by itself to be sure Term::cout is always printing to a terminal (it can't be redirected) contrary to std::cout. It seems k8s is doing some tricks like this before us so the logic in cpp-terminal fail and so redirect Term::cout to /dev/null I not sure what kubernetes is doing and so don't know exatly how to circonvoluate that. Do you have some ideas?
I also don't know why k8s have different results. I thought std::cout and Term:::cout were exactly the same, but I guess that's not it. I'll look at your code a little more when I have time. Thank you.
I looked into how kubernetes handles logs. I'm not sure if I understand right, but kubernetes redirects stdout, stderr because even when the system shuts down, it has to keep records without removing them. I think it's not a cpp-terminal's bug. It happened because I didn't know how to log in kubernetes. I have to approach it in a different way to use logs on Kubernetes. Thanks for your hard work.
document : https://kubernetes.io/docs/concepts/cluster-administration/logging/
@boyism80 Thanks for the informations. Maybe is not a bug per se but I wonder if in the case there is no /dev/tty available, Term::cout should not redirect to stdout. I will try to think about it
when use on k8s this error occurred
i guess
Private::in.fd()
returns invalid value in k8s.