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

Stop crashing when empty logs are received from kubernetes client #22566

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Mar 28, 2022

It seems that in some circumstances, the K8S client might return
empty logs even if "timestamps" options is specified.

That should not happen in general, but apparently it does in
some cases and leads to task being killed.

Rather than killing the tasks we should log it as an error
(on top of trying to find out why and preventing it from
happening - also to be able to gather more information and
diagnosis on when it happens).

Related to: #21605


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@boring-cyborg boring-cyborg bot added provider:cncf-kubernetes Kubernetes provider related issues area:providers labels Mar 28, 2022
@potiuk potiuk force-pushed the fix-crashing-kpo-on-empty-log branch from 57940bc to d2f7051 Compare March 28, 2022 13:42
It seems that in some circumstances, the K8S client might return
empty logs even if "timestamps" options is specified.

That should not happen in general, but apparently it does in
some cases and leads to task being killed.

Rather than killing the tasks we should log it as an error
(on top of trying to find out why and preventing it from
happening - also to be able to gather more information and
diagnosis on when it happens).

Related to: apache#21605
@potiuk potiuk force-pushed the fix-crashing-kpo-on-empty-log branch from d2f7051 to 1e7c73e Compare March 28, 2022 13:43
@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Mar 28, 2022
@potiuk potiuk merged commit 0d64d66 into apache:main Mar 28, 2022
@potiuk potiuk deleted the fix-crashing-kpo-on-empty-log branch March 28, 2022 19:22
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Apr 8, 2022
@potiuk potiuk restored the fix-crashing-kpo-on-empty-log branch April 26, 2022 20:53
@potiuk potiuk deleted the fix-crashing-kpo-on-empty-log branch July 29, 2022 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers okay to merge It's ok to merge this PR as it does not require more tests provider:cncf-kubernetes Kubernetes provider related issues type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants