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 parsing KubernetesPodOperator multiline logs #34412

Merged
merged 5 commits into from
Oct 3, 2023

Conversation

hussein-awala
Copy link
Member

closes: #34388
related: #21605

This PR combines the multi-line log messages read from KubernetesPodOperator pod before logging them by the task.

Why removing the logged error messages is not enough?

In case of any interruption, we retry the method, so if we are in the middle of a multi-line message, we could have a duplication in the log because all the lines after the first one do not have a timestamp, but by combining them in the same message before logging them, we ensure in case of any interruption that we will retry combining and logging the whole message because we didn't do that in the first retry.

@boring-cyborg boring-cyborg bot added area:providers provider:cncf-kubernetes Kubernetes provider related issues labels Sep 15, 2023
@hussein-awala
Copy link
Member Author

I will add some tests before marking it as ready for review

@hussein-awala hussein-awala marked this pull request as ready for review September 16, 2023 20:04
@eladkal
Copy link
Contributor

eladkal commented Oct 3, 2023

@hussein-awala can you fix conflicts and rebase?

@hussein-awala
Copy link
Member Author

@hussein-awala can you fix conflicts and rebase?

I was working on it, it should be fine now

@donPain
Copy link

donPain commented Oct 24, 2023

When will this fix be available in helm stable?

@dstandish
Copy link
Contributor

@hussein-awala i was trying to understand this a bit more. but i was unable to actually produce multiline logs in KPO. can you tell me how i can reproduce the multiline log behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:cncf-kubernetes Kubernetes provider related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kubernetes provider - Error parsing timestamp in logs
4 participants