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

Add a warning message to KPO to warn of one second interval logs duplication #39861

Merged
merged 1 commit into from
May 27, 2024

Conversation

fdemiane
Copy link
Contributor

Add a warning message to KPO to warn of one second interval logs duplication.

The KubernetesPodOperator is duplicating the last one second logs when a pod is interrupted, and this is because the logs reading method in the Kubernetes python client takes a since_seconds parameter, and doesn't support passing a finer-grained time representation (See here for context). The optimal fix requires a change in Kubernetes Python client.
As a quick win, we added a warning message to warn users that logs that the last second logs before the container was interrupted might get duplicated.

closes: #39236
related: #33500

@fdemiane
Copy link
Contributor Author

I opened this pull request for #39236 pull request, but I am not really sure if this is the correct way to go, as this is a rare occurrence, and logs might get polluted (space consumed is minimal, but still). What do you think?

@eladkal eladkal merged commit 98c5a3a into apache:main May 27, 2024
50 checks passed
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
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.

KubernetesPodOperator duplicating logs when interrupted
4 participants