Skip to content

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

@boring-cyborg boring-cyborg bot added area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues labels May 26, 2024
@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?

@hussein-awala hussein-awala requested a review from eladkal May 27, 2024 11:52
@eladkal eladkal merged commit 98c5a3a into apache:main May 27, 2024
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 (k8s) provider related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KubernetesPodOperator duplicating logs when interrupted

4 participants