-
Notifications
You must be signed in to change notification settings - Fork 26
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
Enable perioding resuming to fetch logs for KPOA #139
Conversation
@kaxil this is ready for review but not for merge because it needs to wait on another k8s provider release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!! Have you tested in on Astro Cloud or locally via chart?
astronomer/providers/cncf/kubernetes/operators/kubernetes_pod.py
Outdated
Show resolved
Hide resolved
astronomer/providers/cncf/kubernetes/triggers/wait_container.py
Outdated
Show resolved
Hide resolved
Only locally... it should be same now that we have gotten that service account issue resolved... but i can work on that if you think it's important to do. Related note, are we gonna OSS the istio stuff? |
@phanikumv Can you assign this to someone in the team to test too please?
Most-likely yes, in a way that is reusable for the OSS community. |
@pankajastro please test this once merged to main as part of our integration test |
this is on hold until next provider release |
@dstandish apache-airflow-providers-cncf-kubernetes 4.0.0 is out 👍 |
|
Oh well, I forgot about this -> apache/airflow@6db30f3 |
@kaxil since astronomer-providers is not related to the KubernetesExecutor it could be based on
|
Even if we do that, all the users of this provider will have to do the same to install it :( Let me think more about it and see if it is better to release a new version of Kubernetes Provider on Apache Airflow with just the logging related changes without the k8s client change. |
@dstandish Now that 2.3 is out and new provider version is out, can we resurrect this PR? |
@pankajastro will fix the mypy issue and get this merged to main |
Codecov Report
@@ Coverage Diff @@
## main #139 +/- ##
==========================================
+ Coverage 96.79% 97.03% +0.23%
==========================================
Files 56 56
Lines 2906 2938 +32
==========================================
+ Hits 2813 2851 +38
+ Misses 93 87 -6
Continue to review full report at Codecov.
|
Mypy issue has been fixed. but test coverage is less than the threshold. I'll fix that too. |
The unit test coverage is passing now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @pankajastro on getting the mypy fixes done quickly.
Tested. LGTM. |
This PR modifies Async KPO to periodicall resume the sync portion of the task to fetch and emit the latest logs before deferring again.
To control this behavior a new param is added:
logging_interval
. IfNone
then Async KPO operates as it did before, never resuming the sync task until the pod is done running. If logging_interval is given a value (integer seconds) then the trigger will resume everylogging_interval
seconds to fetch latest logs and defer again (until pod is done).Here's a task example you can test this with: